From 8d87c974ec09604da7d6cf23933fb22e52868429 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 13 May 2024 13:54:53 +0200 Subject: [PATCH 01/19] A0-4268: chain-bootstrapper CI --- .../_build-and-push-featurenet-node-image.yml | 47 ++++--------------- .github/workflows/_check-vars-and-secrets.yml | 1 + ...mage-to-ecr.yml => _push-image-to-ecr.yml} | 26 +++++----- .github/workflows/featurenet-create.yml | 35 ++++++++++++-- .github/workflows/featurenet-update.yml | 10 ++-- .github/workflows/nightly-fe-e2e-tests.yml | 10 ++-- .../on-main-or-release-branch-commit.yml | 34 +++++++++++--- 7 files changed, 92 insertions(+), 71 deletions(-) rename .github/workflows/{_push-node-image-to-ecr.yml => _push-image-to-ecr.yml} (66%) diff --git a/.github/workflows/_build-and-push-featurenet-node-image.yml b/.github/workflows/_build-and-push-featurenet-node-image.yml index fe9c6fcfc0..6f232dd267 100644 --- a/.github/workflows/_build-and-push-featurenet-node-image.yml +++ b/.github/workflows/_build-and-push-featurenet-node-image.yml @@ -32,45 +32,14 @@ jobs: ref: ${{ inputs.ref }} build-and-push-featurnet-image-to-ecr: - name: Build and push featurnet image + name: Build and push featurnet image to ECR needs: [build-test-node, build-production-node-and-runtime] # this job should not be skipped in case one of its parent job is skipped if: ${{ !cancelled() }} - runs-on: ubuntu-20.04 - steps: - - name: Checkout aleph-node - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - fetch-depth: 0 - - - name: Download aleph-node artifact - uses: actions/download-artifact@v4 - env: - TARGET_PATH: ${{ inputs.short-session == true && 'release' || 'production' }} - ARTIFACT: ${{ inputs.short-session == true && - 'aleph-test-node' || 'aleph-production-node' }} - with: - name: ${{ env.ARTIFACT }} - path: target/release/ - - - name: Build docker image with PR aleph-node binary - run: | - chmod +x target/release/aleph-node - ls -alh target/release/ - ls -alh ./docker/ - docker build \ - --tag '${{ inputs.fqdn-image }}' \ - -f ./docker/Dockerfile . - - - name: Login to ECR - uses: docker/login-action@v3 - with: - registry: ${{ vars.ECR_PUBLIC_HOST }} - username: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} - password: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} - - - name: Push image to the ECR registry - id: push-image - run: | - docker push '${{ inputs.fqdn-image }}' + uses: ./.github/workflows/_push-image-to-ecr.yml + secrets: inherit + with: + binary-artifact-name: aleph-${{ inputs.short-session == true && 'test' || 'production' }}-node + docker-image-name: ${{ inputs.fqdn-image }} + binary-name: aleph-node + docker-file-path: ./docker/Dockerfile diff --git a/.github/workflows/_check-vars-and-secrets.yml b/.github/workflows/_check-vars-and-secrets.yml index 98b1dd3cbf..fea3c577c9 100644 --- a/.github/workflows/_check-vars-and-secrets.yml +++ b/.github/workflows/_check-vars-and-secrets.yml @@ -15,6 +15,7 @@ jobs: if [[ \ -z '${{ vars.ECR_PUBLIC_HOST }}' || \ -z '${{ vars.ECR_PUBLIC_REGISTRY }}' || \ + -z '${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }}' || \ -z '${{ vars.DOCKERHUB_ALEPH_NODE_REPO }}' || \ -z '${{ vars.ECR_ALEPH_NODE_REPO }}' || \ -z '${{ vars.ECR_DEV_ALEPH_NODE_REPO }}' || \ diff --git a/.github/workflows/_push-node-image-to-ecr.yml b/.github/workflows/_push-image-to-ecr.yml similarity index 66% rename from .github/workflows/_push-node-image-to-ecr.yml rename to .github/workflows/_push-image-to-ecr.yml index 3e1865182a..2e1d9df349 100644 --- a/.github/workflows/_push-node-image-to-ecr.yml +++ b/.github/workflows/_push-image-to-ecr.yml @@ -1,5 +1,5 @@ --- -# This workflow builds arbitrary docker node image based on binary downloaded in GH artifacts +# This workflow builds arbitrary docker image based on binary downloaded in GH artifacts name: Build and push docker image to ECR on: workflow_call: @@ -13,13 +13,17 @@ on: required: true type: string docker-image-name: - description: 'Name of node docker image to be uploaded to ECR' + description: 'Name of docker image to be uploaded to ECR' required: true type: string docker-file-path: description: 'Path to Dockerfile' required: true type: string + docker-image-name-latest: + description: 'Name of latest docker image to be uploaded to ECR' + required: false + type: string jobs: main: @@ -44,7 +48,7 @@ jobs: run: | chmod +x target/release/${{ inputs.binary-name }} docker build \ - --tag ${{ inputs.docker-image-name }}:latest \ + --tag ${{ inputs.docker-image-name }} \ -f ${{ inputs.docker-file-path }} . - name: Login to Public Amazon ECR @@ -55,15 +59,11 @@ jobs: username: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} password: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} - - name: Push ${{ inputs.docker-image-name }} image to ECR - env: - CURRENT_IMAGE: ${{ inputs.docker-image-name }} - ECR_PUSH_IMAGE: ${{ vars.ECR_PUBLIC_REGISTRY }}${{ inputs.docker-image-name }} + - name: Push image to ECR run: | - docker tag '${{ env.CURRENT_IMAGE }}' \ - '${{ env.ECR_PUSH_IMAGE }}:${{ steps.get-ref-properties.outputs.sha }}' - docker push '${{ env.ECR_PUSH_IMAGE }}:${{ steps.get-ref-properties.outputs.sha }}' - if [[ '${{ steps.get-ref-properties.outputs.branch }}' -eq 'main' ]]; then - docker tag '${{ env.CURRENT_IMAGE }}' '${{ env.ECR_PUSH_IMAGE }}:latest' - docker push '${{ env.ECR_PUSH_IMAGE }}:latest' + docker push '${{ inputs.docker-image-name }}' + if [[ '${{ steps.get-ref-properties.outputs.branch }}' -eq 'main' && \ + '${{ inputs.docker-image-name-latest }}' != '' ]]; then + docker tag '${{ inputs.docker-image-name }}' '${{ inputs.docker-image-name-latest }}' + docker push '${{ inputs.docker-image-name-latest }}' fi diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index 445a6106bf..4faba98a38 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -106,18 +106,21 @@ jobs: 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 }} + fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} + ref: ${{ steps.get-fqdns.outputs.ref }} + image-exists: ${{ steps.get-fqdns.outputs.image-exists }} + chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }} + chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }} steps: - name: Get aleph-node fqdn path - id: get-aleph-node-fqdn-image + id: get-fqdns uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 with: ref: ${{ inputs.ref }} - test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} + ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} + only-aleph-nope-production-repo: 'false' build-and-push-featurenet-node-image: needs: [get-full-docker-image-path] @@ -130,6 +133,27 @@ jobs: short-session: ${{ inputs.short-session }} secrets: inherit + build-chain-bootstrapper: + needs: [get-full-docker-image-path] + if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }} + name: Build chain-bootstrapper + uses: ./.github/workflows/_build-chain-bootstrapper.yml + with: + ref: ${{ needs.get-full-docker-image-path.outputs.ref }} + production: ${{ !inputs.short-session }} + + push-chain-bootstrapper-image-to-ecr: + name: Push chain-bootstrapper docker image to ECR + if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }} + needs: [build-chain-bootstrapper] + uses: ./.github/workflows/_push-image-to-ecr.yml + secrets: inherit + with: + binary-artifact-name: chain-bootstrapper-${{ inputs.short-session && 'release' || 'production' }} + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} + binary-name: chain-bootstrapper + docker-file-path: ./bin/chain-bootstrapper/Dockerfile + create-featurenet: needs: [get-full-docker-image-path, build-and-push-featurenet-node-image] # to prevent this job to be skipped when on of the parent jobs is skipped @@ -140,6 +164,7 @@ jobs: with: featurenet-name: ${{ inputs.featurenet-name }} aleph-node-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + chain-bootstrapper-image: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} validators: ${{ inputs.validators }} expiration: ${{ inputs.expiration }} internal: ${{ inputs.internal && true || false }} diff --git a/.github/workflows/featurenet-update.yml b/.github/workflows/featurenet-update.yml index 375aa6f802..1be21967fd 100644 --- a/.github/workflows/featurenet-update.yml +++ b/.github/workflows/featurenet-update.yml @@ -74,18 +74,20 @@ jobs: 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 }} + fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} + ref: ${{ steps.get-fqdns.outputs.ref }} + image-exists: ${{ steps.get-fqdns.outputs.image-exists }} steps: - name: Get aleph-node fqdn path - id: get-aleph-node-fqdn-image + id: get-fqdns uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 with: ref: ${{ inputs.ref }} test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} + ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} + only-aleph-nope-production-repo: 'false' build-and-push-featurenet-node-image: needs: [get-full-docker-image-path] diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index f4edbac263..7e3b08392a 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -29,18 +29,19 @@ jobs: 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 }} + fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} + ref: ${{ steps.get-fqdns.outputs.ref }} + image-exists: ${{ steps.get-fqdns.outputs.image-exists }} steps: - name: Get aleph-node fqdn path from ${{ github.ref }} - id: get-aleph-node-fqdn-image + id: get-fqdns uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 with: ref: ${{ github.ref }} test-binary: 'false' ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} + ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} build-and-push-featurenet-node-image: needs: [get-full-docker-image-path] @@ -64,6 +65,7 @@ jobs: with: featurenet-name: 'ops-finalization-e2e' aleph-node-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + chain-bootstrapper-image: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} validators: '6' expiration: '3h' internal: true diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 011aaa661d..f6c0308466 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -13,6 +13,26 @@ jobs: uses: ./.github/workflows/_check-vars-and-secrets.yml secrets: inherit + get-full-docker-image-path: + name: Get aleph-node and chain-bootstrapper fqdn paths + needs: [check-vars-and-secrets] + runs-on: ubuntu-20.04 + outputs: + fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} + ref: ${{ steps.get-fqdns.outputs.ref }} + image-exists: ${{ steps.get-fqdns.outputs.image-exists }} + chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }} + chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }} + steps: + - name: Get FQDNs + id: get-fqdns + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 + with: + ref: ${{ github.ref }} + ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} + ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} + ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} + build-chain-bootstrapper: needs: [check-vars-and-secrets] name: Build chain-bootstrapper @@ -22,13 +42,14 @@ jobs: production: true push-chain-bootstrapper-image-to-ecr: + needs: [build-chain-bootstrapper, get-full-docker-image-path] name: Push chain-bootstrapper docker image to ECR - needs: [build-chain-bootstrapper] - uses: ./.github/workflows/_push-node-image-to-ecr.yml + uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: binary-artifact-name: chain-bootstrapper-release - docker-image-name: chain-bootstrapper + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} + docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image-latest }} binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile @@ -78,12 +99,13 @@ jobs: push-production-node-image-to-ecr: name: Push production node docker image to ECR - needs: [build-production-node-and-runtime] - uses: ./.github/workflows/_push-node-image-to-ecr.yml + needs: [build-production-node-and-runtime, get-full-docker-image-path] + uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: binary-artifact-name: aleph-production-node - docker-image-name: aleph-node + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} binary-name: aleph-node docker-file-path: ./docker/Dockerfile From 96a2d295affeba3f5202964a53fadc854b7a72ef Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 13 May 2024 13:58:51 +0200 Subject: [PATCH 02/19] Yamllinter --- .../workflows/_build-and-push-featurenet-node-image.yml | 2 +- .github/workflows/_push-image-to-ecr.yml | 2 +- .github/workflows/featurenet-create.yml | 4 ++++ .github/workflows/nightly-fe-e2e-tests.yml | 1 + .github/workflows/on-main-or-release-branch-commit.yml | 8 ++++++-- 5 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_build-and-push-featurenet-node-image.yml b/.github/workflows/_build-and-push-featurenet-node-image.yml index 6f232dd267..142752f744 100644 --- a/.github/workflows/_build-and-push-featurenet-node-image.yml +++ b/.github/workflows/_build-and-push-featurenet-node-image.yml @@ -40,6 +40,6 @@ jobs: secrets: inherit with: binary-artifact-name: aleph-${{ inputs.short-session == true && 'test' || 'production' }}-node - docker-image-name: ${{ inputs.fqdn-image }} + docker-image-name: ${{ inputs.fqdn-image }} binary-name: aleph-node docker-file-path: ./docker/Dockerfile diff --git a/.github/workflows/_push-image-to-ecr.yml b/.github/workflows/_push-image-to-ecr.yml index 2e1d9df349..455c7e8ffc 100644 --- a/.github/workflows/_push-image-to-ecr.yml +++ b/.github/workflows/_push-image-to-ecr.yml @@ -64,6 +64,6 @@ jobs: docker push '${{ inputs.docker-image-name }}' if [[ '${{ steps.get-ref-properties.outputs.branch }}' -eq 'main' && \ '${{ inputs.docker-image-name-latest }}' != '' ]]; then - docker tag '${{ inputs.docker-image-name }}' '${{ inputs.docker-image-name-latest }}' + docker tag '${{ inputs.docker-image-name }}' '${{ inputs.docker-image-name-latest }}' docker push '${{ inputs.docker-image-name-latest }}' fi diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index 4faba98a38..63e324681f 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -109,6 +109,7 @@ jobs: fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} ref: ${{ steps.get-fqdns.outputs.ref }} image-exists: ${{ steps.get-fqdns.outputs.image-exists }} + # yamllint disable-line rule:line-length chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }} chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }} steps: @@ -149,7 +150,9 @@ jobs: uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: + # yamllint disable-line rule:line-length binary-artifact-name: chain-bootstrapper-${{ inputs.short-session && 'release' || 'production' }} + # yamllint disable-line rule:line-length docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile @@ -164,6 +167,7 @@ jobs: with: featurenet-name: ${{ inputs.featurenet-name }} aleph-node-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + # yamllint disable-line rule:line-length chain-bootstrapper-image: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} validators: ${{ inputs.validators }} expiration: ${{ inputs.expiration }} diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index 7e3b08392a..1e3ab5739c 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -65,6 +65,7 @@ jobs: with: featurenet-name: 'ops-finalization-e2e' aleph-node-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + # yamllint disable-line rule:line-length chain-bootstrapper-image: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} validators: '6' expiration: '3h' diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index f6c0308466..46b947072c 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -21,6 +21,7 @@ jobs: fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} ref: ${{ steps.get-fqdns.outputs.ref }} image-exists: ${{ steps.get-fqdns.outputs.image-exists }} + # yamllint disable-line rule:line-length chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }} chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }} steps: @@ -48,7 +49,9 @@ jobs: secrets: inherit with: binary-artifact-name: chain-bootstrapper-release + # yamllint disable-line rule:line-length docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} + # yamllint disable-line rule:line-length docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image-latest }} binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile @@ -104,8 +107,9 @@ jobs: secrets: inherit with: binary-artifact-name: aleph-production-node - docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} - docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + # yamllint disable-line rule:line-length + docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} binary-name: aleph-node docker-file-path: ./docker/Dockerfile From 70442ead6f7b09b1e45df271d3a9b1ee1e5ac45a Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 13 May 2024 14:09:56 +0200 Subject: [PATCH 03/19] yamlvalidator --- .github/workflows/featurenet-create.yml | 1 + .github/workflows/on-main-or-release-branch-commit.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index 63e324681f..9394684bcf 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -118,6 +118,7 @@ jobs: uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 with: ref: ${{ inputs.ref }} + test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 46b947072c..a8763411e0 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -33,6 +33,7 @@ jobs: ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} + test-binary: 'false' build-chain-bootstrapper: needs: [check-vars-and-secrets] From 32b1760fbbebda73ca65dea039d366bb5cc1da8a Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 13 May 2024 14:22:22 +0200 Subject: [PATCH 04/19] Testing --- .github/workflows/featurenet-create.yml | 4 ++-- .github/workflows/featurenet-update.yml | 4 ++-- .github/workflows/nightly-fe-e2e-tests.yml | 2 +- .github/workflows/on-main-or-release-branch-commit.yml | 2 +- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index 9394684bcf..f9314d6f19 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -115,7 +115,7 @@ jobs: steps: - name: Get aleph-node fqdn path id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 with: ref: ${{ inputs.ref }} test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} @@ -163,7 +163,7 @@ jobs: # to prevent this job to be skipped when on of the parent jobs is skipped if: ${{ !cancelled() }} name: Create featurenet - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v6 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@A0-4268 secrets: inherit with: featurenet-name: ${{ inputs.featurenet-name }} diff --git a/.github/workflows/featurenet-update.yml b/.github/workflows/featurenet-update.yml index 1be21967fd..9684a9a9c2 100644 --- a/.github/workflows/featurenet-update.yml +++ b/.github/workflows/featurenet-update.yml @@ -80,7 +80,7 @@ jobs: steps: - name: Get aleph-node fqdn path id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 with: ref: ${{ inputs.ref }} test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} @@ -105,7 +105,7 @@ jobs: # to prevent this job to be skipped when on of the parent jobs is skipped if: ${{ !cancelled() }} name: Update featurenet - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-update.yml@v6 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-update.yml@A0-4268 secrets: inherit with: featurenet-name: ${{ inputs.featurenet-name }} diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index 1e3ab5739c..2576eeb03b 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -35,7 +35,7 @@ jobs: steps: - name: Get aleph-node fqdn path from ${{ github.ref }} id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 with: ref: ${{ github.ref }} test-binary: 'false' diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index a8763411e0..0e2767e73a 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -27,7 +27,7 @@ jobs: steps: - name: Get FQDNs id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v6 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 with: ref: ${{ github.ref }} ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} From cab039d959ee3c9324c31497a17c6bf5f0f3ffcc Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 07:53:35 +0200 Subject: [PATCH 05/19] Testing on push to main workflow --- .../on-main-or-release-branch-commit.yml | 171 +++++++++--------- bin/chain-bootstrapper/Dockerfile | 3 + 2 files changed, 89 insertions(+), 85 deletions(-) diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 0e2767e73a..9704678850 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -6,6 +6,7 @@ on: branches: - main - 'release-*' + - A0-4268 jobs: check-vars-and-secrets: @@ -57,88 +58,88 @@ jobs: binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile - build-and-push-cliain: - needs: [check-vars-and-secrets] - name: Build and push cliain - uses: ./.github/workflows/_build-and-push-cliain.yml - secrets: inherit - with: - check-only: false - - build-aleph-e2e-client-image: - needs: [check-vars-and-secrets] - name: Build aleph-e2e-client image - uses: ./.github/workflows/_build-aleph-e2e-client-image.yml - with: - ref: ${{ github.ref }} - push: true - secrets: inherit - - build-production-node-and-runtime: - needs: [check-vars-and-secrets] - name: Build production node and runtime - uses: ./.github/workflows/_build-production-node-and-runtime.yml - with: - ref: ${{ github.ref }} - - check-runtime-determinism: - needs: [build-production-node-and-runtime] - uses: ./.github/workflows/_check-runtime-determimism.yml - - store-production-node-and-runtime-in-mainnet-s3: - name: Store production node and runtime in Mainnet bucket - runs-on: ubuntu-20.04 - needs: [build-production-node-and-runtime] - steps: - - name: Checkout aleph-node source code - uses: actions/checkout@v4 - - - name: Store production node and runtime - uses: ./.github/actions/store-node-and-runtime - with: - profile: production - aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} - aws-bucket: ${{ secrets.CI_MAINNET_S3BUCKET_NAME }} - - push-production-node-image-to-ecr: - name: Push production node docker image to ECR - needs: [build-production-node-and-runtime, get-full-docker-image-path] - uses: ./.github/workflows/_push-image-to-ecr.yml - secrets: inherit - with: - binary-artifact-name: aleph-production-node - docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} - # yamllint disable-line rule:line-length - docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} - binary-name: aleph-node - docker-file-path: ./docker/Dockerfile - - send-slack-notification-release: - name: Send Slack notification about workflow status - runs-on: ubuntu-20.04 - if: always() && startsWith(github.ref_name, 'release-') - needs: [push-production-node-image-to-ecr] - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 - with: - notify-on: "always" - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} - - send-slack-notification-main: - name: Send Slack notification about workflow status - runs-on: ubuntu-20.04 - if: always() && github.ref_name == 'main' - needs: [push-production-node-image-to-ecr] - steps: - - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 - with: - notify-on: "failure" - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} +# build-and-push-cliain: +# needs: [check-vars-and-secrets] +# name: Build and push cliain +# uses: ./.github/workflows/_build-and-push-cliain.yml +# secrets: inherit +# with: +# check-only: false +# +# build-aleph-e2e-client-image: +# needs: [check-vars-and-secrets] +# name: Build aleph-e2e-client image +# uses: ./.github/workflows/_build-aleph-e2e-client-image.yml +# with: +# ref: ${{ github.ref }} +# push: true +# secrets: inherit +# +# build-production-node-and-runtime: +# needs: [check-vars-and-secrets] +# name: Build production node and runtime +# uses: ./.github/workflows/_build-production-node-and-runtime.yml +# with: +# ref: ${{ github.ref }} +# +# check-runtime-determinism: +# needs: [build-production-node-and-runtime] +# uses: ./.github/workflows/_check-runtime-determimism.yml +# +# store-production-node-and-runtime-in-mainnet-s3: +# name: Store production node and runtime in Mainnet bucket +# runs-on: ubuntu-20.04 +# needs: [build-production-node-and-runtime] +# steps: +# - name: Checkout aleph-node source code +# uses: actions/checkout@v4 +# +# - name: Store production node and runtime +# uses: ./.github/actions/store-node-and-runtime +# with: +# profile: production +# aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} +# aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} +# aws-bucket: ${{ secrets.CI_MAINNET_S3BUCKET_NAME }} +# +# push-production-node-image-to-ecr: +# name: Push production node docker image to ECR +# needs: [build-production-node-and-runtime, get-full-docker-image-path] +# uses: ./.github/workflows/_push-image-to-ecr.yml +# secrets: inherit +# with: +# binary-artifact-name: aleph-production-node +# docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} +# # yamllint disable-line rule:line-length +# docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} +# binary-name: aleph-node +# docker-file-path: ./docker/Dockerfile +# +# send-slack-notification-release: +# name: Send Slack notification about workflow status +# runs-on: ubuntu-20.04 +# if: always() && startsWith(github.ref_name, 'release-') +# needs: [push-production-node-image-to-ecr] +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# +# - name: Send Slack message +# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 +# with: +# notify-on: "always" +# env: +# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} +# +# send-slack-notification-main: +# name: Send Slack notification about workflow status +# runs-on: ubuntu-20.04 +# if: always() && github.ref_name == 'main' +# needs: [push-production-node-image-to-ecr] +# steps: +# - name: Send Slack message +# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 +# with: +# notify-on: "failure" +# env: +# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} diff --git a/bin/chain-bootstrapper/Dockerfile b/bin/chain-bootstrapper/Dockerfile index 92147703a6..bc13084039 100644 --- a/bin/chain-bootstrapper/Dockerfile +++ b/bin/chain-bootstrapper/Dockerfile @@ -1,5 +1,8 @@ FROM ubuntu:jammy +RUN apt update && \ + apt install curl -y + COPY target/release/chain-bootstrapper /usr/local/bin RUN chmod +x /usr/local/bin/chain-bootstrapper From 6c8dceb0a31416a331f5bc18680f66dafa12c58b Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 09:10:28 +0200 Subject: [PATCH 06/19] Added key generate command to chain-bootstrapper --- .../on-main-or-release-branch-commit.yml | 171 +++++++++--------- bin/chain-bootstrapper/src/main.rs | 38 ++++ 2 files changed, 123 insertions(+), 86 deletions(-) diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 9704678850..0e2767e73a 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -6,7 +6,6 @@ on: branches: - main - 'release-*' - - A0-4268 jobs: check-vars-and-secrets: @@ -58,88 +57,88 @@ jobs: binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile -# build-and-push-cliain: -# needs: [check-vars-and-secrets] -# name: Build and push cliain -# uses: ./.github/workflows/_build-and-push-cliain.yml -# secrets: inherit -# with: -# check-only: false -# -# build-aleph-e2e-client-image: -# needs: [check-vars-and-secrets] -# name: Build aleph-e2e-client image -# uses: ./.github/workflows/_build-aleph-e2e-client-image.yml -# with: -# ref: ${{ github.ref }} -# push: true -# secrets: inherit -# -# build-production-node-and-runtime: -# needs: [check-vars-and-secrets] -# name: Build production node and runtime -# uses: ./.github/workflows/_build-production-node-and-runtime.yml -# with: -# ref: ${{ github.ref }} -# -# check-runtime-determinism: -# needs: [build-production-node-and-runtime] -# uses: ./.github/workflows/_check-runtime-determimism.yml -# -# store-production-node-and-runtime-in-mainnet-s3: -# name: Store production node and runtime in Mainnet bucket -# runs-on: ubuntu-20.04 -# needs: [build-production-node-and-runtime] -# steps: -# - name: Checkout aleph-node source code -# uses: actions/checkout@v4 -# -# - name: Store production node and runtime -# uses: ./.github/actions/store-node-and-runtime -# with: -# profile: production -# aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} -# aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} -# aws-bucket: ${{ secrets.CI_MAINNET_S3BUCKET_NAME }} -# -# push-production-node-image-to-ecr: -# name: Push production node docker image to ECR -# needs: [build-production-node-and-runtime, get-full-docker-image-path] -# uses: ./.github/workflows/_push-image-to-ecr.yml -# secrets: inherit -# with: -# binary-artifact-name: aleph-production-node -# docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} -# # yamllint disable-line rule:line-length -# docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} -# binary-name: aleph-node -# docker-file-path: ./docker/Dockerfile -# -# send-slack-notification-release: -# name: Send Slack notification about workflow status -# runs-on: ubuntu-20.04 -# if: always() && startsWith(github.ref_name, 'release-') -# needs: [push-production-node-image-to-ecr] -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 -# -# - name: Send Slack message -# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 -# with: -# notify-on: "always" -# env: -# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} -# -# send-slack-notification-main: -# name: Send Slack notification about workflow status -# runs-on: ubuntu-20.04 -# if: always() && github.ref_name == 'main' -# needs: [push-production-node-image-to-ecr] -# steps: -# - name: Send Slack message -# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 -# with: -# notify-on: "failure" -# env: -# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} + build-and-push-cliain: + needs: [check-vars-and-secrets] + name: Build and push cliain + uses: ./.github/workflows/_build-and-push-cliain.yml + secrets: inherit + with: + check-only: false + + build-aleph-e2e-client-image: + needs: [check-vars-and-secrets] + name: Build aleph-e2e-client image + uses: ./.github/workflows/_build-aleph-e2e-client-image.yml + with: + ref: ${{ github.ref }} + push: true + secrets: inherit + + build-production-node-and-runtime: + needs: [check-vars-and-secrets] + name: Build production node and runtime + uses: ./.github/workflows/_build-production-node-and-runtime.yml + with: + ref: ${{ github.ref }} + + check-runtime-determinism: + needs: [build-production-node-and-runtime] + uses: ./.github/workflows/_check-runtime-determimism.yml + + store-production-node-and-runtime-in-mainnet-s3: + name: Store production node and runtime in Mainnet bucket + runs-on: ubuntu-20.04 + needs: [build-production-node-and-runtime] + steps: + - name: Checkout aleph-node source code + uses: actions/checkout@v4 + + - name: Store production node and runtime + uses: ./.github/actions/store-node-and-runtime + with: + profile: production + aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} + aws-bucket: ${{ secrets.CI_MAINNET_S3BUCKET_NAME }} + + push-production-node-image-to-ecr: + name: Push production node docker image to ECR + needs: [build-production-node-and-runtime, get-full-docker-image-path] + uses: ./.github/workflows/_push-image-to-ecr.yml + secrets: inherit + with: + binary-artifact-name: aleph-production-node + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + # yamllint disable-line rule:line-length + docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} + binary-name: aleph-node + docker-file-path: ./docker/Dockerfile + + send-slack-notification-release: + name: Send Slack notification about workflow status + runs-on: ubuntu-20.04 + if: always() && startsWith(github.ref_name, 'release-') + needs: [push-production-node-image-to-ecr] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Send Slack message + uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + with: + notify-on: "always" + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} + + send-slack-notification-main: + name: Send Slack notification about workflow status + runs-on: ubuntu-20.04 + if: always() && github.ref_name == 'main' + needs: [push-production-node-image-to-ecr] + steps: + - name: Send Slack message + uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + with: + notify-on: "failure" + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} diff --git a/bin/chain-bootstrapper/src/main.rs b/bin/chain-bootstrapper/src/main.rs index 4ba27a10a9..87eef75514 100644 --- a/bin/chain-bootstrapper/src/main.rs +++ b/bin/chain-bootstrapper/src/main.rs @@ -1,6 +1,8 @@ mod chain_spec; +use sc_chain_spec::ChainSpec; use sc_cli::clap::{self, Parser, Subcommand as ClapSubcommand}; +use sc_cli::SubstrateCli; use crate::chain_spec::{BootstrapChainCmd, ConvertChainspecToRawCmd}; @@ -10,6 +12,36 @@ struct Cli { pub subcommand: Option, } +impl SubstrateCli for Cli { + fn impl_name() -> String { + panic!("This is not used.") + } + + fn impl_version() -> String { + panic!("This is not used.") + } + + fn description() -> String { + panic!("This is not used.") + } + + fn author() -> String { + panic!("This is not used.") + } + + fn support_url() -> String { + panic!("This is not used.") + } + + fn copyright_start_year() -> i32 { + panic!("This is not used.") + } + + fn load_spec(&self, _id: &str) -> Result, String> { + panic!("This is not used.") + } +} + #[allow(clippy::large_enum_variant)] #[derive(Debug, ClapSubcommand)] pub enum Subcommand { @@ -18,6 +50,10 @@ pub enum Subcommand { /// Takes a chainspec and generates a corresponding raw chainspec ConvertChainspecToRaw(ConvertChainspecToRawCmd), + + /// Key management cli utilities + #[command(subcommand)] + Key(sc_cli::KeySubcommand), } fn main() -> sc_cli::Result<()> { @@ -26,6 +62,8 @@ fn main() -> sc_cli::Result<()> { match &cli.subcommand { Some(Subcommand::BootstrapChain(cmd)) => cmd.run(), Some(Subcommand::ConvertChainspecToRaw(cmd)) => cmd.run(), + Some(Subcommand::Key(cmd)) => cmd.run(&cli), + None => Err("Command was required!".into()), } From a654e5a50d123d77bd48fee53e44da84c21dee3f Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 09:34:46 +0200 Subject: [PATCH 07/19] Fixed an issue in which uploaded artifact name does not match in push image workflow --- .github/workflows/_build-chain-bootstrapper.yml | 9 ++++++++- .github/workflows/featurenet-create.yml | 3 +-- .github/workflows/on-main-or-release-branch-commit.yml | 2 +- 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/_build-chain-bootstrapper.yml b/.github/workflows/_build-chain-bootstrapper.yml index d3e5293c6c..817690c92f 100644 --- a/.github/workflows/_build-chain-bootstrapper.yml +++ b/.github/workflows/_build-chain-bootstrapper.yml @@ -23,6 +23,8 @@ jobs: RUSTC_WRAPPER: sccache CARGO_FOLDER: ${{ inputs.production == true && 'production' || 'release' }} ARTIFACT_NAME_SUFFIX: ${{ inputs.production == true && 'release' || 'test' }} + outputs: + artifact-name: ${{ steps.get-artifact-name.outputs.name }} steps: - name: Checkout aleph-node source code uses: actions/checkout@v4 @@ -69,10 +71,15 @@ jobs: docker build --tag chain-bootstrapper:latest -f ./bin/chain-bootstrapper/Dockerfile . docker save -o chain-bootstrapper.tar chain-bootstrapper:latest + - name: Get artifact name + id: get-artifact-name + run: | + echo "name=chain-bootstrapper-image-${{ env.ARTIFACT_NAME_SUFFIX }}" >> $GITHUB_OUTPUT + - name: Upload docker image to GH Artifacts uses: actions/upload-artifact@v4 with: - name: chain-bootstrapper-image-${{ env.ARTIFACT_NAME_SUFFIX }} + name: ${{ steps.get-artifact-name.outputs.name }} path: chain-bootstrapper.tar if-no-files-found: error retention-days: 7 diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index f9314d6f19..b0eca01d96 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -151,8 +151,7 @@ jobs: uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: - # yamllint disable-line rule:line-length - binary-artifact-name: chain-bootstrapper-${{ inputs.short-session && 'release' || 'production' }} + binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name }} # yamllint disable-line rule:line-length docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} binary-name: chain-bootstrapper diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 0e2767e73a..65a64584a3 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -49,7 +49,7 @@ jobs: uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: - binary-artifact-name: chain-bootstrapper-release + binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name }} # yamllint disable-line rule:line-length docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} # yamllint disable-line rule:line-length From b4d99b99c732ca5e140edcbdad5f780882f322c7 Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 09:57:56 +0200 Subject: [PATCH 08/19] Fix --- .github/workflows/_build-chain-bootstrapper.yml | 16 +++++++++++----- .github/workflows/featurenet-create.yml | 2 +- .../on-main-or-release-branch-commit.yml | 2 +- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/.github/workflows/_build-chain-bootstrapper.yml b/.github/workflows/_build-chain-bootstrapper.yml index 817690c92f..95e37234ef 100644 --- a/.github/workflows/_build-chain-bootstrapper.yml +++ b/.github/workflows/_build-chain-bootstrapper.yml @@ -24,7 +24,8 @@ jobs: CARGO_FOLDER: ${{ inputs.production == true && 'production' || 'release' }} ARTIFACT_NAME_SUFFIX: ${{ inputs.production == true && 'release' || 'test' }} outputs: - artifact-name: ${{ steps.get-artifact-name.outputs.name }} + artifact-name-binary: ${{ steps.get-artifact-name-binary.outputs.name }} + artifact-name-image: ${{ steps.get-artifact-name-image.outputs.name }} steps: - name: Checkout aleph-node source code uses: actions/checkout@v4 @@ -52,10 +53,15 @@ jobs: run: | cargo build --profile production -p chain-bootstrapper + - name: Get binary artifact name + id: get-artifact-name-binary + run: | + echo "name=chain-bootstrapper-${{ env.ARTIFACT_NAME_SUFFIX }}" >> $GITHUB_OUTPUT + - name: Upload binary to GH Artifacts uses: actions/upload-artifact@v4 with: - name: chain-bootstrapper-${{ env.ARTIFACT_NAME_SUFFIX }} + name: ${{ steps.get-artifact-name-binary.outputs.name }} path: target/${{ env.CARGO_FOLDER }}/chain-bootstrapper if-no-files-found: error retention-days: 7 @@ -71,15 +77,15 @@ jobs: docker build --tag chain-bootstrapper:latest -f ./bin/chain-bootstrapper/Dockerfile . docker save -o chain-bootstrapper.tar chain-bootstrapper:latest - - name: Get artifact name - id: get-artifact-name + - name: Get image artifact name + id: get-artifact-name-image run: | echo "name=chain-bootstrapper-image-${{ env.ARTIFACT_NAME_SUFFIX }}" >> $GITHUB_OUTPUT - name: Upload docker image to GH Artifacts uses: actions/upload-artifact@v4 with: - name: ${{ steps.get-artifact-name.outputs.name }} + name: ${{ steps.get-artifact-name-image.outputs.name }} path: chain-bootstrapper.tar if-no-files-found: error retention-days: 7 diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index b0eca01d96..7ed6f39050 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -151,7 +151,7 @@ jobs: uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: - binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name }} + binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name-binary }} # yamllint disable-line rule:line-length docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} binary-name: chain-bootstrapper diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 65a64584a3..7121c261a5 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -49,7 +49,7 @@ jobs: uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: - binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name }} + binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name-binary }} # yamllint disable-line rule:line-length docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} # yamllint disable-line rule:line-length From 3628f56329f7daac2ee0cb2430faee6cb8fb3771 Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 10:33:41 +0200 Subject: [PATCH 09/19] Add job outputs --- .github/workflows/_build-chain-bootstrapper.yml | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/.github/workflows/_build-chain-bootstrapper.yml b/.github/workflows/_build-chain-bootstrapper.yml index 95e37234ef..7d4c043e01 100644 --- a/.github/workflows/_build-chain-bootstrapper.yml +++ b/.github/workflows/_build-chain-bootstrapper.yml @@ -13,7 +13,13 @@ on: description: 'set to true to use production profile' type: boolean required: true - + outputs: + artifact-name-binary: + description: 'Name of artifact chain-bootstrapper binary' + value: ${{ jobs.main.outputs.artifact-name-binary }} + artifact-name-image: + description: 'Name of artifact chain-bootstrapper image' + value: ${{ jobs.main.outputs.artifact-name-image }} jobs: main: name: Build chain-bootstrapper From 8dbab6e0f060bdbe8a11f0201ddd4d6655354b7c Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 13:39:20 +0200 Subject: [PATCH 10/19] Rework of build node workflows --- .github/actions/run-e2e-test/action.yml | 14 +-- .github/workflows/_build-aleph-node.yml | 91 +++++++++++++++++++ .../_build-and-push-featurenet-node-image.yml | 45 --------- .../workflows/_build-chain-bootstrapper.yml | 2 +- ...time.yml => _build-production-runtime.yml} | 20 +--- .github/workflows/_build-synthetic-node.yml | 34 ++++--- .github/workflows/_build-test-node.yml | 60 ------------ .github/workflows/featurenet-create.yml | 35 +++++-- .github/workflows/featurenet-update.yml | 28 ++++-- .github/workflows/nightly-e2e-logic-tests.yml | 17 ++-- .github/workflows/nightly-fe-e2e-tests.yml | 49 ++++++++-- .../nightly-normal-session-e2e-tests.yml | 64 ++++++++----- .../on-main-or-release-branch-commit.yml | 29 ++++-- .github/workflows/on-pull-request-commit.yml | 9 +- ...ekly-sync-from-snapshot-testnet-pruned.yml | 11 ++- .../weekly-sync-from-snapshot-testnet.yml | 11 ++- 16 files changed, 304 insertions(+), 215 deletions(-) create mode 100644 .github/workflows/_build-aleph-node.yml delete mode 100644 .github/workflows/_build-and-push-featurenet-node-image.yml rename .github/workflows/{_build-production-node-and-runtime.yml => _build-production-runtime.yml} (66%) delete mode 100644 .github/workflows/_build-test-node.yml diff --git a/.github/actions/run-e2e-test/action.yml b/.github/actions/run-e2e-test/action.yml index 7ed32bee15..03575852a3 100644 --- a/.github/actions/run-e2e-test/action.yml +++ b/.github/actions/run-e2e-test/action.yml @@ -23,12 +23,12 @@ inputs: description: 'Whether to deploy the adder sample contract to the node.' required: false default: 'false' - image-path: - description: 'Custom path to docker image for aleph-node' + aleph-node-image-artifact-name: + description: 'Name of aleph-node image stored in GH Artifacts' required: false - default: aleph-test-docker - node-image: - description: 'Custom name of aleph-node image' + default: aleph-node-image-test + aleph-node-image-tag: + description: 'Name of aleph-node docker image tag' required: false default: aleph-node:latest compose-file: @@ -61,7 +61,7 @@ runs: - name: Download node docker image uses: actions/download-artifact@v4 with: - name: ${{ inputs.image-path }} + name: ${{ inputs.aleph-node-image-artifact-name }} - name: Load node docker image shell: bash @@ -79,7 +79,7 @@ runs: - name: Run consensus party shell: bash run: | - NODE_IMAGE='${{ inputs.node-image }}' \ + NODE_IMAGE='${{ inputs.aleph-node-image-tag }}' \ DOCKER_COMPOSE='${{ inputs.compose-file }}' \ ./.github/scripts/run_consensus.sh -n '${{ inputs.node-count }}' diff --git a/.github/workflows/_build-aleph-node.yml b/.github/workflows/_build-aleph-node.yml new file mode 100644 index 0000000000..bb667b76bb --- /dev/null +++ b/.github/workflows/_build-aleph-node.yml @@ -0,0 +1,91 @@ +--- +# This workflow builds aleph-node binary. It outputs name of artifacts uploaded to GH Artifacts. +name: Build aleph-node +on: + workflow_call: + inputs: + ref: + description: 'git ref: hash, branch, tag to build aleph-node binary from' + type: string + required: true + production: + description: 'Set to true to build production binary, otherwise set to false' + type: boolean + required: true + outputs: + artifact-name-binary: + description: 'Name of artifact aleph-node binary' + value: ${{ jobs.main.outputs.artifact-name-binary }} + artifact-name-image: + description: 'Name of artifact aleph-node image' + value: ${{ jobs.main.outputs.artifact-name-image }} +jobs: + main: + name: Build aleph-node (production=${{ inputs.production }}) + runs-on: [self-hosted, Linux, X64, large] + env: + RUST_BACKTRACE: full + RUSTC_WRAPPER: sccache + CARGO_FOLDER: ${{ inputs.production == true && 'production' || 'release' }} + ARTIFACT_NAME_SUFFIX: ${{ inputs.production == true && 'production' || 'test' }} + outputs: + artifact-name-binary: ${{ steps.get-artifact-name-binary.outputs.name }} + artifact-name-image: ${{ steps.get-artifact-name-image.outputs.name }} + steps: + - name: Checkout aleph-node source code + uses: actions/checkout@v4 + with: + ref: ${{ inputs.ref }} + fetch-depth: 0 + + - name: Call action get-ref-properties + id: get-ref-properties + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + + - name: Install Rust toolchain + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + + - name: Build test aleph-node + if: ${{ inputs.production != true }} + run: | + cargo build --release -p aleph-node --features only_legacy + + - name: Build production aleph-node + if: ${{ inputs.production == true }} + run: cargo build --profile production -p aleph-node + + - name: Get binary artifact name + id: get-artifact-name-binary + run: | + echo "name=aleph-node-${{ env.ARTIFACT_NAME_SUFFIX }}" >> $GITHUB_OUTPUT + + - name: Upload binary to GH Artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.get-artifact-name-binary.outputs.name }} + path: target/${{ env.CARGO_FOLDER }}/aleph-node + if-no-files-found: error + retention-days: 7 + + - name: Build aleph-node docker image + run: | + chmod +x target/${{ env.CARGO_FOLDER }}/aleph-node + if [[ ${{ inputs.production }} == true ]]; then + mkdir -p target/release + mv target/production/aleph-node target/release/ + fi + docker build --tag aleph-node:latest -f ./docker/Dockerfile . + docker save -o aleph-node.tar aleph-node:latest + + - name: Get image artifact name + id: get-artifact-name-image + run: | + echo "name=aleph-node-image-${{ env.ARTIFACT_NAME_SUFFIX }}" >> $GITHUB_OUTPUT + + - name: Upload docker to GH Artifacts + uses: actions/upload-artifact@v4 + with: + name: ${{ steps.get-artifact-name-image.outputs.name }} + path: aleph-node.tar + if-no-files-found: error + retention-days: 7 diff --git a/.github/workflows/_build-and-push-featurenet-node-image.yml b/.github/workflows/_build-and-push-featurenet-node-image.yml deleted file mode 100644 index 142752f744..0000000000 --- a/.github/workflows/_build-and-push-featurenet-node-image.yml +++ /dev/null @@ -1,45 +0,0 @@ ---- -# This workflow builds aleph-node docker imag -name: Build and push PR image to featurenets -on: - workflow_call: - inputs: - ref: - description: 'An aleph-node git ref to build image from.' - type: string - required: true - fqdn-image: - description: 'Full path to ECR docker image.' - type: string - required: true - short-session: - description: 'If true, build aleph-node with short_session enabled.' - type: boolean - required: true -jobs: - build-test-node: - if: ${{ inputs.short-session == true }} - name: Build test node and runtime - uses: ./.github/workflows/_build-test-node.yml - with: - ref: ${{ inputs.ref }} - - build-production-node-and-runtime: - if: ${{ inputs.short-session != true }} - name: Build production node and runtime - uses: ./.github/workflows/_build-production-node-and-runtime.yml - with: - ref: ${{ inputs.ref }} - - build-and-push-featurnet-image-to-ecr: - name: Build and push featurnet image to ECR - needs: [build-test-node, build-production-node-and-runtime] - # this job should not be skipped in case one of its parent job is skipped - if: ${{ !cancelled() }} - uses: ./.github/workflows/_push-image-to-ecr.yml - secrets: inherit - with: - binary-artifact-name: aleph-${{ inputs.short-session == true && 'test' || 'production' }}-node - docker-image-name: ${{ inputs.fqdn-image }} - binary-name: aleph-node - docker-file-path: ./docker/Dockerfile diff --git a/.github/workflows/_build-chain-bootstrapper.yml b/.github/workflows/_build-chain-bootstrapper.yml index 7d4c043e01..8a916f3c62 100644 --- a/.github/workflows/_build-chain-bootstrapper.yml +++ b/.github/workflows/_build-chain-bootstrapper.yml @@ -75,7 +75,7 @@ jobs: - name: Build docker id: build-image run: | - chmod +x target/${{ env.CARGO_FOLDER }}/chain-bootstrapper + chmod +x target/${{ env.CARGO_FOLDER }}/chain-bootstrapper if [[ ${{ inputs.production }} == true ]]; then mkdir -p target/release mv target/production/chain-bootstrapper target/release/ diff --git a/.github/workflows/_build-production-node-and-runtime.yml b/.github/workflows/_build-production-runtime.yml similarity index 66% rename from .github/workflows/_build-production-node-and-runtime.yml rename to .github/workflows/_build-production-runtime.yml index 05159a7a3a..a19980310b 100644 --- a/.github/workflows/_build-production-node-and-runtime.yml +++ b/.github/workflows/_build-production-runtime.yml @@ -1,17 +1,17 @@ --- -# This workflow builds production version of aleph-node and aleph-runtime -name: Build production node and runtime +# This workflow builds production version of aleph-runtime +name: Build production runtime on: workflow_call: inputs: ref: - description: 'git ref: hash, branch, tag to build production aleph-node binary from' + description: 'git ref: hash, branch, tag to build production aleph-runtime from' type: string required: true jobs: main: - name: Build production node and runtime + name: Build runs-on: [self-hosted, Linux, X64, large] env: RUST_BACKTRACE: full @@ -32,21 +32,9 @@ jobs: with: targets: wasm32-unknown-unknown - - name: Build production aleph-node - run: cargo build --profile production -p aleph-node - - - name: Upload release binary to GH artifacts - uses: actions/upload-artifact@v4 - with: - name: aleph-production-node - path: target/production/aleph-node - if-no-files-found: error - retention-days: 7 - - name: Build production aleph-runtime run: cargo build --profile production -p aleph-runtime - # required by _check-runtime-determinism.yml workflow - name: Upload release runtime to GH artifacts uses: actions/upload-artifact@v4 with: diff --git a/.github/workflows/_build-synthetic-node.yml b/.github/workflows/_build-synthetic-node.yml index 92ef959bb8..7418295f88 100644 --- a/.github/workflows/_build-synthetic-node.yml +++ b/.github/workflows/_build-synthetic-node.yml @@ -1,28 +1,35 @@ --- -# This workflow builds synthetic network aleph-node docker -# it requires base aleph-node image +# This workflow builds synthetic network aleph-node docker, based on aleph-node:latest image name: Build production node image and e2e client image on: workflow_call: - + inputs: + aleph-node-image-artifact-name: + description: 'Name of aleph-node image stored in GH Artifacts' + type: string + required: true + outputs: + artifact-name-image: + description: 'Name of artifact aleph-node synthetic network image' + value: ${{ jobs.main.outputs.artifact-name-image }} jobs: main: name: Build synthetic node docker image runs-on: ubuntu-20.04 + outputs: + artifact-name-image: ${{ steps.get-synthetic-network-artifact-image-name.outputs.name }} steps: - name: Checkout Source code uses: actions/checkout@v4 - - name: Download release artifact + - name: Download node docker image uses: actions/download-artifact@v4 with: - name: aleph-production-node - path: target/release/ + name: ${{ inputs.aleph-node-image-artifact-name }} - - name: Build release docker image - run: | - chmod +x target/release/aleph-node - docker build --tag aleph-node:latest -f ./docker/Dockerfile . + - name: Load node docker image + shell: bash + run: docker load -i aleph-node.tar - name: Build synthetic aleph-node image shell: bash @@ -31,10 +38,15 @@ jobs: scripts/synthetic-network/build_synthetic-network.sh docker save -o aleph-node.tar aleph-node:syntheticnet + - name: Get synthetic aleph-node image name + id: get-synthetic-network-artifact-image-name + run: | + echo "name=aleph-release-synthetic-docker" >> $GITHUB_OUTPUT + - name: Upload synthetic aleph-node image uses: actions/upload-artifact@v4 with: - name: aleph-release-synthetic-docker + name: ${{ steps.get-synthetic-network-artifact-image-name.outputs.name }} path: aleph-node.tar if-no-files-found: error retention-days: 7 diff --git a/.github/workflows/_build-test-node.yml b/.github/workflows/_build-test-node.yml deleted file mode 100644 index 876c02615b..0000000000 --- a/.github/workflows/_build-test-node.yml +++ /dev/null @@ -1,60 +0,0 @@ ---- -# This workflow builds test version of aleph-node. It MUST NOT be used in the production. -name: Build test node -on: - workflow_call: - inputs: - ref: - description: 'git ref: hash, branch, tag to build test aleph-node binary from' - type: string - required: true - -jobs: - main: - name: Build test node - runs-on: [self-hosted, Linux, X64, large] - env: - RUST_BACKTRACE: full - RUSTC_WRAPPER: sccache - steps: - - name: Checkout aleph-node source code - uses: actions/checkout@v4 - with: - ref: ${{ inputs.ref }} - fetch-depth: 0 - - - name: Call action get-ref-properties - id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 - - - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 - - - name: Build - run: | - cargo build --release -p aleph-node --features only_legacy - - # this is required for some workflows, yet ideally it should not be required - - name: Upload binary to GH Artifacts - uses: actions/upload-artifact@v4 - with: - name: aleph-test-node - path: target/release/aleph-node - if-no-files-found: error - retention-days: 7 - - - name: Build docker - id: build-image - run: | - chmod +x target/release/aleph-node - docker build --tag aleph-node:latest -f ./docker/Dockerfile . - docker save -o aleph-node.tar aleph-node:latest - - # this is required by action/run-e2e-test.yml - - name: Upload docker to GH Artifacts - uses: actions/upload-artifact@v4 - with: - name: aleph-test-docker - path: aleph-node.tar - if-no-files-found: error - retention-days: 7 diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index 7ed6f39050..2a494ef959 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -124,16 +124,28 @@ jobs: ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} only-aleph-nope-production-repo: 'false' - build-and-push-featurenet-node-image: - needs: [get-full-docker-image-path] + build-aleph-node: + name: Build aleph-node if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }} - name: Build and push PR test docker image - uses: ./.github/workflows/_build-and-push-featurenet-node-image.yml + needs: [get-full-docker-image-path] + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ needs.get-full-docker-image-path.outputs.ref }} - fqdn-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} - short-session: ${{ inputs.short-session }} + production: ${{ !inputs.short-session }} + + push-aleph-node-image-to-ecr: + name: Build and push aleph-node image to ECR + if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }} + needs: + - build-aleph-node + - get-full-docker-image-path + uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit + with: + binary-artifact-name: ${{ needs.build-aleph-node.outputs.artifact-name-binary }} + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + binary-name: aleph-node + docker-file-path: ./docker/Dockerfile build-chain-bootstrapper: needs: [get-full-docker-image-path] @@ -147,7 +159,9 @@ jobs: push-chain-bootstrapper-image-to-ecr: name: Push chain-bootstrapper docker image to ECR if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }} - needs: [build-chain-bootstrapper] + needs: + - get-full-docker-image-path + - build-chain-bootstrapper uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: @@ -158,10 +172,13 @@ jobs: docker-file-path: ./bin/chain-bootstrapper/Dockerfile create-featurenet: - needs: [get-full-docker-image-path, build-and-push-featurenet-node-image] + needs: + - get-full-docker-image-path + - push-aleph-node-image-to-ecr + - push-chain-bootstrapper-image-to-ecr # to prevent this job to be skipped when on of the parent jobs is skipped if: ${{ !cancelled() }} - name: Create featurenet + name: Create featurenet from ${{ inputs.ref }} uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@A0-4268 secrets: inherit with: diff --git a/.github/workflows/featurenet-update.yml b/.github/workflows/featurenet-update.yml index 9684a9a9c2..79b3f2028e 100644 --- a/.github/workflows/featurenet-update.yml +++ b/.github/workflows/featurenet-update.yml @@ -89,19 +89,33 @@ jobs: ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} only-aleph-nope-production-repo: 'false' - build-and-push-featurenet-node-image: - needs: [get-full-docker-image-path] + build-aleph-node: + name: Build aleph-node if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }} - name: Build and push PR test docker image - uses: ./.github/workflows/_build-and-push-featurenet-node-image.yml + needs: [get-full-docker-image-path] + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ needs.get-full-docker-image-path.outputs.ref }} - fqdn-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} - short-session: ${{ inputs.short-session }} + production: ${{ !inputs.short-session }} + + push-aleph-node-image-to-ecr: + name: Build and push aleph-node image to ECR + if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }} + needs: + - get-full-docker-image-path + - build-aleph-node + uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit + with: + binary-artifact-name: ${{ needs.build-aleph-node.outputs.artifact-name-binary }} + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + binary-name: aleph-node + docker-file-path: ./docker/Dockerfile update-featurenet: - needs: [get-full-docker-image-path, build-and-push-featurenet-node-image] + needs: + - get-full-docker-image-path + - push-aleph-node-image-to-ecr # to prevent this job to be skipped when on of the parent jobs is skipped if: ${{ !cancelled() }} name: Update featurenet diff --git a/.github/workflows/nightly-e2e-logic-tests.yml b/.github/workflows/nightly-e2e-logic-tests.yml index b000358030..b404deffdd 100644 --- a/.github/workflows/nightly-e2e-logic-tests.yml +++ b/.github/workflows/nightly-e2e-logic-tests.yml @@ -19,11 +19,12 @@ jobs: uses: ./.github/workflows/_check-vars-and-secrets.yml secrets: inherit - build-test-node: - name: Build test node and runtime - uses: ./.github/workflows/_build-test-node.yml + build-test-aleph-node: + name: Build test aleph-node + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ github.ref }} + production: false build-chain-bootstrapper-test: name: Build chain-bootstrapper @@ -44,7 +45,7 @@ jobs: run-e2e-tests: name: Run e2e tests needs: - - build-test-node + - build-test-aleph-node - build-chain-bootstrapper-test - build-aleph-e2e-client-image uses: ./.github/workflows/_run-e2e-tests.yml @@ -53,7 +54,9 @@ jobs: aleph-e2e-client-image: ${{ needs.build-aleph-e2e-client-image.outputs.aleph-e2e-client-image }} run-recover-after-abft-update-test: - needs: [build-test-node, build-chain-bootstrapper-test] + needs: + - build-test-aleph-node + - build-chain-bootstrapper-test name: Run recovery test after abft update runs-on: [self-hosted, Linux, X64, medium] steps: @@ -63,13 +66,13 @@ jobs: - name: Download test node from GH artifacts uses: actions/download-artifact@v4 with: - name: aleph-test-node + name: ${{ needs.build-test-aleph-node.outputs.artifact-name-binary }} path: target/release/ - name: Download chain-bootstrapper from GH artifacts uses: actions/download-artifact@v4 with: - name: chain-bootstrapper-test + name: ${{ needs.build-chain-bootstrapper-test.outputs.artifact-name-binary }} path: target/release/ - name: Run test diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index 2576eeb03b..e37f01ee24 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -43,21 +43,58 @@ jobs: ecr-prod-node-repo: ${{ vars.ECR_ALEPH_NODE_REPO }} ecr-chain-bootstrapper-repo: ${{ vars.ECR_CHAIN_BOOTSTRAPPER_REPO }} - build-and-push-featurenet-node-image: + build-aleph-node: + name: Build aleph-node + if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }} needs: [get-full-docker-image-path] + uses: ./.github/workflows/_build-aleph-node.yml + with: + ref: ${{ needs.get-full-docker-image-path.outputs.ref }} + production: true + + push-aleph-node-image-to-ecr: + name: Build and push aleph-node image to ECR if: ${{ needs.get-full-docker-image-path.outputs.image-exists != 'true' }} - name: Build and push PR test docker image from ${{ github.ref }} - uses: ./.github/workflows/_build-and-push-featurenet-node-image.yml + needs: + - get-full-docker-image-path + - build-aleph-node + uses: ./.github/workflows/_push-image-to-ecr.yml + secrets: inherit + with: + binary-artifact-name: ${{ needs.build-aleph-node.outputs.artifact-name-binary }} + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} + binary-name: aleph-node + docker-file-path: ./docker/Dockerfile + + build-chain-bootstrapper: + needs: [get-full-docker-image-path] + if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }} + name: Build chain-bootstrapper + uses: ./.github/workflows/_build-chain-bootstrapper.yml with: ref: ${{ needs.get-full-docker-image-path.outputs.ref }} - fqdn-image: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} - short-session: false + production: ${{ !inputs.short-session }} + + push-chain-bootstrapper-image-to-ecr: + name: Push chain-bootstrapper docker image to ECR + if: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-image-exists != 'true' }} + needs: + - get-full-docker-image-path + - build-chain-bootstrapper + uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit + with: + binary-artifact-name: ${{ needs.build-chain-bootstrapper.outputs.artifact-name-binary }} + # yamllint disable-line rule:line-length + docker-image-name: ${{ needs.get-full-docker-image-path.outputs.chain-bootstrapper-fqdn-image }} + binary-name: chain-bootstrapper + docker-file-path: ./bin/chain-bootstrapper/Dockerfile create-featurenet: needs: - get-full-docker-image-path - - build-and-push-featurenet-node-image + - push-aleph-node-image-to-ecr + - push-chain-bootstrapper-image-to-ecr if: ${{ !cancelled() }} name: Create featurenet from ${{ github.ref }} uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v6 diff --git a/.github/workflows/nightly-normal-session-e2e-tests.yml b/.github/workflows/nightly-normal-session-e2e-tests.yml index 7c602e45a4..2d3db45f7a 100644 --- a/.github/workflows/nightly-normal-session-e2e-tests.yml +++ b/.github/workflows/nightly-normal-session-e2e-tests.yml @@ -25,17 +25,20 @@ jobs: push: true secrets: inherit - build-production-node-and-runtime: + build-production-aleph-node: needs: [check-vars-and-secrets] - name: Build production node and runtime - uses: ./.github/workflows/_build-production-node-and-runtime.yml + name: Build production aleph-node + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ github.ref }} + production: true build-synthetic-node: - needs: [build-production-node-and-runtime] + needs: [build-production-aleph-node] name: Build synthetic node uses: ./.github/workflows/_build-synthetic-node.yml + with: + aleph-node-image-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-image }} build-chain-bootstrapper-production: name: Build chain-bootstrapper @@ -59,8 +62,9 @@ jobs: uses: ./.github/actions/run-e2e-test with: test-case: high_out_latency_for_all - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network.yml # yamllint disable-line rule:line-length @@ -87,8 +91,9 @@ jobs: VALIDATOR_COUNT: 7 with: test-case: test::sync::one_node_catching_up_and_then_becoming_necessary_for_consensus - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network_sync-tests.yml node-count: 7 @@ -115,8 +120,9 @@ jobs: VALIDATOR_COUNT: 7 with: test-case: test::sync::one_node_catching_up - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network_sync-tests.yml node-count: 7 @@ -144,8 +150,9 @@ jobs: VALIDATOR_COUNT: 7 with: test-case: test::sync::into_two_groups_and_one_quorum_and_switch_quorum_between_them - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network_sync-tests.yml node-count: 7 @@ -172,8 +179,9 @@ jobs: VALIDATOR_COUNT: 7 with: test-case: test::sync::into_multiple_groups_of_two - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network_sync-tests.yml node-count: 7 @@ -201,8 +209,9 @@ jobs: VALIDATOR_COUNT: 7 with: test-case: test::sync::into_two_equal_size_groups_with_no_quorum - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network_sync-tests.yml node-count: 7 @@ -230,8 +239,9 @@ jobs: VALIDATOR_COUNT: 7 with: test-case: test::sync::into_two_groups_one_with_quorum - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.synthetic-network_sync-tests.yml node-count: 7 @@ -259,8 +269,9 @@ jobs: TIMEOUT_MINUTES: "60m" with: test-case: test::sync::large_finalization_stall - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet chain-bootstrapper-image: chain-bootstrapper-image-release compose-file: docker/docker-compose.finalization_stall_with_pruning.yml # yamllint disable-line rule:line-length @@ -268,7 +279,9 @@ jobs: timeout-minutes: 60 run-major-sync-test: - needs: [build-production-node-and-runtime, build-chain-bootstrapper-production] + needs: + - build-production-node + - build-chain-bootstrapper-production name: Run major sync test runs-on: ubuntu-20.04 steps: @@ -296,7 +309,9 @@ jobs: --testcase test_major_sync run-force-reorg-test: - needs: [build-production-node-and-runtime, build-chain-bootstrapper-production] + needs: + - build-production-node + - build-chain-bootstrapper-production name: Run force reorgs test runs-on: [self-hosted, Linux, X64, medium] steps: @@ -338,8 +353,9 @@ jobs: uses: ./.github/actions/run-e2e-test with: test-case: high_out_latency_for_each_quorum - image-path: aleph-release-synthetic-docker - node-image: aleph-node:syntheticnet + # yamllint disable-line rule:line-length + aleph-node-image-artifact-name: ${{ needs.build-synthetic-node.outputs.artifact-name-image }} + aleph-node-image-tag: aleph-node:syntheticnet compose-file: docker/docker-compose.synthetic-network.yml chain-bootstrapper-image: chain-bootstrapper-image-release # yamllint disable-line rule:line-length diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 7121c261a5..3690b93eba 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -44,7 +44,9 @@ jobs: production: true push-chain-bootstrapper-image-to-ecr: - needs: [build-chain-bootstrapper, get-full-docker-image-path] + needs: + - build-chain-bootstrapper + - get-full-docker-image-path name: Push chain-bootstrapper docker image to ECR uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit @@ -74,21 +76,31 @@ jobs: push: true secrets: inherit - build-production-node-and-runtime: + build-production-aleph-node: + needs: [check-vars-and-secrets] + name: Build production aleph-node + uses: ./.github/workflows/_build-aleph-node.yml + with: + ref: ${{ github.ref }} + production: true + + build-production-runtime: needs: [check-vars-and-secrets] name: Build production node and runtime - uses: ./.github/workflows/_build-production-node-and-runtime.yml + uses: ./.github/workflows/_build-production-runtime.yml with: ref: ${{ github.ref }} check-runtime-determinism: - needs: [build-production-node-and-runtime] + needs: [build-production-runtime] uses: ./.github/workflows/_check-runtime-determimism.yml store-production-node-and-runtime-in-mainnet-s3: name: Store production node and runtime in Mainnet bucket runs-on: ubuntu-20.04 - needs: [build-production-node-and-runtime] + needs: + - build-production-node + - build-production-aleph-node steps: - name: Checkout aleph-node source code uses: actions/checkout@v4 @@ -103,13 +115,14 @@ jobs: push-production-node-image-to-ecr: name: Push production node docker image to ECR - needs: [build-production-node-and-runtime, get-full-docker-image-path] + needs: + - build-production-aleph-node + - get-full-docker-image-path uses: ./.github/workflows/_push-image-to-ecr.yml secrets: inherit with: - binary-artifact-name: aleph-production-node + binary-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} docker-image-name: ${{ needs.get-full-docker-image-path.outputs.fqdn-image }} - # yamllint disable-line rule:line-length docker-image-name-latest: ${{ needs.get-full-docker-image-path.outputs.fqdn-image-latest }} binary-name: aleph-node docker-file-path: ./docker/Dockerfile diff --git a/.github/workflows/on-pull-request-commit.yml b/.github/workflows/on-pull-request-commit.yml index d4e56ca0c6..cd28287272 100644 --- a/.github/workflows/on-pull-request-commit.yml +++ b/.github/workflows/on-pull-request-commit.yml @@ -38,11 +38,12 @@ jobs: name: Check production node and runtime uses: ./.github/workflows/_check-production-node-and-runtime.yml - build-test-node: - name: Build test node - uses: ./.github/workflows/_build-test-node.yml + build-test-aleph-node: + name: Build test aleph-node + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ github.ref }} + production: false build-chain-bootstrapper: name: Build chain-bootstrapper @@ -61,7 +62,7 @@ jobs: run-e2e-finalization-test: name: Run e2e finalization test needs: - - build-test-node + - build-test-aleph-node - build-aleph-e2e-client-image - build-chain-bootstrapper runs-on: ubuntu-20.04 diff --git a/.github/workflows/weekly-sync-from-snapshot-testnet-pruned.yml b/.github/workflows/weekly-sync-from-snapshot-testnet-pruned.yml index c28c55a777..ec3061a1ae 100644 --- a/.github/workflows/weekly-sync-from-snapshot-testnet-pruned.yml +++ b/.github/workflows/weekly-sync-from-snapshot-testnet-pruned.yml @@ -18,15 +18,16 @@ jobs: uses: ./.github/workflows/_check-vars-and-secrets.yml secrets: inherit - build-production-node-and-runtime: + build-production-aleph-node: needs: [check-vars-and-secrets] - name: Build production node and runtime - uses: ./.github/workflows/_build-production-node-and-runtime.yml + name: Build production aleph-node + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ github.ref }} + production: true get-snapshot-and-sync: - needs: [build-production-node-and-runtime] + needs: [build-production-aleph-node] name: Download snapshot and run runs-on: [self-hosted, Linux, X64, medium-1000GB] steps: @@ -36,7 +37,7 @@ jobs: - name: Download release artifact uses: actions/download-artifact@v4 with: - name: aleph-production-node + name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} - name: Download snapshot timeout-minutes: 180 diff --git a/.github/workflows/weekly-sync-from-snapshot-testnet.yml b/.github/workflows/weekly-sync-from-snapshot-testnet.yml index f47ac7fd05..596506127d 100644 --- a/.github/workflows/weekly-sync-from-snapshot-testnet.yml +++ b/.github/workflows/weekly-sync-from-snapshot-testnet.yml @@ -18,15 +18,16 @@ jobs: uses: ./.github/workflows/_check-vars-and-secrets.yml secrets: inherit - build-production-node-and-runtime: + build-production-aleph-node: needs: [check-vars-and-secrets] - name: Build production node and runtime - uses: ./.github/workflows/_build-production-node-and-runtime.yml + name: Build production aleph-node + uses: ./.github/workflows/_build-aleph-node.yml with: ref: ${{ github.ref }} + production: true get-snapshot-and-sync: - needs: [build-production-node-and-runtime] + needs: [build-production-aleph-node] name: Download snapshot and run runs-on: [self-hosted, Linux, X64, medium-1000GB] steps: @@ -36,7 +37,7 @@ jobs: - name: Download release artifact uses: actions/download-artifact@v4 with: - name: aleph-production-node + name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} - name: Download snapshot timeout-minutes: 360 From 77db88ede9d66b44c80d672d0185b63e90796144 Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 14:33:01 +0200 Subject: [PATCH 11/19] linter and validator --- .github/workflows/_build-aleph-node.yml | 2 +- .github/workflows/nightly-e2e-logic-tests.yml | 4 ++-- .github/workflows/nightly-normal-session-e2e-tests.yml | 5 +++-- .github/workflows/on-main-or-release-branch-commit.yml | 2 +- 4 files changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_build-aleph-node.yml b/.github/workflows/_build-aleph-node.yml index bb667b76bb..cedffa9e2d 100644 --- a/.github/workflows/_build-aleph-node.yml +++ b/.github/workflows/_build-aleph-node.yml @@ -56,7 +56,7 @@ jobs: - name: Get binary artifact name id: get-artifact-name-binary - run: | + run: | echo "name=aleph-node-${{ env.ARTIFACT_NAME_SUFFIX }}" >> $GITHUB_OUTPUT - name: Upload binary to GH Artifacts diff --git a/.github/workflows/nightly-e2e-logic-tests.yml b/.github/workflows/nightly-e2e-logic-tests.yml index b404deffdd..47d79660cf 100644 --- a/.github/workflows/nightly-e2e-logic-tests.yml +++ b/.github/workflows/nightly-e2e-logic-tests.yml @@ -55,8 +55,8 @@ jobs: run-recover-after-abft-update-test: needs: - - build-test-aleph-node - - build-chain-bootstrapper-test + - build-test-aleph-node + - build-chain-bootstrapper-test name: Run recovery test after abft update runs-on: [self-hosted, Linux, X64, medium] steps: diff --git a/.github/workflows/nightly-normal-session-e2e-tests.yml b/.github/workflows/nightly-normal-session-e2e-tests.yml index 2d3db45f7a..ea2b57b5bd 100644 --- a/.github/workflows/nightly-normal-session-e2e-tests.yml +++ b/.github/workflows/nightly-normal-session-e2e-tests.yml @@ -38,6 +38,7 @@ jobs: name: Build synthetic node uses: ./.github/workflows/_build-synthetic-node.yml with: + # yamllint disable-line rule:line-length aleph-node-image-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-image }} build-chain-bootstrapper-production: @@ -280,7 +281,7 @@ jobs: run-major-sync-test: needs: - - build-production-node + - build-production-aleph-node - build-chain-bootstrapper-production name: Run major sync test runs-on: ubuntu-20.04 @@ -310,7 +311,7 @@ jobs: run-force-reorg-test: needs: - - build-production-node + - build-production-aleph-node - build-chain-bootstrapper-production name: Run force reorgs test runs-on: [self-hosted, Linux, X64, medium] diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index 3690b93eba..ee94169a1f 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -99,7 +99,7 @@ jobs: name: Store production node and runtime in Mainnet bucket runs-on: ubuntu-20.04 needs: - - build-production-node + - build-production-aleph-node - build-production-aleph-node steps: - name: Checkout aleph-node source code From 37c2c089449b3a1b7c858ae3d31aefc352a0cc1e Mon Sep 17 00:00:00 2001 From: Marcin Date: Tue, 14 May 2024 14:33:25 +0200 Subject: [PATCH 12/19] fmt --- bin/chain-bootstrapper/src/main.rs | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/bin/chain-bootstrapper/src/main.rs b/bin/chain-bootstrapper/src/main.rs index 87eef75514..1ff8e27474 100644 --- a/bin/chain-bootstrapper/src/main.rs +++ b/bin/chain-bootstrapper/src/main.rs @@ -1,8 +1,10 @@ mod chain_spec; use sc_chain_spec::ChainSpec; -use sc_cli::clap::{self, Parser, Subcommand as ClapSubcommand}; -use sc_cli::SubstrateCli; +use sc_cli::{ + clap::{self, Parser, Subcommand as ClapSubcommand}, + SubstrateCli, +}; use crate::chain_spec::{BootstrapChainCmd, ConvertChainspecToRawCmd}; @@ -64,7 +66,6 @@ fn main() -> sc_cli::Result<()> { Some(Subcommand::ConvertChainspecToRaw(cmd)) => cmd.run(), Some(Subcommand::Key(cmd)) => cmd.run(&cli), - None => Err("Command was required!".into()), } } From 825fb9ba539516523cdacdcc7b1f73df4b6483c6 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 15 May 2024 09:28:07 +0200 Subject: [PATCH 13/19] Fixes to on push to main workflow --- .../actions/store-node-and-runtime/action.yml | 37 +++++++++---------- .../workflows/_build-production-runtime.yml | 13 ++++++- .../on-main-or-release-branch-commit.yml | 6 ++- 3 files changed, 34 insertions(+), 22 deletions(-) diff --git a/.github/actions/store-node-and-runtime/action.yml b/.github/actions/store-node-and-runtime/action.yml index 8febed9111..5f2d83a86b 100644 --- a/.github/actions/store-node-and-runtime/action.yml +++ b/.github/actions/store-node-and-runtime/action.yml @@ -3,9 +3,15 @@ name: Store node and runtime description: This workflow stores test or release version of aleph-node and aleph-runtime in S3, in a given bucket inputs: + aleph-node-artifact-name: + required: true + description: 'Name of artifact aleph-node binary' + aleph-runtime-artifact-name: + required: true + description: 'Name of artifact aleph-runtime' profile: required: true - description: test or production + description: 'test or production' aws-access-key-id: required: true description: 'AWS Access Key ID to be used when storing artifacts' @@ -27,33 +33,24 @@ runs: exit 1 fi - - name: Get local envs - id: get-local-envs - shell: bash - env: - CARGO_PROFILE_DIRECTORY: ${{ inputs.profile == 'test' && 'release' || 'production' }} - run: | - cargo_profile_local=${{ env.CARGO_PROFILE_DIRECTORY }} - echo "cargo_profile=$cargo_profile_local" >> $GITHUB_OUTPUT - - name: Checkout aleph-node source code - uses: actions/checkout@v3 + uses: actions/checkout@v4 - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v1 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 - name: Download binary from GH artifacts uses: actions/download-artifact@v4 with: - name: aleph-${{ inputs.profile }}-node - path: target/${{ steps.get-local-envs.outputs.cargo_profile }} + name: ${{ inputs.aleph-node-artifact-name }} + path: target - name: Download runtime from GH artifacts uses: actions/download-artifact@v4 with: - name: aleph-${{ inputs.profile }}-runtime - path: target/${{ steps.get-local-envs.outputs.cargo_profile }}/wbuild/aleph-runtime + name: ${{ inputs.aleph-runtime-artifact-name }} + path: target - name: Configure AWS credentials for S3 AWS uses: aws-actions/configure-aws-credentials@v2 @@ -68,10 +65,10 @@ runs: aws-secret-access-key: ${{ inputs.aws-secret-access-key }} aws-region: ${{ env.AWS_REGION }} - - name: Copy binary to S3 AWS bucket - uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v1 + - name: Copy aleph-node binary to S3 AWS bucket + uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 with: - source-path: target/${{ steps.get-local-envs.outputs.cargo_profile }} + source-path: target source-filename: aleph-node s3-bucket-path: # yamllint disable-line rule:line-length @@ -83,7 +80,7 @@ runs: - name: Copy runtime to S3 AWS bucket uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v1 with: - source-path: target/${{ steps.get-local-envs.outputs.cargo_profile }}/wbuild/aleph-runtime + source-path: target source-filename: aleph_runtime.compact.compressed.wasm s3-bucket-path: # yamllint disable-line rule:line-length diff --git a/.github/workflows/_build-production-runtime.yml b/.github/workflows/_build-production-runtime.yml index a19980310b..070de43288 100644 --- a/.github/workflows/_build-production-runtime.yml +++ b/.github/workflows/_build-production-runtime.yml @@ -8,6 +8,10 @@ on: description: 'git ref: hash, branch, tag to build production aleph-runtime from' type: string required: true + outputs: + aleph-runtime-artifact-name: + description: 'Name of artifact aleph-runtime' + value: ${{ jobs.main.outputs.aleph-runtime-artifact-name }} jobs: main: @@ -16,6 +20,8 @@ jobs: env: RUST_BACKTRACE: full RUSTC_WRAPPER: sccache + outputs: + aleph-runtime-artifact-name: ${{ steps.get-artifact-name.outputs.name }} steps: - name: Checkout aleph-node source code uses: actions/checkout@v4 @@ -35,10 +41,15 @@ jobs: - name: Build production aleph-runtime run: cargo build --profile production -p aleph-runtime + - name: get aleph-runtime artifact name + id: get-artifact-name + run: | + echo "name=aleph-production-runtime" >> $GITHUB_OUTPUT + - name: Upload release runtime to GH artifacts uses: actions/upload-artifact@v4 with: - name: aleph-production-runtime + name: ${{ steps.get-artifact-name.outputs.name }} path: target/production/wbuild/aleph-runtime/aleph_runtime.compact.compressed.wasm if-no-files-found: error retention-days: 7 diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index ee94169a1f..d39dc21d1c 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -100,7 +100,7 @@ jobs: runs-on: ubuntu-20.04 needs: - build-production-aleph-node - - build-production-aleph-node + - build-production-aleph-runtime steps: - name: Checkout aleph-node source code uses: actions/checkout@v4 @@ -109,6 +109,10 @@ jobs: uses: ./.github/actions/store-node-and-runtime with: profile: production + # yamllint disable-line rule:line-length + aleph-node-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} + # yamllint disable-line rule:line-length + aleph-runtime-artifact-name: ${{ needs.build-production-aleph-runtime.outputs.aleph-runtime-artifact-name }} aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} aws-bucket: ${{ secrets.CI_MAINNET_S3BUCKET_NAME }} From e8f574621fdc85823b83f293d8e9c7aa6a386493 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 15 May 2024 09:29:38 +0200 Subject: [PATCH 14/19] Testing on push to main commit --- .../actions/store-node-and-runtime/action.yml | 46 +++++----- .github/workflows/_push-image-to-ecr.yml | 4 +- .../on-main-or-release-branch-commit.yml | 89 ++++++++++--------- 3 files changed, 70 insertions(+), 69 deletions(-) diff --git a/.github/actions/store-node-and-runtime/action.yml b/.github/actions/store-node-and-runtime/action.yml index 5f2d83a86b..3eb470eb91 100644 --- a/.github/actions/store-node-and-runtime/action.yml +++ b/.github/actions/store-node-and-runtime/action.yml @@ -65,26 +65,26 @@ runs: aws-secret-access-key: ${{ inputs.aws-secret-access-key }} aws-region: ${{ env.AWS_REGION }} - - name: Copy aleph-node binary to S3 AWS bucket - uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 - with: - source-path: target - source-filename: aleph-node - s3-bucket-path: - # yamllint disable-line rule:line-length - builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-node - s3-bucket-filename: - aleph-${{ inputs.profile }}-node-${{ steps.get-ref-properties.outputs.sha }}.tar.gz - s3-bucket-name: ${{ inputs.aws-bucket }} - - - name: Copy runtime to S3 AWS bucket - uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v1 - with: - source-path: target - source-filename: aleph_runtime.compact.compressed.wasm - s3-bucket-path: - # yamllint disable-line rule:line-length - builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-runtime - s3-bucket-filename: - aleph-${{ inputs.profile }}-runtime-${{ steps.get-ref-properties.outputs.sha }}.tar.gz - s3-bucket-name: ${{ inputs.aws-bucket }} +# - name: Copy aleph-node binary to S3 AWS bucket +# uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 +# with: +# source-path: target +# source-filename: aleph-node +# s3-bucket-path: +# # yamllint disable-line rule:line-length +# builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-node +# s3-bucket-filename: +# aleph-${{ inputs.profile }}-node-${{ steps.get-ref-properties.outputs.sha }}.tar.gz +# s3-bucket-name: ${{ inputs.aws-bucket }} +# +# - name: Copy runtime to S3 AWS bucket +# uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v1 +# with: +# source-path: target +# source-filename: aleph_runtime.compact.compressed.wasm +# s3-bucket-path: +# # yamllint disable-line rule:line-length +# builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-runtime +# s3-bucket-filename: +# aleph-${{ inputs.profile }}-runtime-${{ steps.get-ref-properties.outputs.sha }}.tar.gz +# s3-bucket-name: ${{ inputs.aws-bucket }} diff --git a/.github/workflows/_push-image-to-ecr.yml b/.github/workflows/_push-image-to-ecr.yml index 455c7e8ffc..df6ef4a2cc 100644 --- a/.github/workflows/_push-image-to-ecr.yml +++ b/.github/workflows/_push-image-to-ecr.yml @@ -61,9 +61,9 @@ jobs: - name: Push image to ECR run: | - docker push '${{ inputs.docker-image-name }}' + # docker push '${{ inputs.docker-image-name }}' if [[ '${{ steps.get-ref-properties.outputs.branch }}' -eq 'main' && \ '${{ inputs.docker-image-name-latest }}' != '' ]]; then docker tag '${{ inputs.docker-image-name }}' '${{ inputs.docker-image-name-latest }}' - docker push '${{ inputs.docker-image-name-latest }}' + # docker push '${{ inputs.docker-image-name-latest }}' fi diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index d39dc21d1c..adb3ab7a7c 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -6,6 +6,7 @@ on: branches: - main - 'release-*' + - A0-4268 jobs: check-vars-and-secrets: @@ -59,22 +60,22 @@ jobs: binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile - build-and-push-cliain: - needs: [check-vars-and-secrets] - name: Build and push cliain - uses: ./.github/workflows/_build-and-push-cliain.yml - secrets: inherit - with: - check-only: false - - build-aleph-e2e-client-image: - needs: [check-vars-and-secrets] - name: Build aleph-e2e-client image - uses: ./.github/workflows/_build-aleph-e2e-client-image.yml - with: - ref: ${{ github.ref }} - push: true - secrets: inherit +# build-and-push-cliain: +# needs: [check-vars-and-secrets] +# name: Build and push cliain +# uses: ./.github/workflows/_build-and-push-cliain.yml +# secrets: inherit +# with: +# check-only: false +# +# build-aleph-e2e-client-image: +# needs: [check-vars-and-secrets] +# name: Build aleph-e2e-client image +# uses: ./.github/workflows/_build-aleph-e2e-client-image.yml +# with: +# ref: ${{ github.ref }} +# push: true +# secrets: inherit build-production-aleph-node: needs: [check-vars-and-secrets] @@ -131,31 +132,31 @@ jobs: binary-name: aleph-node docker-file-path: ./docker/Dockerfile - send-slack-notification-release: - name: Send Slack notification about workflow status - runs-on: ubuntu-20.04 - if: always() && startsWith(github.ref_name, 'release-') - needs: [push-production-node-image-to-ecr] - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 - with: - notify-on: "always" - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} - - send-slack-notification-main: - name: Send Slack notification about workflow status - runs-on: ubuntu-20.04 - if: always() && github.ref_name == 'main' - needs: [push-production-node-image-to-ecr] - steps: - - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 - with: - notify-on: "failure" - env: - SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} +# send-slack-notification-release: +# name: Send Slack notification about workflow status +# runs-on: ubuntu-20.04 +# if: always() && startsWith(github.ref_name, 'release-') +# needs: [push-production-node-image-to-ecr] +# steps: +# - name: Checkout repository +# uses: actions/checkout@v4 +# +# - name: Send Slack message +# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 +# with: +# notify-on: "always" +# env: +# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} +# +# send-slack-notification-main: +# name: Send Slack notification about workflow status +# runs-on: ubuntu-20.04 +# if: always() && github.ref_name == 'main' +# needs: [push-production-node-image-to-ecr] +# steps: +# - name: Send Slack message +# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 +# with: +# notify-on: "failure" +# env: +# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} From 4ab1f17ae8e3c44a6a16c7f956b4dbcf4fe6cc98 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 15 May 2024 09:31:33 +0200 Subject: [PATCH 15/19] Validator --- .github/workflows/on-main-or-release-branch-commit.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index adb3ab7a7c..cce897dceb 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -101,7 +101,7 @@ jobs: runs-on: ubuntu-20.04 needs: - build-production-aleph-node - - build-production-aleph-runtime + - build-production-runtime steps: - name: Checkout aleph-node source code uses: actions/checkout@v4 @@ -113,7 +113,7 @@ jobs: # yamllint disable-line rule:line-length aleph-node-artifact-name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} # yamllint disable-line rule:line-length - aleph-runtime-artifact-name: ${{ needs.build-production-aleph-runtime.outputs.aleph-runtime-artifact-name }} + aleph-runtime-artifact-name: ${{ needs.build-production-runtime.outputs.aleph-runtime-artifact-name }} aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} aws-bucket: ${{ secrets.CI_MAINNET_S3BUCKET_NAME }} From e709f10af1ebe2b195510096c317c63c4e4752ce Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 15 May 2024 09:50:38 +0200 Subject: [PATCH 16/19] Revert testing on push to main workflow --- .../actions/store-node-and-runtime/action.yml | 46 +++++----- .github/workflows/_push-image-to-ecr.yml | 4 +- .github/workflows/nightly-fe-e2e-tests.yml | 2 +- .../on-main-or-release-branch-commit.yml | 91 +++++++++---------- 4 files changed, 71 insertions(+), 72 deletions(-) diff --git a/.github/actions/store-node-and-runtime/action.yml b/.github/actions/store-node-and-runtime/action.yml index 3eb470eb91..5f2d83a86b 100644 --- a/.github/actions/store-node-and-runtime/action.yml +++ b/.github/actions/store-node-and-runtime/action.yml @@ -65,26 +65,26 @@ runs: aws-secret-access-key: ${{ inputs.aws-secret-access-key }} aws-region: ${{ env.AWS_REGION }} -# - name: Copy aleph-node binary to S3 AWS bucket -# uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 -# with: -# source-path: target -# source-filename: aleph-node -# s3-bucket-path: -# # yamllint disable-line rule:line-length -# builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-node -# s3-bucket-filename: -# aleph-${{ inputs.profile }}-node-${{ steps.get-ref-properties.outputs.sha }}.tar.gz -# s3-bucket-name: ${{ inputs.aws-bucket }} -# -# - name: Copy runtime to S3 AWS bucket -# uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v1 -# with: -# source-path: target -# source-filename: aleph_runtime.compact.compressed.wasm -# s3-bucket-path: -# # yamllint disable-line rule:line-length -# builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-runtime -# s3-bucket-filename: -# aleph-${{ inputs.profile }}-runtime-${{ steps.get-ref-properties.outputs.sha }}.tar.gz -# s3-bucket-name: ${{ inputs.aws-bucket }} + - name: Copy aleph-node binary to S3 AWS bucket + uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 + with: + source-path: target + source-filename: aleph-node + s3-bucket-path: + # yamllint disable-line rule:line-length + builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-node + s3-bucket-filename: + aleph-${{ inputs.profile }}-node-${{ steps.get-ref-properties.outputs.sha }}.tar.gz + s3-bucket-name: ${{ inputs.aws-bucket }} + + - name: Copy runtime to S3 AWS bucket + uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v1 + with: + source-path: target + source-filename: aleph_runtime.compact.compressed.wasm + s3-bucket-path: + # yamllint disable-line rule:line-length + builds/aleph-node/commits/${{ steps.get-ref-properties.outputs.sha }}/aleph-${{ inputs.profile }}-runtime + s3-bucket-filename: + aleph-${{ inputs.profile }}-runtime-${{ steps.get-ref-properties.outputs.sha }}.tar.gz + s3-bucket-name: ${{ inputs.aws-bucket }} diff --git a/.github/workflows/_push-image-to-ecr.yml b/.github/workflows/_push-image-to-ecr.yml index df6ef4a2cc..455c7e8ffc 100644 --- a/.github/workflows/_push-image-to-ecr.yml +++ b/.github/workflows/_push-image-to-ecr.yml @@ -61,9 +61,9 @@ jobs: - name: Push image to ECR run: | - # docker push '${{ inputs.docker-image-name }}' + docker push '${{ inputs.docker-image-name }}' if [[ '${{ steps.get-ref-properties.outputs.branch }}' -eq 'main' && \ '${{ inputs.docker-image-name-latest }}' != '' ]]; then docker tag '${{ inputs.docker-image-name }}' '${{ inputs.docker-image-name-latest }}' - # docker push '${{ inputs.docker-image-name-latest }}' + docker push '${{ inputs.docker-image-name-latest }}' fi diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index e37f01ee24..721a2ad850 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -97,7 +97,7 @@ jobs: - push-chain-bootstrapper-image-to-ecr if: ${{ !cancelled() }} name: Create featurenet from ${{ github.ref }} - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v6 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@A0-4268 secrets: inherit with: featurenet-name: 'ops-finalization-e2e' diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index cce897dceb..d3c2aeb1e7 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -6,7 +6,6 @@ on: branches: - main - 'release-*' - - A0-4268 jobs: check-vars-and-secrets: @@ -60,22 +59,22 @@ jobs: binary-name: chain-bootstrapper docker-file-path: ./bin/chain-bootstrapper/Dockerfile -# build-and-push-cliain: -# needs: [check-vars-and-secrets] -# name: Build and push cliain -# uses: ./.github/workflows/_build-and-push-cliain.yml -# secrets: inherit -# with: -# check-only: false -# -# build-aleph-e2e-client-image: -# needs: [check-vars-and-secrets] -# name: Build aleph-e2e-client image -# uses: ./.github/workflows/_build-aleph-e2e-client-image.yml -# with: -# ref: ${{ github.ref }} -# push: true -# secrets: inherit + build-and-push-cliain: + needs: [check-vars-and-secrets] + name: Build and push cliain + uses: ./.github/workflows/_build-and-push-cliain.yml + secrets: inherit + with: + check-only: false + + build-aleph-e2e-client-image: + needs: [check-vars-and-secrets] + name: Build aleph-e2e-client image + uses: ./.github/workflows/_build-aleph-e2e-client-image.yml + with: + ref: ${{ github.ref }} + push: true + secrets: inherit build-production-aleph-node: needs: [check-vars-and-secrets] @@ -87,7 +86,7 @@ jobs: build-production-runtime: needs: [check-vars-and-secrets] - name: Build production node and runtime + name: Build production runtime uses: ./.github/workflows/_build-production-runtime.yml with: ref: ${{ github.ref }} @@ -132,31 +131,31 @@ jobs: binary-name: aleph-node docker-file-path: ./docker/Dockerfile -# send-slack-notification-release: -# name: Send Slack notification about workflow status -# runs-on: ubuntu-20.04 -# if: always() && startsWith(github.ref_name, 'release-') -# needs: [push-production-node-image-to-ecr] -# steps: -# - name: Checkout repository -# uses: actions/checkout@v4 -# -# - name: Send Slack message -# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 -# with: -# notify-on: "always" -# env: -# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} -# -# send-slack-notification-main: -# name: Send Slack notification about workflow status -# runs-on: ubuntu-20.04 -# if: always() && github.ref_name == 'main' -# needs: [push-production-node-image-to-ecr] -# steps: -# - name: Send Slack message -# uses: Cardinal-Cryptography/github-actions/slack-notification@v6 -# with: -# notify-on: "failure" -# env: -# SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} + send-slack-notification-release: + name: Send Slack notification about workflow status + runs-on: ubuntu-20.04 + if: always() && startsWith(github.ref_name, 'release-') + needs: [push-production-node-image-to-ecr] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Send Slack message + uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + with: + notify-on: "always" + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} + + send-slack-notification-main: + name: Send Slack notification about workflow status + runs-on: ubuntu-20.04 + if: always() && github.ref_name == 'main' + needs: [push-production-node-image-to-ecr] + steps: + - name: Send Slack message + uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + with: + notify-on: "failure" + env: + SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_DEV_ONDUTY }} From 24fce1a968a87b3edffc0b0738273b24c65d2949 Mon Sep 17 00:00:00 2001 From: Marcin Date: Wed, 15 May 2024 10:14:57 +0200 Subject: [PATCH 17/19] Fixes to nightly workflows --- .github/workflows/nightly-fe-e2e-tests.yml | 3 +++ .github/workflows/nightly-normal-session-e2e-tests.yml | 8 ++++---- .github/workflows/on-main-or-release-branch-commit.yml | 3 +++ 3 files changed, 10 insertions(+), 4 deletions(-) diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index 721a2ad850..6e5899fb22 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -32,6 +32,9 @@ jobs: fqdn-image: ${{ steps.get-fqdns.outputs.fqdn-image }} ref: ${{ steps.get-fqdns.outputs.ref }} image-exists: ${{ steps.get-fqdns.outputs.image-exists }} + # yamllint disable-line rule:line-length + chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }} + chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }} steps: - name: Get aleph-node fqdn path from ${{ github.ref }} id: get-fqdns diff --git a/.github/workflows/nightly-normal-session-e2e-tests.yml b/.github/workflows/nightly-normal-session-e2e-tests.yml index ea2b57b5bd..a77d3d2d05 100644 --- a/.github/workflows/nightly-normal-session-e2e-tests.yml +++ b/.github/workflows/nightly-normal-session-e2e-tests.yml @@ -292,13 +292,13 @@ jobs: - name: Download node binary from GH artifact uses: actions/download-artifact@v4 with: - name: aleph-production-node + name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} path: target/release/ - name: Download chain-bootstrapper from GH artifacts uses: actions/download-artifact@v4 with: - name: chain-bootstrapper-release + name: ${{ needs.build-chain-bootstrapper-production.outputs.artifact-name-binary }} path: target/release/ - name: Run test @@ -322,13 +322,13 @@ jobs: - name: Download node binary from GH artifact uses: actions/download-artifact@v4 with: - name: aleph-production-node + name: ${{ needs.build-production-aleph-node.outputs.artifact-name-binary }} path: target/release/ - name: Download chain-bootstrapper from GH artifacts uses: actions/download-artifact@v4 with: - name: chain-bootstrapper-release + name: ${{ needs.build-chain-bootstrapper-production.outputs.artifact-name-binary }} path: target/release/ - name: Run test diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index d3c2aeb1e7..ce55cdc907 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -24,6 +24,9 @@ jobs: # yamllint disable-line rule:line-length chain-bootstrapper-image-exists: ${{ steps.get-fqdns.outputs.chain-bootstrapper-image-exists }} chain-bootstrapper-fqdn-image: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image }} + # yamllint disable-line rule:line-length + chain-bootstrapper-fqdn-image-latest: ${{ steps.get-fqdns.outputs.chain-bootstrapper-fqdn-image-latest }} + steps: - name: Get FQDNs id: get-fqdns From e2e300020de559cfd69828f13d430c71ac8c5a1d Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 20 May 2024 07:54:27 +0200 Subject: [PATCH 18/19] Fixed validator after merge from main --- .github/workflows/on-pull-request-commit.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/on-pull-request-commit.yml b/.github/workflows/on-pull-request-commit.yml index 238a1f8799..128283f087 100644 --- a/.github/workflows/on-pull-request-commit.yml +++ b/.github/workflows/on-pull-request-commit.yml @@ -80,7 +80,7 @@ jobs: run-e2e-token-transfer-test: name: Run e2e token transfer test needs: - - build-test-node + - build-test-aleph-node - build-aleph-e2e-client-image - build-chain-bootstrapper runs-on: ubuntu-20.04 From 0bca489e191a8dab4089b8ea6d21bbcfe3226544 Mon Sep 17 00:00:00 2001 From: Marcin Date: Mon, 20 May 2024 13:37:45 +0200 Subject: [PATCH 19/19] Revert testing. Bump all actions to v7 --- .github/actions/store-node-and-runtime/action.yml | 4 ++-- .github/workflows/_build-aleph-e2e-client-image.yml | 4 ++-- .github/workflows/_build-aleph-node.yml | 4 ++-- .github/workflows/_build-and-push-cliain.yml | 6 +++--- .github/workflows/_build-chain-bootstrapper.yml | 4 ++-- .github/workflows/_build-production-runtime.yml | 4 ++-- .github/workflows/_check-code-formatting.yml | 2 +- .github/workflows/_check-excluded-packages.yml | 2 +- .github/workflows/_check-production-node-and-runtime.yml | 4 ++-- .github/workflows/_check-runtime-determimism.yml | 2 +- .github/workflows/_push-image-to-ecr.yml | 2 +- .github/workflows/_run-e2e-tests.yml | 2 +- .github/workflows/_sync-from-snapshot.yml | 2 +- .github/workflows/_unit-tests-and-static-checks.yml | 6 +++--- .github/workflows/_update-node-image-infra.yml | 4 ++-- .github/workflows/build-docs.yml | 2 +- .github/workflows/deploy-to-devnet.yml | 2 +- .github/workflows/deploy-to-mainnet.yml | 6 +++--- .github/workflows/deploy-to-testnet.yml | 2 +- .github/workflows/featurenet-create.yml | 4 ++-- .github/workflows/featurenet-delete.yml | 2 +- .github/workflows/featurenet-update.yml | 4 ++-- .github/workflows/nightly-check-node-features-build.yml | 4 ++-- .github/workflows/nightly-e2e-logic-tests.yml | 2 +- .github/workflows/nightly-fe-e2e-tests.yml | 8 ++++---- .github/workflows/nightly-integration-tests.yml | 6 +++--- .github/workflows/nightly-normal-session-e2e-tests.yml | 2 +- .github/workflows/nightly-update-test-mainnet-testnet.yml | 2 +- .github/workflows/nightly-update-test-testnet-main.yml | 2 +- .github/workflows/on-main-or-release-branch-commit.yml | 6 +++--- .github/workflows/on-pull-request-change.yml | 2 +- .github/workflows/on-push-release-tag.yml | 6 +++--- .github/workflows/on-release.yml | 4 ++-- .github/workflows/push-foundation-repo.yml | 4 ++-- .../workflows/weekly-featurenets-short-session-branch.yml | 2 +- .../weekly-featurenets-short-session-full-sha.yml | 2 +- .../workflows/weekly-featurenets-short-session-tag.yml | 2 +- .github/workflows/yaml-lint.yml | 2 +- .github/workflows/yaml-validate.yml | 2 +- 39 files changed, 66 insertions(+), 66 deletions(-) diff --git a/.github/actions/store-node-and-runtime/action.yml b/.github/actions/store-node-and-runtime/action.yml index af101f0320..ffb01c3259 100644 --- a/.github/actions/store-node-and-runtime/action.yml +++ b/.github/actions/store-node-and-runtime/action.yml @@ -38,7 +38,7 @@ runs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Download binary from GH artifacts uses: actions/download-artifact@v4 @@ -66,7 +66,7 @@ runs: aws-region: ${{ env.AWS_REGION }} - name: Copy aleph-node binary to S3 AWS bucket - uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 + uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v7 with: source-path: target source-filename: aleph-node diff --git a/.github/workflows/_build-aleph-e2e-client-image.yml b/.github/workflows/_build-aleph-e2e-client-image.yml index 1c973e1c1c..5ddcf47e6e 100644 --- a/.github/workflows/_build-aleph-e2e-client-image.yml +++ b/.github/workflows/_build-aleph-e2e-client-image.yml @@ -45,10 +45,10 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown diff --git a/.github/workflows/_build-aleph-node.yml b/.github/workflows/_build-aleph-node.yml index cedffa9e2d..c1f36db2b0 100644 --- a/.github/workflows/_build-aleph-node.yml +++ b/.github/workflows/_build-aleph-node.yml @@ -40,10 +40,10 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 - name: Build test aleph-node if: ${{ inputs.production != true }} diff --git a/.github/workflows/_build-and-push-cliain.yml b/.github/workflows/_build-and-push-cliain.yml index 558b1171d0..ee904fc002 100644 --- a/.github/workflows/_build-and-push-cliain.yml +++ b/.github/workflows/_build-and-push-cliain.yml @@ -26,7 +26,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 - name: ${{ env.CARGO_COMMAND }} cliain binary run: | @@ -58,7 +58,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Download cliain from GH artifact uses: actions/download-artifact@v4 @@ -104,7 +104,7 @@ jobs: - name: Copy binary to S3 AWS bucket if: ${{ inputs.check-only != true }} - uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v6 + uses: Cardinal-Cryptography/github-actions/copy-file-to-s3@v7 with: source-path: bin/cliain/target/release source-filename: cliain diff --git a/.github/workflows/_build-chain-bootstrapper.yml b/.github/workflows/_build-chain-bootstrapper.yml index 8a916f3c62..5c7f056ac3 100644 --- a/.github/workflows/_build-chain-bootstrapper.yml +++ b/.github/workflows/_build-chain-bootstrapper.yml @@ -41,10 +41,10 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown diff --git a/.github/workflows/_build-production-runtime.yml b/.github/workflows/_build-production-runtime.yml index 070de43288..7e11eb4349 100644 --- a/.github/workflows/_build-production-runtime.yml +++ b/.github/workflows/_build-production-runtime.yml @@ -31,10 +31,10 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown diff --git a/.github/workflows/_check-code-formatting.yml b/.github/workflows/_check-code-formatting.yml index e57a999442..c71d6a1991 100644 --- a/.github/workflows/_check-code-formatting.yml +++ b/.github/workflows/_check-code-formatting.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Install Nightly Rust Toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: channel: nightly-2024-02-14 targets: wasm32-unknown-unknown diff --git a/.github/workflows/_check-excluded-packages.yml b/.github/workflows/_check-excluded-packages.yml index 550a42036d..3e40b57079 100644 --- a/.github/workflows/_check-excluded-packages.yml +++ b/.github/workflows/_check-excluded-packages.yml @@ -20,7 +20,7 @@ jobs: # by this worfklow. Action install-rust-toolchain should have optional parameter path # in which we pass relative path to aleph-client to read its rust-toolchain.toml file - name: Install Rust Toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 # aleph-client and all its dependees still require nightly Rust version - name: Read aleph-client toolchain diff --git a/.github/workflows/_check-production-node-and-runtime.yml b/.github/workflows/_check-production-node-and-runtime.yml index 508c012eff..f7edadef8b 100644 --- a/.github/workflows/_check-production-node-and-runtime.yml +++ b/.github/workflows/_check-production-node-and-runtime.yml @@ -18,10 +18,10 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown diff --git a/.github/workflows/_check-runtime-determimism.yml b/.github/workflows/_check-runtime-determimism.yml index 325b12e1f6..478c3852c8 100644 --- a/.github/workflows/_check-runtime-determimism.yml +++ b/.github/workflows/_check-runtime-determimism.yml @@ -17,7 +17,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown diff --git a/.github/workflows/_push-image-to-ecr.yml b/.github/workflows/_push-image-to-ecr.yml index 455c7e8ffc..b005444c77 100644 --- a/.github/workflows/_push-image-to-ecr.yml +++ b/.github/workflows/_push-image-to-ecr.yml @@ -35,7 +35,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Download ${{ inputs.binary-artifact-name }} from artifacts uses: actions/download-artifact@v4 diff --git a/.github/workflows/_run-e2e-tests.yml b/.github/workflows/_run-e2e-tests.yml index 22174a4cc2..4c7307610a 100644 --- a/.github/workflows/_run-e2e-tests.yml +++ b/.github/workflows/_run-e2e-tests.yml @@ -393,7 +393,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown components: rust-src diff --git a/.github/workflows/_sync-from-snapshot.yml b/.github/workflows/_sync-from-snapshot.yml index fc89a82a67..f13ebf5ed2 100644 --- a/.github/workflows/_sync-from-snapshot.yml +++ b/.github/workflows/_sync-from-snapshot.yml @@ -71,7 +71,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/_unit-tests-and-static-checks.yml b/.github/workflows/_unit-tests-and-static-checks.yml index af5787ac71..0212d6e60b 100644 --- a/.github/workflows/_unit-tests-and-static-checks.yml +++ b/.github/workflows/_unit-tests-and-static-checks.yml @@ -16,7 +16,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust Toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 - name: Run clippy run: | @@ -39,7 +39,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust Toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 - name: Run Unit Test Suite run: | @@ -57,7 +57,7 @@ jobs: uses: actions/checkout@v4 - name: Install Nightly Rust Toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: channel: nightly-2024-02-14 targets: wasm32-unknown-unknown diff --git a/.github/workflows/_update-node-image-infra.yml b/.github/workflows/_update-node-image-infra.yml index 12255fca67..1bb168bde5 100644 --- a/.github/workflows/_update-node-image-infra.yml +++ b/.github/workflows/_update-node-image-infra.yml @@ -28,7 +28,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Call action Get ECR image names id: get-docker-image-names @@ -40,7 +40,7 @@ jobs: # this step checks indirectly as well that git HEAD has an r-* tag # otherwise ECR image would not exist - name: Check deploy image existence - uses: Cardinal-Cryptography/github-actions/check-image-existence-ecr@v6 + uses: Cardinal-Cryptography/github-actions/check-image-existence-ecr@v7 with: ecr-image: ${{ steps.get-docker-image-names.outputs.ecr-deploy-image }} diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index d49bb6436d..167b8bda33 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -18,7 +18,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 - name: rustdoc | Build aleph-client docs run: | diff --git a/.github/workflows/deploy-to-devnet.yml b/.github/workflows/deploy-to-devnet.yml index 135eac8bbc..9c00992628 100644 --- a/.github/workflows/deploy-to-devnet.yml +++ b/.github/workflows/deploy-to-devnet.yml @@ -149,7 +149,7 @@ jobs: if: always() steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/deploy-to-mainnet.yml b/.github/workflows/deploy-to-mainnet.yml index 690d9a3ac1..f70bc60277 100644 --- a/.github/workflows/deploy-to-mainnet.yml +++ b/.github/workflows/deploy-to-mainnet.yml @@ -30,14 +30,14 @@ jobs: - name: Get Testnet node commit SHA id: get-testnet-node-commit-sha - uses: Cardinal-Cryptography/github-actions/get-node-system-version@v6 + uses: Cardinal-Cryptography/github-actions/get-node-system-version@v7 with: env: testnet - name: Call action get-ref-properties id: get-ref-properties # yamllint disable-line rule:line-length - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Compare Testnet node SHA version with currently deployed SHA if: inputs.force != true @@ -91,7 +91,7 @@ jobs: if: always() steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "always" env: diff --git a/.github/workflows/deploy-to-testnet.yml b/.github/workflows/deploy-to-testnet.yml index 033d629559..b88506588f 100644 --- a/.github/workflows/deploy-to-testnet.yml +++ b/.github/workflows/deploy-to-testnet.yml @@ -54,7 +54,7 @@ jobs: if: always() steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "always" env: diff --git a/.github/workflows/featurenet-create.yml b/.github/workflows/featurenet-create.yml index 2a494ef959..aaaf18c157 100644 --- a/.github/workflows/featurenet-create.yml +++ b/.github/workflows/featurenet-create.yml @@ -115,7 +115,7 @@ jobs: steps: - name: Get aleph-node fqdn path id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v7 with: ref: ${{ inputs.ref }} test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} @@ -179,7 +179,7 @@ jobs: # to prevent this job to be skipped when on of the parent jobs is skipped if: ${{ !cancelled() }} name: Create featurenet from ${{ inputs.ref }} - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@A0-4268 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v7 secrets: inherit with: featurenet-name: ${{ inputs.featurenet-name }} diff --git a/.github/workflows/featurenet-delete.yml b/.github/workflows/featurenet-delete.yml index 2256045a04..51558441ce 100644 --- a/.github/workflows/featurenet-delete.yml +++ b/.github/workflows/featurenet-delete.yml @@ -24,7 +24,7 @@ jobs: delete-featurenet: needs: [check-vars-and-secrets] name: Delete featurenet - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v6 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v7 secrets: inherit with: featurenet-name: ${{ inputs.featurenet-name }} diff --git a/.github/workflows/featurenet-update.yml b/.github/workflows/featurenet-update.yml index 79b3f2028e..878e405b49 100644 --- a/.github/workflows/featurenet-update.yml +++ b/.github/workflows/featurenet-update.yml @@ -80,7 +80,7 @@ jobs: steps: - name: Get aleph-node fqdn path id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v7 with: ref: ${{ inputs.ref }} test-binary: ${{ inputs.short-session == true && 'true' || 'false' }} @@ -119,7 +119,7 @@ jobs: # to prevent this job to be skipped when on of the parent jobs is skipped if: ${{ !cancelled() }} name: Update featurenet - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-update.yml@A0-4268 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-update.yml@v7 secrets: inherit with: featurenet-name: ${{ inputs.featurenet-name }} diff --git a/.github/workflows/nightly-check-node-features-build.yml b/.github/workflows/nightly-check-node-features-build.yml index cb3d503c84..2b715dad0d 100644 --- a/.github/workflows/nightly-check-node-features-build.yml +++ b/.github/workflows/nightly-check-node-features-build.yml @@ -22,7 +22,7 @@ jobs: uses: actions/checkout@v4 - name: Install Rust toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: targets: wasm32-unknown-unknown @@ -54,7 +54,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/nightly-e2e-logic-tests.yml b/.github/workflows/nightly-e2e-logic-tests.yml index 47d79660cf..81594b3fee 100644 --- a/.github/workflows/nightly-e2e-logic-tests.yml +++ b/.github/workflows/nightly-e2e-logic-tests.yml @@ -104,7 +104,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/nightly-fe-e2e-tests.yml b/.github/workflows/nightly-fe-e2e-tests.yml index 6e5899fb22..aa15e0b097 100644 --- a/.github/workflows/nightly-fe-e2e-tests.yml +++ b/.github/workflows/nightly-fe-e2e-tests.yml @@ -38,7 +38,7 @@ jobs: steps: - name: Get aleph-node fqdn path from ${{ github.ref }} id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v7 with: ref: ${{ github.ref }} test-binary: 'false' @@ -100,7 +100,7 @@ jobs: - push-chain-bootstrapper-image-to-ecr if: ${{ !cancelled() }} name: Create featurenet from ${{ github.ref }} - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@A0-4268 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-create.yml@v7 secrets: inherit with: featurenet-name: 'ops-finalization-e2e' @@ -147,7 +147,7 @@ jobs: needs: - runs-finalization-e2e-test-on-fe name: Delete featurenet - uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v6 + uses: Cardinal-Cryptography/github-actions/.github/workflows/_featurenet-delete.yml@v7 secrets: inherit with: featurenet-name: 'ops-finalization-e2e' @@ -161,7 +161,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/nightly-integration-tests.yml b/.github/workflows/nightly-integration-tests.yml index a8d646e2cb..c78fbc90f3 100644 --- a/.github/workflows/nightly-integration-tests.yml +++ b/.github/workflows/nightly-integration-tests.yml @@ -29,14 +29,14 @@ jobs: uses: actions/checkout@v4 - name: Install Rust Toolchain - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 - name: Run Test Suite run: | cargo test --workspace --exclude baby-liminal-extension - name: Install Rust Toolchain For Chain Extension Tests - uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v6 + uses: Cardinal-Cryptography/github-actions/install-rust-toolchain@v7 with: channel: nightly-2024-02-14 targets: wasm32-unknown-unknown @@ -52,7 +52,7 @@ jobs: if: ${{ !cancelled() }} steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/nightly-normal-session-e2e-tests.yml b/.github/workflows/nightly-normal-session-e2e-tests.yml index a77d3d2d05..dfa7e97d53 100644 --- a/.github/workflows/nightly-normal-session-e2e-tests.yml +++ b/.github/workflows/nightly-normal-session-e2e-tests.yml @@ -393,7 +393,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/nightly-update-test-mainnet-testnet.yml b/.github/workflows/nightly-update-test-mainnet-testnet.yml index 16b82af11a..5a422b1f16 100644 --- a/.github/workflows/nightly-update-test-mainnet-testnet.yml +++ b/.github/workflows/nightly-update-test-mainnet-testnet.yml @@ -63,7 +63,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/nightly-update-test-testnet-main.yml b/.github/workflows/nightly-update-test-testnet-main.yml index cf8d0675c2..a7ba3a757a 100644 --- a/.github/workflows/nightly-update-test-testnet-main.yml +++ b/.github/workflows/nightly-update-test-testnet-main.yml @@ -63,7 +63,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/on-main-or-release-branch-commit.yml b/.github/workflows/on-main-or-release-branch-commit.yml index ce55cdc907..3b96a9306c 100644 --- a/.github/workflows/on-main-or-release-branch-commit.yml +++ b/.github/workflows/on-main-or-release-branch-commit.yml @@ -30,7 +30,7 @@ jobs: steps: - name: Get FQDNs id: get-fqdns - uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@A0-4268 + uses: Cardinal-Cryptography/github-actions/get-aleph-node-fqdn-image@v7 with: ref: ${{ github.ref }} ecr-dev-node-repo: ${{ vars.ECR_DEV_ALEPH_NODE_REPO }} @@ -144,7 +144,7 @@ jobs: uses: actions/checkout@v4 - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "always" env: @@ -157,7 +157,7 @@ jobs: needs: [push-production-node-image-to-ecr] steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/on-pull-request-change.yml b/.github/workflows/on-pull-request-change.yml index 5930d998ca..c1e774f6ae 100644 --- a/.github/workflows/on-pull-request-change.yml +++ b/.github/workflows/on-pull-request-change.yml @@ -23,6 +23,6 @@ jobs: - name: VALIDATE | Check PR title # yamllint disable-line rule:line-length - uses: Cardinal-Cryptography/github-actions/check-pr-title@v6 + uses: Cardinal-Cryptography/github-actions/check-pr-title@v7 with: pr-title: ${{ github.event.pull_request.title }} diff --git a/.github/workflows/on-push-release-tag.yml b/.github/workflows/on-push-release-tag.yml index f98f6290bd..f143d62fb3 100644 --- a/.github/workflows/on-push-release-tag.yml +++ b/.github/workflows/on-push-release-tag.yml @@ -21,7 +21,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Read node version id: read-node-version @@ -72,7 +72,7 @@ jobs: # fail, as there would be no aleph-node- image on ECR for that is not on main # or release branch, see on-main-or-release-branch-commit.yml - name: Check release candidate docker image existence - uses: Cardinal-Cryptography/github-actions/check-image-existence-ecr@v6 + uses: Cardinal-Cryptography/github-actions/check-image-existence-ecr@v7 with: ecr-image: ${{ steps.get-docker-image-names.outputs.ecr-rc-image }} @@ -93,7 +93,7 @@ jobs: if: always() steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "always" env: diff --git a/.github/workflows/on-release.yml b/.github/workflows/on-release.yml index 7366dbf643..20e4616e6d 100644 --- a/.github/workflows/on-release.yml +++ b/.github/workflows/on-release.yml @@ -27,7 +27,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Configure AWS credentials uses: aws-actions/configure-aws-credentials@v4 @@ -81,7 +81,7 @@ jobs: if: always() steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "always" env: diff --git a/.github/workflows/push-foundation-repo.yml b/.github/workflows/push-foundation-repo.yml index 298b1cf938..66eecc1425 100644 --- a/.github/workflows/push-foundation-repo.yml +++ b/.github/workflows/push-foundation-repo.yml @@ -51,7 +51,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties # yamllint disable-line rule:line-length - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Push to Aleph-Zero-Foundation # yamllint disable rule:line-length @@ -72,7 +72,7 @@ jobs: - name: Call action get-ref-properties id: get-ref-properties # yamllint disable-line rule:line-length - uses: Cardinal-Cryptography/github-actions/get-ref-properties@v6 + uses: Cardinal-Cryptography/github-actions/get-ref-properties@v7 - name: Checkout Aleph-Zero-Foundation repository uses: actions/checkout@v4 diff --git a/.github/workflows/weekly-featurenets-short-session-branch.yml b/.github/workflows/weekly-featurenets-short-session-branch.yml index 758fcacdf2..3fcc9d3af1 100644 --- a/.github/workflows/weekly-featurenets-short-session-branch.yml +++ b/.github/workflows/weekly-featurenets-short-session-branch.yml @@ -48,7 +48,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/weekly-featurenets-short-session-full-sha.yml b/.github/workflows/weekly-featurenets-short-session-full-sha.yml index f3c1d9c7b4..0ae89d6a96 100644 --- a/.github/workflows/weekly-featurenets-short-session-full-sha.yml +++ b/.github/workflows/weekly-featurenets-short-session-full-sha.yml @@ -48,7 +48,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/weekly-featurenets-short-session-tag.yml b/.github/workflows/weekly-featurenets-short-session-tag.yml index d9d9225777..ac4adf661b 100644 --- a/.github/workflows/weekly-featurenets-short-session-tag.yml +++ b/.github/workflows/weekly-featurenets-short-session-tag.yml @@ -48,7 +48,7 @@ jobs: github.event_name != 'workflow_dispatch' steps: - name: Send Slack message - uses: Cardinal-Cryptography/github-actions/slack-notification@v6 + uses: Cardinal-Cryptography/github-actions/slack-notification@v7 with: notify-on: "failure" env: diff --git a/.github/workflows/yaml-lint.yml b/.github/workflows/yaml-lint.yml index 23fecabfe9..0d6abce8c1 100644 --- a/.github/workflows/yaml-lint.yml +++ b/.github/workflows/yaml-lint.yml @@ -19,4 +19,4 @@ jobs: steps: - name: LINT | Execute YAML linter # yamllint disable-line rule:line-length - uses: Cardinal-Cryptography/github-actions/yaml-lint@v6 + uses: Cardinal-Cryptography/github-actions/yaml-lint@v7 diff --git a/.github/workflows/yaml-validate.yml b/.github/workflows/yaml-validate.yml index c8750ac36a..129fb346d8 100644 --- a/.github/workflows/yaml-validate.yml +++ b/.github/workflows/yaml-validate.yml @@ -19,4 +19,4 @@ jobs: steps: - name: VALIDATE | Execute github-actions-validator # yamllint disable-line rule:line-length - uses: Cardinal-Cryptography/github-actions/yaml-validate@v6 + uses: Cardinal-Cryptography/github-actions/yaml-validate@v7