summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Breunig <christian@breunig.cc>2024-07-03 12:17:39 +0200
committerChristian Breunig <christian@breunig.cc>2024-08-18 21:05:26 +0200
commit560657e9faabe663ee729dbc90e0aa37bfd0f57f (patch)
tree9dfa6f80bd7301d82889f909002fe91fce23001b
parentc2a217c37c34545daa1850b9427652b64ad0beb4 (diff)
downloadvyos-rolling-nightly-builds-560657e9faabe663ee729dbc90e0aa37bfd0f57f.tar.gz
vyos-rolling-nightly-builds-560657e9faabe663ee729dbc90e0aa37bfd0f57f.zip
Remove non-smoketest step and run tests in parallel
-rw-r--r--.github/workflows/vyos-rolling-nightly-build.yml452
1 files changed, 134 insertions, 318 deletions
diff --git a/.github/workflows/vyos-rolling-nightly-build.yml b/.github/workflows/vyos-rolling-nightly-build.yml
index 6d3bdaf..a12fbb0 100644
--- a/.github/workflows/vyos-rolling-nightly-build.yml
+++ b/.github/workflows/vyos-rolling-nightly-build.yml
@@ -7,28 +7,23 @@ on:
workflow_dispatch:
inputs:
BUILD_BY:
- description: 'Builder identifier (if empty autobuild@vyos.net is used)'
+ description: 'Builder identifier (default: autobuild@vyos.net)'
default: ''
- BUILD_VERSION:
- description: 'Version number (if empty 1.5-rolling-$(date -u +%Y%m%d%H%M) is used)'
+ build_version:
+ description: 'Version number (default: 1.5-rolling-ISO8601-TIMESTAMP)'
default: ''
- FAKE_BUILDING_PROCESS:
- description: 'Skip all Smoketests and fake building process'
- required: true
- type: boolean
- default: false
SKIP_SMOKETEST_RAID1:
- description: 'Skip RAID1 Smoketest'
+ description: 'Skip RAID1 Test'
required: true
type: boolean
default: false
SKIP_SMOKETEST_SYSTEM:
- description: 'Skip system Smoketest'
+ description: 'Skip CLI smoketest'
required: true
type: boolean
default: false
SKIP_SMOKETEST_CONFIG:
- description: 'Skip config Smoketest'
+ description: 'Skip config load test'
required: true
type: boolean
default: false
@@ -53,113 +48,95 @@ on:
type: boolean
default: false
+env:
+ BUILD_BY: autobuild@vyos.net
+ DEBIAN_MIRROR: http://deb.debian.org/debian/
+ VYOS_MIRROR: https://rolling-packages.vyos.net/current/
+ DOCKER_CALL_ON_KVM_HOST_WITH_IMAGE_PULL: docker run --rm --privileged --pull=always -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current
+
jobs:
- build-iso:
- runs-on: ubuntu-latest
+ build_iso:
+ runs-on: ubuntu-24.04
permissions:
contents: write
- concurrency:
- group: main
- env:
- BUILD_BY: autobuild@vyos.net
- DEBIAN_MIRROR: http://deb.debian.org/debian/
- VYOS_MIRROR: https://rolling-packages.vyos.net/current/
- DOCKER_CALL: docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current
- DOCKER_CALL_ON_KVM_HOST: docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current
- DOCKER_CALL_ON_KVM_HOST_WITH_IMAGE_PULL: docker run --rm --privileged --pull=always -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current
+ container:
+ image: vyos/vyos-build:current
+ options: --sysctl net.ipv6.conf.lo.disable_ipv6=0 --privileged
+ outputs:
+ build_version: ${{ steps.set_env_variables.outputs.build_version }}
steps:
-
-### Initialization ###
-
+ ### Initialization ###
- uses: actions/checkout@v4
-
- name: "Initialization: set env variables"
id: set_env_variables
run: |
+ set -x
if [ -n "${{ github.event.inputs.BUILD_BY }}" ]; then
echo "BUILD_BY=${{ github.event.inputs.BUILD_BY }}" >> $GITHUB_ENV
fi
- if [ -z "${{ github.event.inputs.BUILD_VERSION }}" ]; then
- echo "BUILD_VERSION=1.5-rolling-$(date -u +%Y%m%d%H%M)" >> $GITHUB_ENV
+ if [ -z "${{ github.event.inputs.build_version }}" ]; then
+ echo "build_version=1.5-rolling-$(date -u +%Y%m%d%H%M)" >> $GITHUB_OUTPUT
else
- echo "BUILD_VERSION=${{ github.event.inputs.BUILD_VERSION }}" >> $GITHUB_ENV
+ echo "build_version=${{ github.event.inputs.build_version }}" >> $GITHUB_OUTPUT
fi
echo "TIMESTAMP=$(date -u +%Y-%m-%dT%H:%M:%SZ)" >> $GITHUB_ENV
echo "PREVIOUS_SUCCESS_BUILD_TIMESTAMP=$(cat version.json | jq -r '.[0].timestamp')" >> $GITHUB_ENV
- - name: "Initialization: git clone vyos-build"
- id: git_clone_vyos-build
- run: git clone -b current --single-branch https://github.com/vyos/vyos-build
-
- - name: "Initialization: git clone vyos-1x"
- id: git_clone_vyos-1x
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- run: git clone -b current --single-branch https://github.com/vyos/vyos-1x
-
-### Smoketest ###
+ - name: Clone vyos-build source code
+ uses: actions/checkout@v4
+ with:
+ repository: vyos/vyos-build
+ path: vyos-build
- - name: "Smoketest: build generic ISO image"
- id: build_iso_for_smoketest
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && (!inputs.SKIP_SMOKETEST_RAID1 || !inputs.SKIP_SMOKETEST_SYSTEM || !inputs.SKIP_SMOKETEST_CONFIG) }}
+ - name: Build generic ISO image
+ id: build_generic_iso
run: |
- ${{ env.DOCKER_CALL }} \
+ cd vyos-build
sudo --preserve-env ./build-vyos-image \
--architecture amd64 \
--build-by $BUILD_BY \
--build-type release \
--custom-package vyos-1x-smoketest \
--debian-mirror $DEBIAN_MIRROR \
- --version $BUILD_VERSION \
+ --version ${{ steps.set_env_variables.outputs.build_version }} \
--vyos-mirror $VYOS_MIRROR \
generic
+ # move artifact one level up for minisign
+ mv build/vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso ..
+
+ - name: Sign generic ISO image
+ shell: bash
+ run: |
+ ls -al
+ echo "${{ secrets.minisign_private_key }}" > /tmp/minisign.key
+ echo ${{ secrets.minisign_password }} | $GITHUB_WORKSPACE/bin/minisign -s /tmp/minisign.key -Sm vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso
+ echo "${{ secrets.minisign_public_key }}" > /tmp/minisign.pub
+ $GITHUB_WORKSPACE/bin/minisign -Vm vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso -x vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64.iso.minisig -p /tmp/minisign.pub
+ ls -al
+ rm /tmp/minisign.key /tmp/minisign.pub
- - name: "Smoketest: create generic ISO artifact"
- id: upload_iso_artifact_smoketest_image
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && (!inputs.SKIP_SMOKETEST_RAID1 || !inputs.SKIP_SMOKETEST_SYSTEM || !inputs.SKIP_SMOKETEST_CONFIG) }}
- uses: actions/upload-artifact@v4
+ - uses: actions/upload-artifact@v4
with:
- name: vyos-${{ env.BUILD_VERSION }}-amd64-smoketest.iso
- path: ./vyos-build/build/live-image-amd64.hybrid.iso
+ name: vyos-${{ steps.set_env_variables.outputs.build_version }}-generic-amd64
+ path: vyos-${{ steps.set_env_variables.outputs.build_version }}-*
retention-days: 30
if-no-files-found: error
- - name: "Smoketest: upload generic ISO to KVM host"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && (!inputs.SKIP_SMOKETEST_RAID1 || !inputs.SKIP_SMOKETEST_SYSTEM || !inputs.SKIP_SMOKETEST_CONFIG) }}
- id: copy_smoketest_iso_to_kvm_host
- uses: cross-the-world/ssh-scp-ssh-pipelines@latest
- env:
- BUILD_VERSION: ${{ env.BUILD_VERSION }}
+ test_smoketest_cli:
+ needs: build_iso
+ runs-on: ubuntu-24.04
+ if: ${{ !inputs.SKIP_SMOKETEST_SYSTEM }}
+ steps:
+ # We need the test script from vyos-build repo
+ - name: Clone vyos-build source code
+ uses: actions/checkout@v4
with:
- host: ${{ secrets.SSH_HOST }}
- user: ${{ secrets.SSH_USER }}
- port: ${{ secrets.SSH_PORT }}
- key: ${{ secrets.SSH_KEY }}
- connect_timeout: 600s
- first_ssh: |
- rm -rf vyos-build || true
- git clone -b current --single-branch https://github.com/vyos/vyos-build
- mkdir -p ~/vyos-build/build/
- scp: |
- './vyos-build/build/live-image-amd64.hybrid.iso' => '~/vyos-build/build/'
- timeout-minutes: 300
-
- - name: "Smoketest: RAID"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && !inputs.SKIP_SMOKETEST_RAID1 }}
- id: smoketest_raid
- uses: appleboy/ssh-action@v1.0.3
+ repository: vyos/vyos-build
+ - uses: actions/download-artifact@v4
with:
- host: ${{ secrets.SSH_HOST }}
- username: ${{ secrets.SSH_USER }}
- port: ${{ secrets.SSH_PORT }}
- key: ${{ secrets.SSH_KEY }}
- timeout: 15m
- command_timeout: 180m
- script: |
- ${{ env.DOCKER_CALL_ON_KVM_HOST_WITH_IMAGE_PULL }} /bin/bash -c "set -o pipefail && sudo make testraid | tee smoketest_raid.log"
-
- - name: "Smoketest: system"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && !inputs.SKIP_SMOKETEST_SYSTEM }}
- id: smoketest_system
+ name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64
+ path: build
+ - name: VyOS CLI smoketests
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
@@ -168,12 +145,25 @@ jobs:
key: ${{ secrets.SSH_KEY }}
timeout: 15m
command_timeout: 180m
+ script_stop: true
script: |
- ${{ env.DOCKER_CALL_ON_KVM_HOST }} /bin/bash -c "set -o pipefail && sudo make test | tee smoketest_system.log"
+ ${{ env.DOCKER_CALL_ON_KVM_HOST_WITH_IMAGE_PULL }} /bin/bash -c "sudo make test | tee smoketest_system.log"
- - name: "Smoketest: configuration"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && !inputs.SKIP_SMOKETEST_CONFIG }}
- id: smoketest_configuration
+ test_config_load:
+ needs: build_iso
+ runs-on: ubuntu-24.04
+ if: ${{ !inputs.SKIP_SMOKETEST_CONFIG }}
+ steps:
+ # We need the test script from vyos-build repo
+ - name: Clone vyos-build source code
+ uses: actions/checkout@v4
+ with:
+ repository: vyos/vyos-build
+ - uses: actions/download-artifact@v4
+ with:
+ name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64
+ path: build
+ - name: VyOS config load tests
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
@@ -182,12 +172,25 @@ jobs:
key: ${{ secrets.SSH_KEY }}
timeout: 15m
command_timeout: 180m
+ script_stop: true
script: |
- ${{ env.DOCKER_CALL_ON_KVM_HOST }} /bin/bash -c "set -o pipefail && sudo make testc | tee smoketest_configuration.log"
+ ${{ env.DOCKER_CALL_ON_KVM_HOST_WITH_IMAGE_PULL }} /bin/bash -c "sudo make testc | tee smoketest_configuration.log"
- - name: "Smoketest: clear files"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS && (!inputs.SKIP_SMOKETEST_RAID1 || !inputs.SKIP_SMOKETEST_SYSTEM || !inputs.SKIP_SMOKETEST_CONFIG) }}
- id: clear_smoketest_files
+ test_raid1_install:
+ needs: build_iso
+ runs-on: ubuntu-24.04
+ if: ${{ !inputs.SKIP_SMOKETEST_RAID1 }}
+ steps:
+ # We need the test script from vyos-build repo
+ - name: Clone vyos-build source code
+ uses: actions/checkout@v4
+ with:
+ repository: vyos/vyos-build
+ - uses: actions/download-artifact@v4
+ with:
+ name: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64
+ path: build
+ - name: RAID1 installation tests
uses: appleboy/ssh-action@v1.0.3
with:
host: ${{ secrets.SSH_HOST }}
@@ -195,117 +198,48 @@ jobs:
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
timeout: 15m
- command_timeout: 45m
+ command_timeout: 180m
+ script_stop: true
script: |
- ${{ env.DOCKER_CALL_ON_KVM_HOST }} sudo rm -rf ./*
- rm -rf ~/vyos-build
-
-### Building ###
-
- - name: "Building: create ISO image"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS }}
- id: build_iso
- run: |
- ${{ env.DOCKER_CALL }} \
- sudo --preserve-env ./build-vyos-image \
- --architecture amd64 \
- --build-by $BUILD_BY \
- --build-type release \
- --debian-mirror $DEBIAN_MIRROR \
- --version $BUILD_VERSION \
- --vyos-mirror $VYOS_MIRROR \
- generic
-
- - name: "Building: copy a generic ISO image"
- if: ${{ !inputs.FAKE_BUILDING_PROCESS }}
- id: copy_iso
- run: |
- cp ./vyos-build/build/live-image-amd64.hybrid.iso ./vyos-$BUILD_VERSION-amd64.iso
-
- - name: "Building: fake a generic ISO image"
- if: ${{ inputs.FAKE_BUILDING_PROCESS }}
- id: fake_iso
- run: |
- echo FAKE > ./vyos-$BUILD_VERSION-amd64.iso
-
- - name: "Building: sign an ISO image with Minisign"
- id: sign_iso_minisign
- run: |
- echo "${{ secrets.minisign_private_key }}" > /tmp/minisign.key
- shasum /tmp/minisign.key
- echo ${{ secrets.minisign_password }} | $GITHUB_WORKSPACE/bin/minisign -s /tmp/minisign.key -Sm ./vyos-$BUILD_VERSION-amd64.iso
- echo "${{ secrets.minisign_public_key }}" > /tmp/minisign.pub
- $GITHUB_WORKSPACE/bin/minisign -Vm ./vyos-$BUILD_VERSION-amd64.iso -x ./vyos-$BUILD_VERSION-amd64.iso.minisig -p /tmp/minisign.pub
- rm /tmp/minisign.key /tmp/minisign.pub
-
-### Uploading artifacts ###
-
- - name: "Uploading artifacts: ISO image to S3 Glacier"
- id: upload_iso_to_s3_glacier
- if: ${{ !inputs.SKIP_SNAPSHOT_S3_UPLOAD }}
- uses: keithweaver/aws-s3-github-action@v1.0.0
- with:
- command: cp
- source: ./vyos-${{ env.BUILD_VERSION }}-amd64.iso
- destination: s3://${{ secrets.aws_s3_bucket }}/vyos-${{ env.BUILD_VERSION }}-amd64.iso
- aws_access_key_id: ${{ secrets.aws_access_key_id }}
- aws_secret_access_key: ${{ secrets.aws_secret_access_key }}
- aws_region: us-east-1
- flags: --storage-class GLACIER
-
- - name: "Uploading artifacts: ISO image's signature to S3 Glacier"
- id: upload_iso_signature_to_s3_glacier
- if: ${{ !inputs.SKIP_SNAPSHOT_S3_UPLOAD }}
- uses: keithweaver/aws-s3-github-action@v1.0.0
- with:
- command: cp
- source: ./vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
- destination: s3://${{ secrets.aws_s3_bucket }}/vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
- aws_access_key_id: ${{ secrets.aws_access_key_id }}
- aws_secret_access_key: ${{ secrets.aws_secret_access_key }}
- aws_region: us-east-1
- flags: --storage-class GLACIER
+ ${{ env.DOCKER_CALL_ON_KVM_HOST_WITH_IMAGE_PULL }} /bin/bash -c "set -o pipefail && sudo make testraid | tee smoketest_raid.log"
- - name: "Uploading artifacts: ISO image to GitHub"
- id: upload_iso_artifact
- uses: actions/upload-artifact@v4
+ publish:
+ needs:
+ - test_config_load
+ - test_raid1_install
+ - test_smoketest_cli
+ runs-on: ubuntu-24.04
+ permissions:
+ contents: write
+ steps:
+ - uses: actions/checkout@v4
+ - name: Clone vyos-build source code
+ uses: actions/checkout@v4
with:
- name: vyos-${{ env.BUILD_VERSION }}-amd64.iso
- path: ./vyos-${{ env.BUILD_VERSION }}-amd64.iso
- retention-days: 30
- if-no-files-found: error
-
- - name: "Uploading artifacts: ISO image's signature to GitHub"
- id: upload_iso_minisign_artifact
- uses: actions/upload-artifact@v4
+ repository: vyos/vyos-build
+ path: vyos-build
+ - name: Clone vyos-1x source code
+ uses: actions/checkout@v4
with:
- name: vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
- path: ./vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
- retention-days: 30
- if-no-files-found: error
-
-### Release publishing ###
-
- - name: "Release publishing: retrieve the latest success build for vyos-build and vyos-1x"
- id: retrieve_the_latest_success_build_for_vyos-build_vyos-1x
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- run: |
- cd ./vyos-build
- echo "CHANGELOG_COMMIT_build=$(git log --since "${{ env.PREVIOUS_SUCCESS_BUILD_TIMESTAMP }}" --format="%H" --reverse | head -n1)" >> $GITHUB_ENV
+ repository: vyos/vyos-1x
+ path: vyos-1x
+ - id: commit_ids
+ shell: bash
+ run: |
+ cd vyos-build
+ echo "CHANGELOG_COMMIT_build=$(git log --since "${{ env.PREVIOUS_SUCCESS_BUILD_TIMESTAMP }}" --format="%H" --reverse | head -n1)" >> $GITHUB_OUTPUT
cd ../vyos-1x
- echo "CHANGELOG_COMMIT_1x=$(git log --since "${{ env.PREVIOUS_SUCCESS_BUILD_TIMESTAMP }}" --format="%H" --reverse | head -n1)" >> $GITHUB_ENV
- env:
- GH_TOKEN: ${{ github.token }}
+ echo "CHANGELOG_COMMIT_1x=$(git log --since "${{ env.PREVIOUS_SUCCESS_BUILD_TIMESTAMP }}" --format="%H" --reverse | head -n1)" >> $GITHUB_OUTPUT
- name: "Release publishing: generate changelog for vyos-1x"
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING && env.CHANGELOG_COMMIT_1x != '' }}
+ if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
id: generate_changelog_for_vyos-1x
uses: mikepenz/release-changelog-builder-action@v4.1.0
with:
owner: "vyos"
repo: "vyos-1x"
fetchReviewers: false
- fromTag: ${{ env.CHANGELOG_COMMIT_1x }}
+ fromTag: ${{ steps.commit_ids.outputs.CHANGELOG_COMMIT_1x }}
toTag: HEAD
configurationJson: |
{
@@ -322,7 +256,7 @@ jobs:
owner: "vyos"
repo: "vyos-build"
fetchReviewers: false
- fromTag: ${{ env.CHANGELOG_COMMIT_build }}
+ fromTag: ${{ steps.commit_ids.outputs.CHANGELOG_COMMIT_build }}
toTag: HEAD
configurationJson: |
{
@@ -352,18 +286,12 @@ jobs:
json: |
[
{
- "url": "https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/${{ env.BUILD_VERSION }}/vyos-${{ env.BUILD_VERSION }}-amd64.iso",
- "version": "${{ env.BUILD_VERSION }}",
+ "url": "https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64/vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso",
+ "version": "${{ needs.build_iso.outputs.build_version }}",
"timestamp": "${{ env.TIMESTAMP }}"
}
]
- - name: "Release publishing: update Minisign public key"
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- id: update_minisign_public_key
- run: |
- echo "${{ secrets.minisign_public_key }}" > minisign.pub
-
- name: "Release publishing: check if the repository was modified during runtime to prevent autocommit failure"
id: check_if_the_repository_was_modified_during_runtime
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
@@ -376,129 +304,17 @@ jobs:
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
uses: stefanzweifel/git-auto-commit-action@v5
with:
- tagging_message: ${{ env.BUILD_VERSION }}
- commit_message: ${{ env.BUILD_VERSION }}
+ tagging_message: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64
+ commit_message: vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64
- name: "Release publishing: publish release"
id: publish_release
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
+ if: github.ref == 'refs/heads/main'
uses: softprops/action-gh-release@v1
with:
body_path: CHANGELOG.md
- tag_name: ${{ env.BUILD_VERSION }}
+ tag_name: ${{ needs.build_iso.outputs.build_version }}
fail_on_unmatched_files: true
files: |
- ./vyos-${{ env.BUILD_VERSION }}-amd64.iso
- ./vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
-
- - name: "Release publishing: remove old releases"
- id: remove_old_releases
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- uses: dev-drprasad/delete-older-releases@v0.3.2
- with:
- keep_latest: 30
- delete_tags: true
- env:
- GITHUB_TOKEN: ${{ secrets.CUSTOM_GITHUB_TOKEN }}
-
-### Slack notification ###
-
- - name: "Slack notification: identify a failed step"
- id: identify_a_failed_step
- if: ${{ failure() && !inputs.SKIP_SLACK_NOTIFICATIONS }}
- run: |
- echo FAILED_STEP=$((cat <<EOF
- ${{ toJson(steps) }}
- EOF
- ) | jq -r 'to_entries | map(select(.value.conclusion == "failure")) | .[].key' | head -n1) >> "$GITHUB_OUTPUT"
-
- - name: "Slack notification: download Smoketest failed logs"
- id: download_smoketest_failed_logs
- if: ${{ failure() && !inputs.SKIP_SLACK_NOTIFICATIONS && (steps.identify_a_failed_step.outputs.FAILED_STEP == 'smoketest_raid' || steps.identify_a_failed_step.outputs.FAILED_STEP == 'smoketest_system' || steps.identify_a_failed_step.outputs.FAILED_STEP == 'smoketest_configuration') }}
- uses: nicklasfrahm/scp-action@main
- with:
- direction: download
- host: ${{ secrets.SSH_HOST }}
- username: ${{ secrets.SSH_USER }}
- port: ${{ secrets.SSH_PORT }}
- key: ${{ secrets.SSH_KEY }}
- insecure_ignore_fingerprint: true
- source: "~/vyos-build/${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}.log"
- target: "${{ github.workspace }}/${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}.log"
-
- - name: "Slack notification: filter Smoketest failed logs"
- id: filter_smoketest_failed_logs
- if: ${{ failure() && !inputs.SKIP_SLACK_NOTIFICATIONS && (steps.identify_a_failed_step.outputs.FAILED_STEP == 'smoketest_raid' || steps.identify_a_failed_step.outputs.FAILED_STEP == 'smoketest_system' || steps.identify_a_failed_step.outputs.FAILED_STEP == 'smoketest_configuration') }}
- run: |
- cat ${{ github.workspace }}/${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}.log | grep '... FAIL' > ${{ github.workspace }}/smoketest_filtered.log || true
- cat ${{ github.workspace }}/${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}.log | grep 'ERROR -' >> ${{ github.workspace }}/smoketest_filtered.log || true
- cat ${{ github.workspace }}/${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}.log | grep 'Error:' -A12 >> ${{ github.workspace }}/smoketest_filtered.log || true
-
- - name: "Slack notification: send to channel"
- id: send_a_slack_failure_notification
- if: ${{ failure() && !inputs.SKIP_SLACK_NOTIFICATIONS }}
- uses: slackapi/slack-github-action@v1.25.0
- with:
- payload: |
- {
- "text": "*VyOS nightly build automation didn't pass the step with ID \"${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}\"*",
- "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
-
- - name: "Slack notification: send Smoketest log excerpt"
- id: send_smoketest_log_excerpt_to_slack
- if: ${{ failure() && !inputs.SKIP_SLACK_NOTIFICATIONS }}
- uses: MeilCli/slack-upload-file@v4
- with:
- slack_token: ${{ secrets.SLACK_BOT_TOKEN }}
- channel_id: ${{ secrets.SLACK_CHANNEL_ID }}
- file_type: 'text'
- file_path: ${{ github.workspace }}/smoketest_filtered.log
- initial_comment: Smoketest log excerpt
- if_no_files_found: ignore
-
-### Update download page ###
-
- update-downloads-page:
- if: ${{ !inputs.SKIP_DOWNLOADS_PAGE_UPDATE }}
- needs: build-iso
- uses: vyos/community.vyos.net/.github/workflows/main.yml@production
- with:
- branch: production
- secrets:
- NETLIFY_TOKEN: ${{ secrets.NETLIFY_TOKEN }}
- GH_ACCESS_TOKEN: ${{ secrets.GH_ACCESS_TOKEN }}
+ ./vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso
+ ./vyos-${{ needs.build_iso.outputs.build_version }}-generic-amd64.iso.minisig