diff options
author | Christian Breunig <christian@breunig.cc> | 2024-08-23 18:09:07 +0200 |
---|---|---|
committer | Christian Breunig <christian@breunig.cc> | 2024-08-23 21:12:42 +0200 |
commit | f7615e00c7eaf097a0287868f9614aa06886757f (patch) | |
tree | 8abb08071edf687a3b79b609c773615e3dc8d7e5 | |
parent | 38d5984f4af16fb0ae30fbac9c7159e9f6eb7803 (diff) | |
download | vyos-nightly-build-dev.tar.gz vyos-nightly-build-dev.zip |
testdev
-rw-r--r-- | .github/workflows/vyos-rolling-nightly-build.yml | 86 |
1 files changed, 83 insertions, 3 deletions
diff --git a/.github/workflows/vyos-rolling-nightly-build.yml b/.github/workflows/vyos-rolling-nightly-build.yml index 1d1ed96..1ad6ca5 100644 --- a/.github/workflows/vyos-rolling-nightly-build.yml +++ b/.github/workflows/vyos-rolling-nightly-build.yml @@ -1,4 +1,4 @@ -name: VyOS rolling nightly build +name: VyOS nightly build on: schedule: @@ -27,6 +27,11 @@ on: required: true type: boolean default: false + SKIP_SMOKETEST_TPM: + description: 'Skip TPM test' + required: true + type: boolean + default: false SKIP_SNAPSHOT_S3_UPLOAD: description: 'Skip snapshot upload to S3' required: true @@ -147,6 +152,7 @@ jobs: run: | set -e ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso + exit 1 sudo make test | tee smoketest_make_test.log - uses: actions/upload-artifact@v4 with: @@ -178,6 +184,7 @@ jobs: run: | set -e ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso + exit 1 sudo make testc | tee smoketest_make_testc.log - uses: actions/upload-artifact@v4 with: @@ -210,6 +217,7 @@ jobs: set -e ln -s vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso build/live-image-amd64.hybrid.iso sudo make testraid | tee smoketest_make_testraid.log + exit 1 - uses: actions/upload-artifact@v4 with: name: smoketest_make_testraid @@ -220,7 +228,7 @@ jobs: test_encrypted_config_tpm: needs: build_iso runs-on: ubuntu-24.04 - if: ${{ !inputs.SKIP_SMOKETEST_RAID1 }} + if: ${{ !inputs.SKIP_SMOKETEST_TPM }} container: image: vyos/vyos-build:current options: --sysctl net.ipv6.conf.lo.disable_ipv6=0 --privileged @@ -248,6 +256,78 @@ jobs: retention-days: 30 if-no-files-found: error + slack: + needs: + - test_config_load + - test_raid1_install + - test_smoketest_cli + - test_encrypted_config_tpm + - build_iso + runs-on: ubuntu-24.04 + if: failure() + steps: + - uses: actions/download-artifact@v4 + with: + path: logs + pattern: smoketest_make_* + - shell: bash + run: ls -al + - name: "Slack notification: filter Smoketest failed logs" + id: filter_smoketest_failed_logs + run: | + ls -al logs + for logfile in $(ls logs/*.log) + do + echo $logfile + cat $logfile | grep '... FAIL' >> ${{ github.workspace }}/smoketest_filtered.log || true + cat $logfile | grep 'ERROR -' >> ${{ github.workspace }}/smoketest_filtered.log || true + cat $logfile | grep 'Error:' -A12 >> ${{ github.workspace }}/smoketest_filtered.log || true + done + + # - name: "Slack notification: send to channel" + # id: send_a_slack_failure_notification + # uses: slackapi/slack-github-action@v1.25.0 + # with: + # payload: | + # { + # "text": "*VyOS nightly build automation did not succeed*", + # "attachments": [ + # { + # "color": "FF6600", + # "fields": [ + # { + # "title": "Repository", + # "short": true, + # "value": "${{ github.repository }}" + # }, + # { + # "title": "Workflow", + # "short": true, + # "value": "${{ github.workflow }}" + # }, + # { + # "title": "Trigger", + # "short": true, + # "value": "${{ github.event_name }}" + # }, + # { + # "title": "Run number", + # "short": true, + # "value": "${{ github.run_number }}" + # }, + # { + # "title": "URL", + # "short": false, + # "value": "${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}" + # } + # ] + # } + # ] + # } + # env: + # SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK }} + # SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK + publish: needs: - test_config_load @@ -258,7 +338,7 @@ jobs: runs-on: ubuntu-24.04 permissions: contents: write - if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }} + if: ${{ success() && !inputs.SKIP_RELEASE_PUBLISHING }} steps: - uses: actions/checkout@v4 - name: Clone vyos-build source code |