Workflow file for this run
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
--- | |
# This workflow performs from Testnet to the latest main update. | |
# Test means that net starts from plain (empty) aleph-node chain, bootstraped using starting | |
# node image, and then performs rolling restart to target node image | |
# What this test validates are changes in finalization area to aleph-node binary | |
name: Nightly update net test from Testnet to main | |
on: | |
workflow_dispatch: | |
# Daily at 02:20 | |
schedule: | |
- cron: '20 02 * * *' | |
# tmp, remove | |
push: | |
branches: | |
- A0-3735 | |
concurrency: | |
group: ${{ github.ref }}-${{ github.workflow }} | |
cancel-in-progress: false | |
jobs: | |
check-vars-and-secrets: | |
name: Check vars and secrets | |
uses: ./.github/workflows/_check-vars-and-secrets.yml | |
secrets: inherit | |
get-net-names: | |
needs: [check-vars-and-secrets] | |
name: Get aleph-node main SHA | |
outputs: | |
updatenet-testnet-name: ${{ steps.get-featurenet-name.outputs.updatenet-testnet-name }} | |
updatenet-mainnet-name: ${{ steps.get-featurenet-name.outputs.updatenet-mainnet-name }} | |
aleph-node-main-hash: ${{ steps.get-update-hashes.outputs.update-hash }} | |
runs-on: ubuntu-20.04 | |
steps: | |
- name: Get featurenet name | |
id: get-featurenet-name | |
run: | | |
echo "updatenet-testnet-name=ops-updatenet-testnet" >> $GITHUB_OUTPUT | |
echo "updatenet-mainnet-name=ops-updatenet-mainnet" >> $GITHUB_OUTPUT | |
get-full-docker-image-path-testnet: | |
name: Get full aleph-node full docker path path for testnet | |
needs: [check-vars-and-secrets] | |
runs-on: ubuntu-20.04 | |
outputs: | |
fqdn-image: ${{ steps.get-aleph-node-fqdn-image.outputs.fqdn-image }} | |
ref: ${{ steps.get-aleph-node-fqdn-image.outputs.ref }} | |
image-exists: ${{ steps.get-aleph-node-fqdn-image.outputs.image-exists }} | |
steps: | |
- name: Get aleph-node fqdn path | |
id: get-aleph-node-fqdn-image | |
uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 | |
with: | |
ref: 'testnet' | |
test-binary: 'false' | |
ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} | |
ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} | |
get-full-docker-image-path-main-branch: | |
name: Get full aleph-node full docker path path for mainnet | |
needs: [check-vars-and-secrets] | |
runs-on: ubuntu-20.04 | |
outputs: | |
fqdn-image: ${{ steps.get-aleph-node-fqdn-image.outputs.fqdn-image }} | |
ref: ${{ steps.get-aleph-node-fqdn-image.outputs.ref }} | |
image-exists: ${{ steps.get-aleph-node-fqdn-image.outputs.image-exists }} | |
steps: | |
- name: Get aleph-node fqdn path | |
id: get-aleph-node-fqdn-image | |
uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 | |
with: | |
ref: 'main' | |
test-binary: 'false' | |
ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} | |
ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} | |
create-featurenet-from-testnet: | |
needs: [get-full-docker-image-path-testnet] | |
name: Create featurenet from testnet | |
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v6 | |
secrets: inherit | |
with: | |
featurenet-name: 'ops-updatenet-testnet' | |
aleph-node-image: ${{ needs.get-full-docker-image-path-testnet.outputs.fqdn-image }} | |
expiration: '4h' | |
validators: '7' | |
internal: true | |
delete-first: true | |
update-featurenet-to-main: | |
needs: | |
- create-featurenet-from-testnet | |
- get-full-docker-image-path-main-branch | |
name: Update featurenet from testnet to main image | |
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v6 | |
secrets: inherit | |
with: | |
featurenet-name: 'ops-updatenet-testnet' | |
aleph-node-image: ${{ needs.get-full-docker-image-path-main-branch.outputs.fqdn-image }} | |
expiration: '4h' | |
rolling-update-partition: '0' | |
validators: '7' | |
internal: true | |
delete-featurenet: | |
if: ${{ always() }} | |
needs: [update-featurenet-to-main] | |
name: Delete featurenet from testnet | |
uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v5 | |
secrets: inherit | |
with: | |
featurenet-name: 'ops-updatenet-testnet' | |
# slack-notification: | |
# name: Slack notification | |
# runs-on: ubuntu-20.04 | |
# needs: [delete-featurenet] | |
# if: > | |
# !cancelled() && | |
# github.event_name != 'workflow_dispatch' | |
# steps: | |
# - name: Checkout repository | |
# uses: actions/checkout@v4 | |
# | |
# - name: Send Slack message | |
# uses: ./.github/actions/slack-notification | |
# with: | |
# notify-on: "failure" | |
# env: | |
# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} |