summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrii Andrieiev <a.andrieiev@sentrium.io>2024-02-22 19:27:02 +0200
committerAndrii Andrieiev <a.andrieiev@sentrium.io>2024-02-22 19:27:02 +0200
commit67c6220ce2c1fa75d87e1d21a93c4abdede3f1a5 (patch)
tree6e0814b5eed9c3d86c46787d437d8d25c86e8733
parent940df8a7b688aed211b49d77cb3d1f4110904a46 (diff)
downloadvyos-rolling-nightly-builds-67c6220ce2c1fa75d87e1d21a93c4abdede3f1a5.tar.gz
vyos-rolling-nightly-builds-67c6220ce2c1fa75d87e1d21a93c4abdede3f1a5.zip
Pipeline refactoring: notifications, sec fixes, testing opts
-rw-r--r--.github/workflows/vyos-rolling-nightly-build.yml328
-rw-r--r--.gitignore3
-rw-r--r--CHANGELOG.md3
-rw-r--r--minisign.pub4
-rw-r--r--version.json6
5 files changed, 236 insertions, 108 deletions
diff --git a/.github/workflows/vyos-rolling-nightly-build.yml b/.github/workflows/vyos-rolling-nightly-build.yml
index abb9c91..86bb6ae 100644
--- a/.github/workflows/vyos-rolling-nightly-build.yml
+++ b/.github/workflows/vyos-rolling-nightly-build.yml
@@ -8,21 +8,31 @@ on:
inputs:
BUILD_BY:
description: 'Builder identifier (if empty autobuild@vyos.net is used)'
- default: 'autobuild@vyos.net'
+ default: ''
BUILD_VERSION:
description: 'Version number (if empty 1.5-rolling-$(date -u +%Y%m%d%H%M) is used)'
default: ''
- SKIP_SMOKETEST_ALL:
- description: 'Skip all smoketests'
+ 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 Smoketest'
+ required: true
+ type: boolean
+ default: false
+ SKIP_SMOKETEST_SYSTEM:
+ description: 'Skip system Smoketest'
+ required: true
+ type: boolean
+ default: false
+ SKIP_SMOKETEST_CONFIG:
+ description: 'Skip config Smoketest'
required: true
type: boolean
default: false
- SKIP_SNAPSHOT_UPLOAD:
+ SKIP_SNAPSHOT_S3_UPLOAD:
description: 'Skip snapshot upload to S3'
required: true
type: boolean
@@ -37,6 +47,11 @@ on:
required: true
type: boolean
default: false
+ SKIP_DOWNLOADS_PAGE_UPDATE:
+ description: 'Skip downloads page update'
+ required: true
+ type: boolean
+ default: false
jobs:
build-iso:
@@ -48,16 +63,17 @@ jobs:
env:
BUILD_BY: autobuild@vyos.net
DEBIAN_MIRROR: http://deb.debian.org/debian/
- SMOKETEST_RAID_COMMAND: 'docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make testraid'
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
steps:
- ### Initialization ###
+### Initialization ###
- uses: actions/checkout@v4
- - name: Set env variables
- id: set_env_vars
+ - name: "Initialization: set env variables"
+ id: set_env_variables
run: |
if [ -n "${{ github.event.inputs.BUILD_BY }}" ]; then
echo "BUILD_BY=${{ github.event.inputs.BUILD_BY }}" >> $GITHUB_ENV
@@ -67,25 +83,26 @@ jobs:
else
echo "BUILD_VERSION=${{ github.event.inputs.BUILD_VERSION }}" >> $GITHUB_ENV
fi
- if [ "${{ github.event.inputs.SKIP_SMOKETEST_RAID1 }}" == "true" ]; then
- echo "SMOKETEST_RAID_COMMAND=" >> $GITHUB_ENV
- 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: Git clone vyos-build
+ - 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: Git clone vyos-1x
+ - 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 ###
+### Smoketest ###
- - name: Build ISO (for Smoketest)
- if: ${{ !inputs.SKIP_SMOKETEST_ALL }}
+ - name: "Smoketest: build ISO image"
+ id: build_iso_for_smoketest
+ if: ${{ !inputs.FAKE_BUILDING_PROCESS && (!inputs.SKIP_SMOKETEST_RAID1 || !inputs.SKIP_SMOKETEST_SYSTEM || !inputs.SKIP_SMOKETEST_CONFIG) }}
run: |
- docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current sudo --preserve-env ./build-vyos-image \
+ ${{ env.DOCKER_CALL }} \
+ sudo --preserve-env ./build-vyos-image \
--architecture amd64 \
--build-by $BUILD_BY \
--build-type release \
@@ -95,18 +112,19 @@ jobs:
--vyos-mirror $VYOS_MIRROR \
iso
- - name: Upload ISO artifact (Smoketest image)
- if: ${{ !inputs.SKIP_SMOKETEST_ALL }}
- uses: actions/upload-artifact@v3
+ - name: "Smoketest: create 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
with:
name: vyos-${{ env.BUILD_VERSION }}-amd64-smoketest.iso
path: ./vyos-build/build/live-image-amd64.hybrid.iso
retention-days: 30
if-no-files-found: error
- - name: Run smoketest
- if: ${{ !inputs.SKIP_SMOKETEST_ALL }}
- id: smoketests
+ - name: "Smoketest: upload 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 }}
@@ -115,26 +133,83 @@ jobs:
user: ${{ secrets.SSH_USER }}
port: ${{ secrets.SSH_PORT }}
key: ${{ secrets.SSH_KEY }}
- connect_timeout: 999s
+ 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/'
- last_ssh: |
- ${{ env.SMOKETEST_RAID_COMMAND }}
- docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make test
- docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo make testc
- docker run --rm --privileged -v ~/vyos-build:/vyos -w /vyos vyos/vyos-build:current sudo rm -rf ./*
- rm -rf ~/vyos-build
timeout-minutes: 300
- ### Building ISO ###
+ - name: "Smoketest: RAID"
+ if: ${{ !inputs.FAKE_BUILDING_PROCESS && !inputs.SKIP_SMOKETEST_RAID1 }}
+ id: smoketest_raid
+ uses: appleboy/ssh-action@v1.0.3
+ 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 }} \
+ sudo scripts/check-qemu-install --logfile smoketest_raid.log --debug --configd --raid --configtest build/live-image-amd64.hybrid.iso
+
+ - name: "Smoketest: system"
+ if: ${{ !inputs.FAKE_BUILDING_PROCESS && !inputs.SKIP_SMOKETEST_SYSTEM }}
+ id: smoketest_system
+ uses: appleboy/ssh-action@v1.0.3
+ 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 }} \
+ sudo scripts/check-qemu-install --logfile smoketest_system.log --debug --match="$(MATCH)" --uefi build/live-image-amd64.hybrid.iso
+
+ - name: "Smoketest: configuration"
+ if: ${{ !inputs.FAKE_BUILDING_PROCESS && !inputs.SKIP_SMOKETEST_CONFIG }}
+ id: smoketest_configuration
+ uses: appleboy/ssh-action@v1.0.3
+ 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 }} \
+ sudo scripts/check-qemu-install --logfile smoketest_configuration.log --debug --configd --configtest build/live-image-amd64.hybrid.iso
+
+ - 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
+ uses: appleboy/ssh-action@v1.0.3
+ with:
+ host: ${{ secrets.SSH_HOST }}
+ username: ${{ secrets.SSH_USER }}
+ port: ${{ secrets.SSH_PORT }}
+ key: ${{ secrets.SSH_KEY }}
+ timeout: 15m
+ command_timeout: 45m
+ script: |
+ ${{ env.DOCKER_CALL_ON_KVM_HOST }} sudo rm -rf ./*
+ rm -rf ~/vyos-build
+
+### Building ###
- - name: Build ISO
+ - name: "Building: create ISO image"
+ if: ${{ !inputs.FAKE_BUILDING_PROCESS }}
+ id: build_iso
run: |
- docker run --rm --privileged -v ./vyos-build/:/vyos -w /vyos vyos/vyos-build:current sudo --preserve-env ./build-vyos-image \
+ ${{ env.DOCKER_CALL }} \
+ sudo --preserve-env ./build-vyos-image \
--architecture amd64 \
--build-by $BUILD_BY \
--build-type release \
@@ -143,66 +218,78 @@ jobs:
--vyos-mirror $VYOS_MIRROR \
iso
- - name: Copy ISO
+ - name: "Building: copy an 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
+ cp ./vyos-build/build/live-image-amd64.hybrid.iso /tmp/vyos-$BUILD_VERSION-amd64.iso
- - name: Sign ISO (Minisign)
+ - name: "Building: fake an ISO image"
+ if: ${{ inputs.FAKE_BUILDING_PROCESS }}
+ id: fake_iso
run: |
- echo 'untrusted comment: minisign encrypted secret key' > minisign.key
- echo $minisign_key >> minisign.key
- shasum minisign.key
- echo $minisign_password | $GITHUB_WORKSPACE/bin/minisign -s minisign.key -Sm ./vyos-$BUILD_VERSION-amd64.iso
- $GITHUB_WORKSPACE/bin/minisign -Vm ./vyos-$BUILD_VERSION-amd64.iso -x ./vyos-$BUILD_VERSION-amd64.iso.minisig -p $GITHUB_WORKSPACE/minisign.pub
- env:
- minisign_key: ${{ secrets.minisign_key }}
- minisign_password: ${{ secrets.minisign_password }}
-
- ### Uploading artifacts ###
+ echo FAKE > /tmp/vyos-$BUILD_VERSION-amd64.iso
- - name: Upload ISO to S3 Glacier
- if: ${{ !inputs.SKIP_SNAPSHOT_UPLOAD }}
+ - 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 /tmp/vyos-$BUILD_VERSION-amd64.iso
+ echo "${{ secrets.minisign_public_key }}" > /tmp/minisign.pub
+ $GITHUB_WORKSPACE/bin/minisign -Vm /tmp/vyos-$BUILD_VERSION-amd64.iso -x /tmp/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
+ source: /tmp/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: Upload ISO's signature to S3 Glacier
- if: ${{ !inputs.SKIP_SNAPSHOT_UPLOAD }}
+ - 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
+ source: /tmp/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
- - name: Upload ISO artifact
- uses: actions/upload-artifact@v3
+ - name: "Uploading artifacts: ISO image to GitHub"
+ id: upload_iso_artifact
+ uses: actions/upload-artifact@v4
with:
name: vyos-${{ env.BUILD_VERSION }}-amd64.iso
- path: ./vyos-${{ env.BUILD_VERSION }}-amd64.iso
+ path: /tmp/vyos-${{ env.BUILD_VERSION }}-amd64.iso
retention-days: 30
if-no-files-found: error
- - name: Upload ISO's Minisign artifact
- uses: actions/upload-artifact@v3
+ - name: "Uploading artifacts: ISO image's signature to GitHub"
+ id: upload_iso_minisign_artifact
+ uses: actions/upload-artifact@v4
with:
name: vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
- path: ./vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
+ path: /tmp/vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
retention-days: 30
if-no-files-found: error
- ### Release publishing ###
+### Release publishing ###
- - name: Retrieve the latest success build for vyos-build and vyos-1x
+ - 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
@@ -212,9 +299,9 @@ jobs:
env:
GH_TOKEN: ${{ github.token }}
- - name: Generate changelog for vyos-1x
+ - name: "Release publishing: generate changelog for vyos-1x"
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING && env.CHANGELOG_COMMIT_1x != '' }}
- id: generate-1x-changelog
+ id: generate_changelog_for_vyos-1x
uses: mikepenz/release-changelog-builder-action@v4.1.0
with:
owner: "vyos"
@@ -229,9 +316,9 @@ jobs:
"pr_template": "- #{{TITLE}}\n - PR: vyos/vyos-1x##{{NUMBER}}"
}
- - name: Generate changelog for vyos-build
- if: ${{ !inputs.SKIP_RELEASE_PUBLISHING && env.CHANGELOG_COMMIT_build != '' }}
- id: generate-build-changelog
+ - name: "Release publishing: generate changelog for vyos-build"
+ if: ${{ !inputs.SKIP_RELEASE_PUBLISHING && env.CHANGELOG_COMMIT_build }}
+ id: generate_changelog_for_vyos-build
uses: mikepenz/release-changelog-builder-action@v4.1.0
with:
owner: "vyos"
@@ -246,21 +333,22 @@ jobs:
"pr_template": "- #{{TITLE}}\n - PR: vyos/vyos-build##{{NUMBER}}"
}
- - name: Generate CHANGELOG.md
+ - name: "Release publishing: generate CHANGELOG.md"
+ id: generate_changelog_md
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
run: |
cat <<EOF > CHANGELOG.md
## vyos-1x
- ${{ steps.generate-1x-changelog.outputs.changelog }}
+ ${{ steps.generate_changelog_for_vyos-1x.outputs.changelog }}
## vyos-build
${{ steps.generate-build-changelog.outputs.changelog }}
EOF
cat CHANGELOG.md
- - name: Create version.json
+ - name: "Release publishing: create version.json"
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- id: create-json
- uses: jsdaniell/create-json@v1.2.2
+ id: create_version_json
+ uses: jsdaniell/create-json@v1.2.3
with:
name: "version.json"
json: |
@@ -272,21 +360,28 @@ jobs:
}
]
+ - name: "Release publishing: update Minisign public key"
+ id: update_minisign_public_key
+ run: |
+ echo "${{ secrets.minisign_public_key }}" > minisign.pub
- - name: Check if the repository was modified during runtime to prevent autocommit failure
+ - 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 }}
run: |
sudo chown -R $(whoami):$(whoami) ./*
git pull --autostash --rebase
- - name: Create autocommit and tag
+ - name: "Release publishing: create autocommit and tag"
+ id: create_autocommit_and_tag
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- uses: stefanzweifel/git-auto-commit-action@v4
+ uses: stefanzweifel/git-auto-commit-action@v5
with:
tagging_message: ${{ env.BUILD_VERSION }}
commit_message: ${{ env.BUILD_VERSION }}
- - name: Publish release
+ - name: "Release publishing: publish release"
+ id: publish_release
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
uses: softprops/action-gh-release@v1
with:
@@ -294,42 +389,63 @@ jobs:
tag_name: ${{ env.BUILD_VERSION }}
fail_on_unmatched_files: true
files: |
- ./vyos-${{ env.BUILD_VERSION }}-amd64.iso
- ./vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
+ /tmp/vyos-${{ env.BUILD_VERSION }}-amd64.iso
+ /tmp/vyos-${{ env.BUILD_VERSION }}-amd64.iso.minisig
- - name: Remove old releases
+ - name: "Release publishing: remove old releases"
+ id: remove_old_releases
if: ${{ !inputs.SKIP_RELEASE_PUBLISHING }}
- uses: dev-drprasad/delete-older-releases@v0.2.1
+ 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: Send Slack notification on workflow failure to Sentrium
- if: failure() && !inputs.SKIP_SLACK_NOTIFICATIONS
- uses: slackapi/slack-github-action@v1.24.0
+### 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:
- payload: |
- {
- "text": "Repository: *${{ github.repository }}*\nWorkflow: ${{ github.workflow }}\nTrigger: ${{ github.event_name }}\nCommit: ${{ github.sha }}\nWorkflow result: ${{ job.status }}\nSmoketests result: ${{ steps.smoketests.conclusion }}\nURL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}"
- }
- env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }}
- SLACK_WEBHOOK_TYPE: INCOMING_WEBHOOK
+ 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: Send Slack notification on smoketests failure to VyOS
- if: failure() && !inputs.SKIP_SLACK_NOTIFICATIONS
- uses: slackapi/slack-github-action@v1.24.0
+ - 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 has been failed*",
+ "text": "*VyOS nightly build automation didn't pass the step with ID \"${{ steps.identify_a_failed_step.outputs.FAILED_STEP }}\"*",
"attachments": [
{
- "color": "FF0000",
+ "color": "FF6600",
"fields": [
{
"title": "Repository",
@@ -347,9 +463,9 @@ jobs:
"value": "${{ github.event_name }}"
},
{
- "title": "Smoketests result",
+ "title": "Run number",
"short": true,
- "value": "${{ steps.smoketests.outcome }}"
+ "value": "${{ github.run_number }}"
},
{
"title": "URL",
@@ -361,10 +477,24 @@ jobs:
]
}
env:
- SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_FOR_MAINTEINERS }}
+ 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_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
secrets:
diff --git a/.gitignore b/.gitignore
index 8e17dc8..74ce16d 100644
--- a/.gitignore
+++ b/.gitignore
@@ -1,4 +1,5 @@
*.DS_Store
vyos-build/
vyos-1x/
-vyos-*-amd64.iso* \ No newline at end of file
+vyos-*-amd64.iso*
+minisign.key \ No newline at end of file
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 6e2cd34..ff7360e 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -1,7 +1,4 @@
## vyos-1x
-- smoketest: T6043: proper cleanup after testcase
- - PR: vyos/vyos-1x#3030
-
## vyos-build
diff --git a/minisign.pub b/minisign.pub
index 29a3082..bbd8dc9 100644
--- a/minisign.pub
+++ b/minisign.pub
@@ -1,2 +1,2 @@
-untrusted comment: minisign public key 21AF69D8B86794DC
-RWTclGe42GmvIX/xnNiXdigNll7NSfpYGl1rj+sEERcLgoEsse5EwAgA
+untrusted comment: minisign public key 7921A9C8E4AE0F98
+RWSYD67kyKkhed0+Kyu3YFVYFMmbDJGgTSIZgoPUsNNlwXvFFj7PjqEc \ No newline at end of file
diff --git a/version.json b/version.json
index 0687af6..af8482b 100644
--- a/version.json
+++ b/version.json
@@ -1,7 +1,7 @@
[
{
- "url": "https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/1.5-rolling-202402190023/vyos-1.5-rolling-202402190023-amd64.iso",
- "version": "1.5-rolling-202402190023",
- "timestamp": "2024-02-19T00:23:50Z"
+ "url": "https://github.com/vyos/vyos-rolling-nightly-builds/releases/download/1.5-rolling-202402220022/vyos-1.5-rolling-202402220022-amd64.iso",
+ "version": "1.5-rolling-202402220022",
+ "timestamp": "2024-02-22T00:22:54Z"
}
] \ No newline at end of file