|
82 | 82 | draft: true
|
83 | 83 | })
|
84 | 84 |
|
| 85 | + - name: Upload to artifact |
| 86 | + uses: actions/upload-artifact@v4 |
| 87 | + with: |
| 88 | + name: solarwinds_apm-${{ steps.build.outputs.gem_version }}.gem |
| 89 | + path: solarwinds_apm-${{ steps.build.outputs.gem_version }}.gem |
| 90 | + |
85 | 91 | # may need a bit of time for the gem to become available (-> sleep 1)
|
86 | 92 | - name: Download new Rubygem from rubygems.org and test
|
87 | 93 | working-directory: .github/workflows/
|
|
92 | 98 | sudo apt-get update && sudo apt-get install -y ruby-dev g++ make
|
93 | 99 | gem install solarwinds_apm --version ${{ steps.build.outputs.gem_version }}
|
94 | 100 | ruby ./scripts/test_install.rb
|
| 101 | +
|
| 102 | + # extract the built layer from artifacts, then scan it with reverselab |
| 103 | + reverselab_scan_gem: |
| 104 | + needs: |
| 105 | + - publish_to_ruby_gem |
| 106 | + runs-on: ubuntu-latest |
| 107 | + strategy: |
| 108 | + fail-fast: false |
| 109 | + |
| 110 | + steps: |
| 111 | + - uses: actions/checkout@v4 |
| 112 | + |
| 113 | + - name: extract current solarwinds_apm version |
| 114 | + id: extract |
| 115 | + run: | |
| 116 | + APM_VERSION=$(ruby -e 'require "./lib/solarwinds_apm/version"; puts SolarWindsAPM::Version::STRING') |
| 117 | + echo "SOLARWINDS_APM_VERSION=$APM_VERSION" >> $GITHUB_ENV |
| 118 | +
|
| 119 | + - name: extract layer zip from artifacts |
| 120 | + uses: actions/download-artifact@v4 |
| 121 | + with: |
| 122 | + name: solarwinds_apm-${{ env.SOLARWINDS_APM_VERSION }}.gem |
| 123 | + path: ./ |
| 124 | + |
| 125 | + - name: Scan build artifact on the Portal |
| 126 | + id: rl-scan |
| 127 | + env: |
| 128 | + RLPORTAL_ACCESS_TOKEN: ${{ secrets.REVERSE_LAB_TOKEN }} |
| 129 | + uses: reversinglabs/gh-action-rl-scanner-cloud-only@v1 |
| 130 | + with: |
| 131 | + artifact-to-scan: ./solarwinds_apm-${{ steps.SOLARWINDS_APM_VERSION }}.gem |
| 132 | + rl-verbose: true |
| 133 | + rl-portal-server: solarwinds |
| 134 | + rl-portal-org: SolarWinds |
| 135 | + rl-portal-group: SaaS-Agents-SWO |
| 136 | + rl-package-url: solarwinds-apm-ruby/apm-ruby-prod@${{ env.SOLARWINDS_APM_VERSION }} |
| 137 | + |
| 138 | + - name: report the scan status |
| 139 | + if: success() || failure() |
| 140 | + run: | |
| 141 | + echo "The status is: '${{ steps.rl-scan.outputs.status }}'" |
| 142 | + echo "The description is: '${{ steps.rl-scan.outputs.description }}'" |
0 commit comments