From e44bf98e230a38cc6c613c5d50d7874299699379 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Mon, 10 Feb 2025 20:18:08 +0100 Subject: [PATCH 1/8] move cumulus pipeline to gha --- .../zombienet-reusable-preflight.yml | 10 +- .github/workflows/zombienet_cumulus.yml | 315 ++++++++++++++++++ 2 files changed, 324 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/zombienet_cumulus.yml diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index f5ac43741ad62..3195cd60b31cd 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -239,4 +239,12 @@ jobs: fi sleep 10 done - echo "CI workflow is done." + + #check if the build succeeded + CONCLUSION=$(gh run ls -c $SHA -w "Build and push images" --json name,conclusion --jq '.[] | select(.name == "Build and push images") | .conclusion') + if [[ $CONCLISION == "success"]]; then + echo "CI workflow is done." + else + echo "::warning:: CI workflow ('Build and push images') fails" + exit 1 + fi; diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml new file mode 100644 index 0000000000000..8b54ec44aac90 --- /dev/null +++ b/.github/workflows/zombienet_cumulus.yml @@ -0,0 +1,315 @@ +name: Zombienet Cumulus + +on: + push: + branches: + - master + pull_request: + types: [opened, synchronize, reopened, ready_for_review] + merge_group: +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + +env: + RUN_IN_CONTAINER: 1 + FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 + LOCAL_DIR: "./cumulus/zombienet/tests" + GHA_CLUSTER_SERVER_ADDR: "https://kubernetes.default:443" + +# only run if we have changes in [subtrate, cumulus, polkadot] directories or this workflow. +jobs: + preflight: + uses: ./.github/workflows/zombienet-reusable-preflight.yml + + zombienet-cumulus-0001-sync_blocks_from_tip_without_connected_collator: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0001-sync_blocks_from_tip_without_connected_collator.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + + zombienet-cumulus-0002-pov_recovery: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0002-pov_recovery.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + + # + zombienet-cumulus-0003-full_node_catching_up: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0003-full_node_catching_up.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + # + # + zombienet-cumulus-0004-runtime_upgrade: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - uses: actions/download-artifact@v4.1.8 + with: + name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }} + + - name: tar + run: tar -xvf artifacts.tar + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + ls -ltr * + cp ./artifacts/zombienet/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm /tmp/ + ls /tmp + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0004-runtime_upgrade.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + # + # + zombienet-cumulus-0005-migrate_solo_to_para: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0005-migrate_solo_to_para.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + # + zombienet-cumulus-0006-rpc_collator_builds_blocks: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0006-rpc_collator_builds_blocks.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + # + zombienet-cumulus-0007-full_node_warp_sync: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0007-full_node_warp_sync.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + # + zombienet-cumulus-0008-elastic_authoring: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0008-elastic_authoring.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* + # + zombienet-cumulus-0009-elastic_pov_recovery: + needs: [preflight] + if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} + runs-on: ${{ needs.preflight.outputs.ZOMBIENET_RUNNER }} # NOTE: should be zombienet-arc-runner (without quotes) + timeout-minutes: 60 + container: + image: ${{ needs.preflight.outputs.ZOMBIENET_IMAGE }} + env: + RELAY_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/polkadot-debug:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + COL_IMAGE: "${{ needs.preflight.outputs.TEMP_IMAGES_BASE }}/test-parachain:${{ needs.preflight.outputs.DOCKER_IMAGES_VERSION }}" + steps: + - name: Checkout + uses: actions/checkout@v4 + + - name: script + run: | + echo "RELAY_IMAGE: $RELAY_IMAGE" + echo "COL_IMAGE: $COL_IMAGE" + export DEBUG=${{ needs.preflight.outputs.DEBUG }} + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh + --local-dir="$(pwd)/$LOCAL_DIR" + --concurrency=1 + --test="0009-elastic_pov_recovery.zndsl" + + - name: upload logs + uses: actions/upload-artifact@v4 + with: + name: zombienet-logs-${{ github.job }}-${{ github.sha }} + path: | + /tmp/zombie*/logs/* From 1dc73eb1e89a64c5e3596a7282e5c1b5c817422a Mon Sep 17 00:00:00 2001 From: Javier Viola <363911+pepoviola@users.noreply.github.com> Date: Tue, 11 Feb 2025 09:30:26 +0100 Subject: [PATCH 2/8] Update .github/workflows/zombienet-reusable-preflight.yml --- .github/workflows/zombienet-reusable-preflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index 3195cd60b31cd..1116802e777ba 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -245,6 +245,6 @@ jobs: if [[ $CONCLISION == "success"]]; then echo "CI workflow is done." else - echo "::warning:: CI workflow ('Build and push images') fails" + echo "::warning:: CI workflow ('Build and push images') fails with conclusion: $CONCLISION" exit 1 fi; From 6456875348e614545d20b12337716619512911eb Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 11 Feb 2025 10:16:23 +0100 Subject: [PATCH 3/8] typo --- .github/workflows/zombienet-reusable-preflight.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index 1116802e777ba..05f796ba77a72 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -242,8 +242,8 @@ jobs: #check if the build succeeded CONCLUSION=$(gh run ls -c $SHA -w "Build and push images" --json name,conclusion --jq '.[] | select(.name == "Build and push images") | .conclusion') - if [[ $CONCLISION == "success"]]; then - echo "CI workflow is done." + if [[ $CONCLISION == "success" ]]; then + echo "CI workflow succeeded." else echo "::warning:: CI workflow ('Build and push images') fails with conclusion: $CONCLISION" exit 1 From b1d163060136b5a8c3845ad4263fd1f1594f2b76 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 11 Feb 2025 10:50:24 +0100 Subject: [PATCH 4/8] typo --- .github/workflows/zombienet-reusable-preflight.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index 05f796ba77a72..bc8a3b10234fd 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -242,9 +242,9 @@ jobs: #check if the build succeeded CONCLUSION=$(gh run ls -c $SHA -w "Build and push images" --json name,conclusion --jq '.[] | select(.name == "Build and push images") | .conclusion') - if [[ $CONCLISION == "success" ]]; then + if [[ $CONCLUSION == "success" ]]; then echo "CI workflow succeeded." else - echo "::warning:: CI workflow ('Build and push images') fails with conclusion: $CONCLISION" + echo "::warning:: CI workflow ('Build and push images') fails with conclusion: $CONCLUSION" exit 1 fi; From bf9f3e5c4bab1fb721209e096e0053c7b1889dcd Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 11 Feb 2025 11:33:52 +0100 Subject: [PATCH 5/8] fix new lines in script --- .github/workflows/zombienet_cumulus.yml | 70 ++++++++++++------------- 1 file changed, 34 insertions(+), 36 deletions(-) diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml index 8b54ec44aac90..394926afd0855 100644 --- a/.github/workflows/zombienet_cumulus.yml +++ b/.github/workflows/zombienet_cumulus.yml @@ -41,9 +41,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0001-sync_blocks_from_tip_without_connected_collator.zndsl" - name: upload logs @@ -72,9 +72,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0002-pov_recovery.zndsl" - name: upload logs @@ -84,7 +84,6 @@ jobs: path: | /tmp/zombie*/logs/* - # zombienet-cumulus-0003-full_node_catching_up: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -104,9 +103,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0003-full_node_catching_up.zndsl" - name: upload logs @@ -115,8 +114,7 @@ jobs: name: zombienet-logs-${{ github.job }}-${{ github.sha }} path: | /tmp/zombie*/logs/* - # - # + zombienet-cumulus-0004-runtime_upgrade: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -146,9 +144,9 @@ jobs: cp ./artifacts/zombienet/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm /tmp/ ls /tmp export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0004-runtime_upgrade.zndsl" - name: upload logs @@ -157,8 +155,8 @@ jobs: name: zombienet-logs-${{ github.job }}-${{ github.sha }} path: | /tmp/zombie*/logs/* - # - # + + zombienet-cumulus-0005-migrate_solo_to_para: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -178,9 +176,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0005-migrate_solo_to_para.zndsl" - name: upload logs @@ -189,7 +187,7 @@ jobs: name: zombienet-logs-${{ github.job }}-${{ github.sha }} path: | /tmp/zombie*/logs/* - # + zombienet-cumulus-0006-rpc_collator_builds_blocks: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -209,9 +207,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0006-rpc_collator_builds_blocks.zndsl" - name: upload logs @@ -220,7 +218,7 @@ jobs: name: zombienet-logs-${{ github.job }}-${{ github.sha }} path: | /tmp/zombie*/logs/* - # + zombienet-cumulus-0007-full_node_warp_sync: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -240,9 +238,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0007-full_node_warp_sync.zndsl" - name: upload logs @@ -251,7 +249,7 @@ jobs: name: zombienet-logs-${{ github.job }}-${{ github.sha }} path: | /tmp/zombie*/logs/* - # + zombienet-cumulus-0008-elastic_authoring: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -271,9 +269,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0008-elastic_authoring.zndsl" - name: upload logs @@ -282,7 +280,7 @@ jobs: name: zombienet-logs-${{ github.job }}-${{ github.sha }} path: | /tmp/zombie*/logs/* - # + zombienet-cumulus-0009-elastic_pov_recovery: needs: [preflight] if: ${{ needs.preflight.outputs.changes_substrate || needs.preflight.outputs.changes_cumulus || needs.preflight.outputs.changes_polkadot }} @@ -302,9 +300,9 @@ jobs: echo "RELAY_IMAGE: $RELAY_IMAGE" echo "COL_IMAGE: $COL_IMAGE" export DEBUG=${{ needs.preflight.outputs.DEBUG }} - /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh - --local-dir="$(pwd)/$LOCAL_DIR" - --concurrency=1 + /home/nonroot/zombie-net/scripts/ci/run-test-local-env-manager.sh \ + --local-dir="$(pwd)/$LOCAL_DIR" \ + --concurrency=1 \ --test="0009-elastic_pov_recovery.zndsl" - name: upload logs From c71e1279b0ce7352e4bef16d180f330bae32edf7 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Tue, 11 Feb 2025 13:08:51 +0100 Subject: [PATCH 6/8] add token --- .github/workflows/zombienet_cumulus.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml index 394926afd0855..f7e25024ed45c 100644 --- a/.github/workflows/zombienet_cumulus.yml +++ b/.github/workflows/zombienet_cumulus.yml @@ -132,6 +132,7 @@ jobs: - uses: actions/download-artifact@v4.1.8 with: name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }} + github-token: ${{ secrets.GITHUB_TOKEN }} - name: tar run: tar -xvf artifacts.tar From e4701e84cd3bd0f82bd5e4f0637ca7048e694eee Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Wed, 12 Feb 2025 10:12:25 +0100 Subject: [PATCH 7/8] store build run id and use it for download --- .../workflows/zombienet-reusable-preflight.yml | 15 +++++++++++++-- .github/workflows/zombienet_cumulus.yml | 1 + 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index bc8a3b10234fd..3b836bd200b4a 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -65,6 +65,11 @@ on: SOURCE_REF_SLUG: value: ${{ jobs.preflight.outputs.SOURCE_REF_SLUG }} + BUILD_RUN_ID: + value: ${{ jobs.preflight.outputs.SOURCE_REF_SLUG }} + description: | + Id of the build run, needed to download the artifacts. + # Zombie vars PUSHGATEWAY_URL: value: ${{ jobs.preflight.outputs.PUSHGATEWAY_URL }} @@ -216,10 +221,13 @@ jobs: needs: [ci-env] runs-on: ubuntu-latest timeout-minutes: 30 + outputs: + BUILD_RUN_ID: ${{ steps.wait_build.outputs.BUILD_RUN_ID }} steps: - name: Checkout uses: actions/checkout@v4 - name: Wait until "Build and push images" workflow is done + id: wait_build env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} run: | @@ -241,9 +249,12 @@ jobs: done #check if the build succeeded - CONCLUSION=$(gh run ls -c $SHA -w "Build and push images" --json name,conclusion --jq '.[] | select(.name == "Build and push images") | .conclusion') + RUN_INFO=($(gh run ls -c $SHA -w "Build and push images" --json name,conclusion,databaseId --jq '.[] | select(.name == "Build and push images") | .conclusion, .databaseId')) + CONCLUSION=${RUN_INFO[@]:0:1} + BUILD_RUN_ID=${RUN_INFO[@]:1:1} if [[ $CONCLUSION == "success" ]]; then - echo "CI workflow succeeded." + echo "CI workflow succeeded. (build run_id: ${BUILD_RUN_ID})" + echo "BUILD_RUN_ID=${BUILD_RUN_ID}" >> $GITHUB_OUTPUT else echo "::warning:: CI workflow ('Build and push images') fails with conclusion: $CONCLUSION" exit 1 diff --git a/.github/workflows/zombienet_cumulus.yml b/.github/workflows/zombienet_cumulus.yml index f7e25024ed45c..c2231060c9aa1 100644 --- a/.github/workflows/zombienet_cumulus.yml +++ b/.github/workflows/zombienet_cumulus.yml @@ -133,6 +133,7 @@ jobs: with: name: build-test-parachain-${{ needs.preflight.outputs.SOURCE_REF_SLUG }} github-token: ${{ secrets.GITHUB_TOKEN }} + run-id: ${{ needs.preflight.outputs.BUILD_RUN_ID }} - name: tar run: tar -xvf artifacts.tar From 9bcf09d1041985cda936846b03e09860e7a18594 Mon Sep 17 00:00:00 2001 From: Javier Viola Date: Wed, 12 Feb 2025 10:35:26 +0100 Subject: [PATCH 8/8] typo --- .github/workflows/zombienet-reusable-preflight.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/zombienet-reusable-preflight.yml b/.github/workflows/zombienet-reusable-preflight.yml index 3b836bd200b4a..decbe11a4609c 100644 --- a/.github/workflows/zombienet-reusable-preflight.yml +++ b/.github/workflows/zombienet-reusable-preflight.yml @@ -66,7 +66,7 @@ on: value: ${{ jobs.preflight.outputs.SOURCE_REF_SLUG }} BUILD_RUN_ID: - value: ${{ jobs.preflight.outputs.SOURCE_REF_SLUG }} + value: ${{ jobs.wait_build_images.outputs.BUILD_RUN_ID }} description: | Id of the build run, needed to download the artifacts.