From d65cf59954b363dc3d86f329c2274dc5e585574d Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 17:00:48 +0100 Subject: [PATCH 1/8] Add uploading binaries to CI S3 bucket --- .github/workflows/build-node-and-runtime.yml | 58 +++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build-node-and-runtime.yml b/.github/workflows/build-node-and-runtime.yml index 0aff11ade7..8cfe7f716b 100644 --- a/.github/workflows/build-node-and-runtime.yml +++ b/.github/workflows/build-node-and-runtime.yml @@ -12,7 +12,6 @@ on: required: false type: string - jobs: build: name: Build binary artifacts @@ -25,6 +24,10 @@ jobs: with: ref: ${{ inputs.ref }} + - name: Get branch name and commit SHA + id: get_branch + uses: ./.github/actions/get-branch + - name: Install Rust toolchain uses: actions-rs/toolchain@v1 @@ -56,6 +59,37 @@ jobs: if-no-files-found: error retention-days: 7 + - name: S3 CI | Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + env: + AWS_REGION: us-east-1 + with: + aws-access-key-id: ${{ secrets.AWS_DEVNET_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + - name: S3 CI | Copy release binary to S3 bucket + shell: bash + env: + BINARY_DIR: target/production + BINARY_FILE: aleph-node + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-node + S3BUCKET_FILE: aleph-node-${{ steps.get_branch.sha_short }}.tar.gz + run: | + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + + - name: S3 CI | Copy release runtime to S3 bucket + shell: bash + env: + BINARY_DIR: target/production/wbuild/aleph-runtime + BINARY_FILE: aleph_runtime.compact.wasm + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-runtime + S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.sha_short }}.tar.gz + run: | + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + - name: Build test binary run: cargo build --release -p aleph-node --features "short_session enable_treasury_proposals" @@ -75,5 +109,27 @@ jobs: if-no-files-found: error retention-days: 7 + - name: S3 CI | Copy test binary to S3 bucket + shell: bash + env: + BINARY_DIR: target/release + BINARY_FILE: aleph-node + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-test-node + S3BUCKET_FILE: aleph-test-node-${{ steps.get_branch.sha_short }}.tar.gz + run: | + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + + - name: S3 CI | Copy test runtime to S3 bucket + shell: bash + env: + BINARY_DIR: target/release/wbuild/aleph-runtime + BINARY_FILE: aleph_runtime.compact.wasm + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-test-runtime + S3BUCKET_FILE: aleph-test-runtime-${{ steps.get_branch.sha_short }}.tar.gz + run: | + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + - name: Cleanup cache uses: ./.github/actions/post-cache From 6c93395f1f3c922169616df404cc1f179f684abb Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 17:02:40 +0100 Subject: [PATCH 2/8] Fix invalid variables used --- .github/workflows/build-node-and-runtime.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-node-and-runtime.yml b/.github/workflows/build-node-and-runtime.yml index 8cfe7f716b..fbb4369fbe 100644 --- a/.github/workflows/build-node-and-runtime.yml +++ b/.github/workflows/build-node-and-runtime.yml @@ -76,8 +76,8 @@ jobs: S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-node S3BUCKET_FILE: aleph-node-${{ steps.get_branch.sha_short }}.tar.gz run: | - tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} - aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} - name: S3 CI | Copy release runtime to S3 bucket shell: bash @@ -87,8 +87,8 @@ jobs: S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-runtime S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.sha_short }}.tar.gz run: | - tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} - aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} - name: Build test binary run: cargo build --release -p aleph-node --features "short_session enable_treasury_proposals" @@ -117,8 +117,8 @@ jobs: S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-test-node S3BUCKET_FILE: aleph-test-node-${{ steps.get_branch.sha_short }}.tar.gz run: | - tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} - aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} - name: S3 CI | Copy test runtime to S3 bucket shell: bash @@ -128,8 +128,8 @@ jobs: S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-test-runtime S3BUCKET_FILE: aleph-test-runtime-${{ steps.get_branch.sha_short }}.tar.gz run: | - tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ BINARY_DIR }} ${{ BINARY_FILE }} - aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ S3BUCKET_URL }}/${{ S3BUCKET_FILE }} + tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} + aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} - name: Cleanup cache uses: ./.github/actions/post-cache From 2fee19d49c5025e0bf52fad58216d0108f7e9cda Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 17:24:53 +0100 Subject: [PATCH 3/8] Add secrets: inherit to all the calls to build-node-and-runtime workflow --- .github/workflows/deploy-feature-envs.yaml | 1 + .github/workflows/e2e-tests-main-devnet.yml | 1 + .github/workflows/nightly-pipeline.yaml | 1 + 3 files changed, 3 insertions(+) diff --git a/.github/workflows/deploy-feature-envs.yaml b/.github/workflows/deploy-feature-envs.yaml index 1886dce81f..b16b7fb80e 100644 --- a/.github/workflows/deploy-feature-envs.yaml +++ b/.github/workflows/deploy-feature-envs.yaml @@ -31,6 +31,7 @@ jobs: if: (github.event.label.name == '[AZERO] DEPLOY-FEATURE-ENV') || (github.event.label.name == '[AZERO] DEPLOY-HOT-FEATURE-ENV') name: Build runtime and aleph-node binary artefacts uses: ./.github/workflows/build-node-and-runtime.yml + secrets: inherit push_pr_image: if: (github.event.label.name == '[AZERO] DEPLOY-FEATURE-ENV') || (github.event.label.name == '[AZERO] DEPLOY-HOT-FEATURE-ENV') diff --git a/.github/workflows/e2e-tests-main-devnet.yml b/.github/workflows/e2e-tests-main-devnet.yml index 2c4bf8d040..81c9b09c6e 100644 --- a/.github/workflows/e2e-tests-main-devnet.yml +++ b/.github/workflows/e2e-tests-main-devnet.yml @@ -23,6 +23,7 @@ jobs: build-new-node: name: Build node and runtime artifacts (PR version) uses: ./.github/workflows/build-node-and-runtime.yml + secrets: inherit build-test-docker: needs: [build-new-node] diff --git a/.github/workflows/nightly-pipeline.yaml b/.github/workflows/nightly-pipeline.yaml index 72b5a3df0a..4dd23f6aae 100644 --- a/.github/workflows/nightly-pipeline.yaml +++ b/.github/workflows/nightly-pipeline.yaml @@ -12,6 +12,7 @@ jobs: build-new-node: name: Build node and runtime artifacts (PR version) uses: ./.github/workflows/build-node-and-runtime.yml + secrets: inherit build-test-docker: needs: [build-new-node] From 9e183289770789c63f21187767c5d7bd71cd55af Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 17:56:03 +0100 Subject: [PATCH 4/8] Fix invalid output --- .github/workflows/build-node-and-runtime.yml | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/.github/workflows/build-node-and-runtime.yml b/.github/workflows/build-node-and-runtime.yml index fbb4369fbe..389ea20458 100644 --- a/.github/workflows/build-node-and-runtime.yml +++ b/.github/workflows/build-node-and-runtime.yml @@ -73,8 +73,8 @@ jobs: env: BINARY_DIR: target/production BINARY_FILE: aleph-node - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-node - S3BUCKET_FILE: aleph-node-${{ steps.get_branch.sha_short }}.tar.gz + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node + S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} @@ -84,8 +84,8 @@ jobs: env: BINARY_DIR: target/production/wbuild/aleph-runtime BINARY_FILE: aleph_runtime.compact.wasm - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-runtime - S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.sha_short }}.tar.gz + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime + S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} @@ -114,8 +114,8 @@ jobs: env: BINARY_DIR: target/release BINARY_FILE: aleph-node - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-test-node - S3BUCKET_FILE: aleph-test-node-${{ steps.get_branch.sha_short }}.tar.gz + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-node + S3BUCKET_FILE: aleph-test-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} @@ -125,8 +125,8 @@ jobs: env: BINARY_DIR: target/release/wbuild/aleph-runtime BINARY_FILE: aleph_runtime.compact.wasm - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.sha_short }}/aleph-test-runtime - S3BUCKET_FILE: aleph-test-runtime-${{ steps.get_branch.sha_short }}.tar.gz + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-runtime + S3BUCKET_FILE: aleph-test-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} aws s3 cp ${{ env.S3BUCKET_FILE }} ${{ env.S3BUCKET_URL }}/${{ env.S3BUCKET_FILE }} From 52b183a3bc25c3766d178b6cab8b67dca12813c5 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Mon, 31 Oct 2022 19:08:54 +0100 Subject: [PATCH 5/8] Add adding assets to prereleases and releases --- .github/workflows/deploy-mainnet.yml | 24 ++++++++++++++++++++++++ .github/workflows/deploy-testnet.yml | 24 ++++++++++++++++++++++++ 2 files changed, 48 insertions(+) diff --git a/.github/workflows/deploy-mainnet.yml b/.github/workflows/deploy-mainnet.yml index fdff14f645..c0b0b82a2d 100644 --- a/.github/workflows/deploy-mainnet.yml +++ b/.github/workflows/deploy-mainnet.yml @@ -72,6 +72,30 @@ jobs: docker push ${{ env.DOCKERHUB_MAINNET_IMAGE }} docker push ${{ env.DOCKERHUB_MAINNET_LATEST_IMAGE }} + - name: S3 CI | Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + env: + AWS_REGION: us-east-1 + with: + aws-access-key-id: ${{ secrets.AWS_DEVNET_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + - name: S3 CI | Download release binary from S3 bucket + shell: bash + env: + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node + S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz + run: | + aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} + + - name: RELEASE ASSET | Add binary to the release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz + - name: GIT | Checkout aleph-apps repo uses: actions/checkout@master with: diff --git a/.github/workflows/deploy-testnet.yml b/.github/workflows/deploy-testnet.yml index 91eac839fb..ac9b59ab5a 100644 --- a/.github/workflows/deploy-testnet.yml +++ b/.github/workflows/deploy-testnet.yml @@ -79,6 +79,30 @@ jobs: docker push ${{ env.DOCKERHUB_TESTNET_IMAGE }} docker push ${{ env.DOCKERHUB_TESTNET_LATEST_IMAGE }} + - name: S3 CI | Configure AWS credentials + uses: aws-actions/configure-aws-credentials@v1 + env: + AWS_REGION: us-east-1 + with: + aws-access-key-id: ${{ secrets.AWS_DEVNET_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} + aws-region: ${{ env.AWS_REGION }} + + - name: S3 CI | Download release binary from S3 bucket + shell: bash + env: + S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node + S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz + run: | + aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} + + - name: RELEASE ASSET | Add binary to the release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz + - name: GIT | Checkout aleph-apps repo uses: actions/checkout@master with: From 7fc4588a7c161eacd1a2ccdc1b0f296284696ed5 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Tue, 6 Dec 2022 15:57:17 +0100 Subject: [PATCH 6/8] Change CI_S3BUCKET_NAME to CI_MAINNET_S3BUCKET_NAME --- .github/workflows/build-node-and-runtime.yml | 12 ++++++------ .github/workflows/deploy-mainnet.yml | 6 +++--- .github/workflows/deploy-testnet.yml | 2 +- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/.github/workflows/build-node-and-runtime.yml b/.github/workflows/build-node-and-runtime.yml index 389ea20458..90ecb02fc8 100644 --- a/.github/workflows/build-node-and-runtime.yml +++ b/.github/workflows/build-node-and-runtime.yml @@ -64,8 +64,8 @@ jobs: env: AWS_REGION: us-east-1 with: - aws-access-key-id: ${{ secrets.AWS_DEVNET_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} + aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} - name: S3 CI | Copy release binary to S3 bucket @@ -73,7 +73,7 @@ jobs: env: BINARY_DIR: target/production BINARY_FILE: aleph-node - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} @@ -84,7 +84,7 @@ jobs: env: BINARY_DIR: target/production/wbuild/aleph-runtime BINARY_FILE: aleph_runtime.compact.wasm - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} @@ -114,7 +114,7 @@ jobs: env: BINARY_DIR: target/release BINARY_FILE: aleph-node - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-node + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-node S3BUCKET_FILE: aleph-test-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} @@ -125,7 +125,7 @@ jobs: env: BINARY_DIR: target/release/wbuild/aleph-runtime BINARY_FILE: aleph_runtime.compact.wasm - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-runtime + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-test-runtime S3BUCKET_FILE: aleph-test-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | tar -cvzf ${{ env.S3BUCKET_FILE }} -C ${{ env.BINARY_DIR }} ${{ env.BINARY_FILE }} diff --git a/.github/workflows/deploy-mainnet.yml b/.github/workflows/deploy-mainnet.yml index c0b0b82a2d..bf6a67aed2 100644 --- a/.github/workflows/deploy-mainnet.yml +++ b/.github/workflows/deploy-mainnet.yml @@ -77,14 +77,14 @@ jobs: env: AWS_REGION: us-east-1 with: - aws-access-key-id: ${{ secrets.AWS_DEVNET_ACCESS_KEY_ID }} - aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} + aws-access-key-id: ${{ secrets.AWS_MAINNET_ACCESS_KEY_ID }} + aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} - name: S3 CI | Download release binary from S3 bucket shell: bash env: - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} diff --git a/.github/workflows/deploy-testnet.yml b/.github/workflows/deploy-testnet.yml index ac9b59ab5a..e8dfbcbce8 100644 --- a/.github/workflows/deploy-testnet.yml +++ b/.github/workflows/deploy-testnet.yml @@ -91,7 +91,7 @@ jobs: - name: S3 CI | Download release binary from S3 bucket shell: bash env: - S3BUCKET_URL: s3://${{ secrets.CI_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz run: | aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} From b637c76bfcaa136fa83c72391b516b7c5610f7a7 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Wed, 7 Dec 2022 16:31:41 +0100 Subject: [PATCH 7/8] Add runtime to prerelease and release assets --- .github/workflows/deploy-mainnet.yml | 15 +++++++++++++++ .github/workflows/deploy-testnet.yml | 15 +++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/deploy-mainnet.yml b/.github/workflows/deploy-mainnet.yml index bf6a67aed2..ab2030dc70 100644 --- a/.github/workflows/deploy-mainnet.yml +++ b/.github/workflows/deploy-mainnet.yml @@ -89,6 +89,14 @@ jobs: run: | aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} + - name: S3 CI | Download release runtime from S3 bucket + shell: bash + env: + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime + S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz + run: | + aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} + - name: RELEASE ASSET | Add binary to the release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -96,6 +104,13 @@ jobs: files: | aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz + - name: RELEASE ASSET | Add runtime to the release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz + - name: GIT | Checkout aleph-apps repo uses: actions/checkout@master with: diff --git a/.github/workflows/deploy-testnet.yml b/.github/workflows/deploy-testnet.yml index 595e6485d3..690025f89a 100644 --- a/.github/workflows/deploy-testnet.yml +++ b/.github/workflows/deploy-testnet.yml @@ -96,6 +96,14 @@ jobs: run: | aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} + - name: S3 CI | Download release runtime from S3 bucket + shell: bash + env: + S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-runtime + S3BUCKET_FILE: aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz + run: | + aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} + - name: RELEASE ASSET | Add binary to the release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') @@ -103,6 +111,13 @@ jobs: files: | aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz + - name: RELEASE ASSET | Add runtime to the release + uses: softprops/action-gh-release@v1 + if: startsWith(github.ref, 'refs/tags/') + with: + files: | + aleph-runtime-${{ steps.get_branch.outputs.sha_short }}.tar.gz + - name: GIT | Checkout aleph-apps repo uses: actions/checkout@master with: From 61661b73fdac77e58348437280039861f52232b1 Mon Sep 17 00:00:00 2001 From: Mikolaj Gasior Date: Thu, 8 Dec 2022 11:59:53 +0100 Subject: [PATCH 8/8] Remove adding aleph-node binary as release asset --- .github/workflows/deploy-mainnet.yml | 15 --------------- .github/workflows/deploy-testnet.yml | 15 --------------- 2 files changed, 30 deletions(-) diff --git a/.github/workflows/deploy-mainnet.yml b/.github/workflows/deploy-mainnet.yml index ab2030dc70..c63e1cc4ba 100644 --- a/.github/workflows/deploy-mainnet.yml +++ b/.github/workflows/deploy-mainnet.yml @@ -81,14 +81,6 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_MAINNET_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} - - name: S3 CI | Download release binary from S3 bucket - shell: bash - env: - S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node - S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz - run: | - aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} - - name: S3 CI | Download release runtime from S3 bucket shell: bash env: @@ -97,13 +89,6 @@ jobs: run: | aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} - - name: RELEASE ASSET | Add binary to the release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz - - name: RELEASE ASSET | Add runtime to the release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/') diff --git a/.github/workflows/deploy-testnet.yml b/.github/workflows/deploy-testnet.yml index 690025f89a..827ae6d7da 100644 --- a/.github/workflows/deploy-testnet.yml +++ b/.github/workflows/deploy-testnet.yml @@ -88,14 +88,6 @@ jobs: aws-secret-access-key: ${{ secrets.AWS_DEVNET_SECRET_ACCESS_KEY }} aws-region: ${{ env.AWS_REGION }} - - name: S3 CI | Download release binary from S3 bucket - shell: bash - env: - S3BUCKET_URL: s3://${{ secrets.CI_MAINNET_S3BUCKET_NAME }}/builds/aleph-node/commits/${{ steps.get_branch.outputs.sha_short }}/aleph-node - S3BUCKET_FILE: aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz - run: | - aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} - - name: S3 CI | Download release runtime from S3 bucket shell: bash env: @@ -104,13 +96,6 @@ jobs: run: | aws s3 cp ${{ env.S3BUCKET_URL }}/${{ S3BUCKET_FILE }} ${{ env.S3BUCKET_FILE }} - - name: RELEASE ASSET | Add binary to the release - uses: softprops/action-gh-release@v1 - if: startsWith(github.ref, 'refs/tags/') - with: - files: | - aleph-node-${{ steps.get_branch.outputs.sha_short }}.tar.gz - - name: RELEASE ASSET | Add runtime to the release uses: softprops/action-gh-release@v1 if: startsWith(github.ref, 'refs/tags/')