From 1e026636cd16b9ab024b0cae07d5314d04ed526f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Peter=20Scha=CC=88fer?= <101886095+PeterSchafer@users.noreply.github.com> Date: Sun, 13 Oct 2024 14:42:49 +0200 Subject: [PATCH] chore: add deployment monitoring via github actions --- .github/workflows/deployment-monitor.yml | 70 ++++++++++++++++++++++++ 1 file changed, 70 insertions(+) create mode 100644 .github/workflows/deployment-monitor.yml diff --git a/.github/workflows/deployment-monitor.yml b/.github/workflows/deployment-monitor.yml new file mode 100644 index 0000000000..31f4455d43 --- /dev/null +++ b/.github/workflows/deployment-monitor.yml @@ -0,0 +1,70 @@ +name: Deployment Tests + +on: + push: + branches: + - chore/CLI-441_deployment_test + schedule: + - cron: '0 23 * * *' + workflow_dispatch: + +jobs: + monitor_cdn: + name: CDN deployments + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + os: [ubuntu] + base_url: [static.snyk.io downloads.snyk.io] + channel: [stable preview] + steps: + - uses: actions/checkout@v2 + - name: Install dependencies + run: sudo apt update && sudo apt install -y curl + - name: Install Snyk + run: | + date -u + rm -f ./snyk + curl --retry 2 -L -v --compressed https://${{ matrix.base_url }}/cli/${{ matrix.channel }}/snyk-linux -o ./snyk-linux + curl --retry 2 -L -v --compressed https://${{ matrix.base_url }}/cli/${{ matrix.channel }}/snyk-linux.sha256 -o ./snyk-linux.sha256 + echo --- Content shasum file --- + cat snyk-linux.sha256 + echo --- Shasum binary --- + sha256sum snyk-linux + chmod +x ./snyk-linux + echo --- CLI version --- + ./snyk-linux --version + echo --- Shasum comparison --- + sha256sum -c snyk-linux.sha256 + - name: Run snyk --version + run: ./snyk-linux --version + + + monitor_homebrew: + name: Homebrew deployment + runs-on: ${{ matrix.os }}-latest + strategy: + fail-fast: false + matrix: + os: [ macos ] + steps: + - name: Install Snyk CLI with homebrew on macOS + run: | + brew tap snyk/tap + brew install snyk + - name: Run snyk --version + run: snyk --version + + monitor_scoop: + name: Scoop deployment + runs-on: windows-latest + steps: + - name: Install scoop on Windows + run: | + Set-ExecutionPolicy -ExecutionPolicy RemoteSigned -Scope CurrentUser + Invoke-RestMethod -Uri https://get.scoop.sh | Invoke-Expression + scoop bucket add snyk https://github.com/snyk/scoop-snyk + scoop install snyk + - name: Run snyk --version + run: snyk --version