mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-11 13:01:07 +00:00
Run bridges zombienet tests on CI (#2439)
Brridges zombienet tests are non-standard - zombienet currently missing multiple relay chains support (see e.g. https://github.com/paritytech/zombienet/pull/796), so we need to go live with two relay networks, their parachains + custom test runner (which e.g. doesn't shutdown net when its tests are finished and instead waits for both networks tests to complete). So we are stuck with native zombienet provider => this PR is an attempt to gather everything in a single docker container and run tests there ~Draft, because it is far from finishing - what I want now is to see how it works on CI~
This commit is contained in:
committed by
GitHub
parent
6579d6cce6
commit
5ed0a75fcd
@@ -382,3 +382,21 @@ build-subkey-linux:
|
||||
# after_script: [""]
|
||||
# tags:
|
||||
# - osx
|
||||
|
||||
# bridges
|
||||
|
||||
# we need some non-binary artifacts in our bridges+zombienet image
|
||||
prepare-bridges-zombienet-artifacts:
|
||||
stage: build
|
||||
extends:
|
||||
- .docker-env
|
||||
- .common-refs
|
||||
- .run-immediately
|
||||
- .collect-artifacts
|
||||
before_script:
|
||||
- mkdir -p ./artifacts/bridges-polkadot-sdk/bridges
|
||||
- mkdir -p ./artifacts/bridges-polkadot-sdk/cumulus/zombienet
|
||||
script:
|
||||
- cp -r bridges/zombienet ./artifacts/bridges-polkadot-sdk/bridges/zombienet
|
||||
- cp -r cumulus/scripts ./artifacts/bridges-polkadot-sdk/cumulus/scripts
|
||||
- cp -r cumulus/zombienet/bridge-hubs ./artifacts/bridges-polkadot-sdk/cumulus/zombienet/bridge-hubs
|
||||
|
||||
@@ -66,6 +66,8 @@ publish-rustdoc:
|
||||
# note: images are used not only in zombienet but also in rococo, wococo and versi
|
||||
.build-push-image:
|
||||
image: $BUILDAH_IMAGE
|
||||
extends:
|
||||
- .zombienet-refs
|
||||
variables:
|
||||
DOCKERFILE: "" # docker/path-to.Dockerfile
|
||||
IMAGE_NAME: "" # docker.io/paritypr/image_name
|
||||
@@ -77,6 +79,7 @@ publish-rustdoc:
|
||||
--build-arg VCS_REF="${CI_COMMIT_SHA}"
|
||||
--build-arg BUILD_DATE="$(date -u '+%Y-%m-%dT%H:%M:%SZ')"
|
||||
--build-arg IMAGE_NAME="${IMAGE_NAME}"
|
||||
--build-arg ZOMBIENET_IMAGE="${ZOMBIENET_IMAGE}"
|
||||
--tag "$IMAGE_NAME:${DOCKER_IMAGES_VERSION}"
|
||||
--file ${DOCKERFILE} .
|
||||
- echo "$PARITYPR_PASS" |
|
||||
@@ -163,3 +166,22 @@ build-push-image-substrate-pr:
|
||||
variables:
|
||||
DOCKERFILE: "docker/dockerfiles/substrate_injected.Dockerfile"
|
||||
IMAGE_NAME: "docker.io/paritypr/substrate"
|
||||
|
||||
# unlike other images, bridges+zombienet image is based on Zombienet image that pulls required binaries
|
||||
# from other fresh images (polkadot and cumulus)
|
||||
build-push-image-bridges-zombienet-tests:
|
||||
stage: publish
|
||||
extends:
|
||||
- .kubernetes-env
|
||||
- .common-refs
|
||||
- .build-push-image
|
||||
needs:
|
||||
- job: build-linux-stable
|
||||
artifacts: true
|
||||
- job: build-linux-stable-cumulus
|
||||
artifacts: true
|
||||
- job: prepare-bridges-zombienet-artifacts
|
||||
artifacts: true
|
||||
variables:
|
||||
DOCKERFILE: "docker/dockerfiles/bridges_zombienet_tests_injected.Dockerfile"
|
||||
IMAGE_NAME: "docker.io/paritypr/bridges-zombienet-tests"
|
||||
|
||||
@@ -10,3 +10,5 @@ include:
|
||||
- .gitlab/pipeline/zombienet/cumulus.yml
|
||||
# polkadot tests
|
||||
- .gitlab/pipeline/zombienet/polkadot.yml
|
||||
# bridges tests
|
||||
- .gitlab/pipeline/zombienet/bridges.yml
|
||||
|
||||
@@ -0,0 +1,54 @@
|
||||
# This file is part of .gitlab-ci.yml
|
||||
# Here are all jobs that are executed during "zombienet" stage for bridges
|
||||
|
||||
# common settings for all zombienet jobs
|
||||
.zombienet-bridges-common:
|
||||
before_script:
|
||||
# Exit if the job is not merge queue
|
||||
# - if [[ $CI_COMMIT_REF_NAME != *"gh-readonly-queue"* ]]; then echo "I will run only in a merge queue"; exit 0; fi
|
||||
- echo "Zombienet Tests Config"
|
||||
- echo "${ZOMBIENET_IMAGE}"
|
||||
- echo "${GH_DIR}"
|
||||
- echo "${LOCAL_DIR}"
|
||||
- ls "${LOCAL_DIR}"
|
||||
- export DEBUG=zombie,zombie::network-node
|
||||
- export ZOMBIENET_INTEGRATION_TEST_IMAGE="${BRIDGES_ZOMBIENET_TESTS_IMAGE}":${BRIDGES_ZOMBIENET_TESTS_IMAGE_TAG}
|
||||
- echo "${ZOMBIENET_INTEGRATION_TEST_IMAGE}"
|
||||
stage: zombienet
|
||||
image: "${BRIDGES_ZOMBIENET_TESTS_IMAGE}:${BRIDGES_ZOMBIENET_TESTS_IMAGE_TAG}"
|
||||
needs:
|
||||
- job: build-push-image-bridges-zombienet-tests
|
||||
artifacts: true
|
||||
extends:
|
||||
- .kubernetes-env
|
||||
- .zombienet-refs
|
||||
variables:
|
||||
BRIDGES_ZOMBIENET_TESTS_IMAGE_TAG: ${DOCKER_IMAGES_VERSION}
|
||||
BRIDGES_ZOMBIENET_TESTS_IMAGE: "docker.io/paritypr/bridges-zombienet-tests"
|
||||
GH_DIR: "https://github.com/paritytech/polkadot-sdk/tree/${CI_COMMIT_SHA}/bridges/zombienet"
|
||||
LOCAL_DIR: "/builds/parity/mirrors/polkadot-sdk/bridges/zombienet"
|
||||
FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1
|
||||
RUN_IN_CONTAINER: "1"
|
||||
artifacts:
|
||||
name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}_zombienet_bridge_tests"
|
||||
when: always
|
||||
expire_in: 2 days
|
||||
paths:
|
||||
- ./zombienet-logs
|
||||
after_script:
|
||||
- mkdir -p ./zombienet-logs
|
||||
# copy logs of tests runner (run-tests.sh)
|
||||
- cp -r /tmp/bridges-zombienet-tests.*/tmp.*/tmp.* ./zombienet-logs/
|
||||
# copy logs of all nodes
|
||||
- cp /tmp/zombie*/logs/* ./zombienet-logs/
|
||||
# following lines are causing spurious test failures ("At least one of the nodes fails to start")
|
||||
# retry: 2
|
||||
# tags:
|
||||
# - zombienet-polkadot-integration-test
|
||||
|
||||
zombienet-bridges-0001-asset-transfer-works:
|
||||
extends:
|
||||
- .zombienet-bridges-common
|
||||
script:
|
||||
- /home/nonroot/bridges-polkadot-sdk/bridges/zombienet/run-tests.sh --docker
|
||||
- echo "Done"
|
||||
Reference in New Issue
Block a user