CI Reverse Lab Scan #2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Copyright (c) 2023 SolarWinds, LLC. | |
# All rights reserved. | |
name: CI Reverse Lab Scan | |
on: | |
workflow_dispatch: | |
jobs: | |
# act -j ci-reverse-lab-scan --container-architecture linux/arm64 | |
ci-reverse-lab-scan: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Ruby 3.1 and bundle | |
uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: 3.1 | |
- name: Build apm-ruby | |
id: build-apm-ruby-ci-reverse-lab | |
run: | | |
sudo apt-get update && sudo apt-get install -y --no-install-recommends ruby ruby-dev g++ make swig bison | |
sudo gem install bundler | |
sudo echo 'gem: --no-document' >> ~/.gemrc | |
sudo bundle install --without development --without test | |
sudo bundle exec rake fetch_oboe_file["prod"] | |
sudo gem build solarwinds_apm.gemspec | |
CURRENT_GEM=$(ls | grep solarwinds_apm-*.gem) | |
GEM_VERSION=$(echo "$CURRENT_GEM" | grep -oP '(?<=solarwinds_apm-)[0-9]+\.[0-9]+\.[0-9]+(\.[a-z0-9]+)?(?=\.gem)') | |
echo "current_gem=$CURRENT_GEM" >> $GITHUB_OUTPUT | |
echo "gem_version=$GEM_VERSION" >> $GITHUB_OUTPUT | |
- name: Print Gem and Version (in case some debugging is needed) | |
run: | | |
echo "Gem name: ${{ steps.build-apm-ruby-ci-reverse-lab.outputs.current_gem }}" | |
echo "Gem version: ${{ steps.build-apm-ruby-ci-reverse-lab.outputs.gem_version }}" | |
- name: Scan build artifact on the Portal | |
id: rl-scan | |
env: | |
RLPORTAL_ACCESS_TOKEN: ${{ secrets.REVERSE_LAB_TOKEN }} | |
uses: reversinglabs/gh-action-rl-scanner-cloud-only@v1 | |
with: | |
artifact-to-scan: ${{ steps.build-apm-ruby-ci-reverse-lab.outputs.current_gem }} | |
rl-verbose: true | |
rl-portal-server: solarwinds | |
rl-portal-org: SolarWinds | |
rl-portal-group: SaaS-Agents-SWO | |
rl-package-url: solarwinds-apm-ruby/apm-ruby@${{ steps.build-apm-ruby-ci-reverse-lab.outputs.gem_version }} | |
- name: report the scan status | |
if: success() || failure() | |
run: | | |
echo "The status is: '${{ steps.rl-scan.outputs.status }}'" | |
echo "The description is: '${{ steps.rl-scan.outputs.description }}'" |