diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 0000000000..2ea1ab2d6b --- /dev/null +++ b/.gitattributes @@ -0,0 +1,2 @@ +/.gitlab-ci.yml filter=ci-prettier +/scripts/ci/gitlab/pipeline/*.yml filter=ci-prettier diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 2a65919bef..9f7e7416dd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -4,7 +4,6 @@ # # pipelines can be triggered manually in the web - stages: - test - build @@ -15,7 +14,7 @@ stages: - zombienet default: - interruptible: true + interruptible: true retry: max: 2 when: @@ -24,19 +23,19 @@ default: - api_failure variables: - GIT_STRATEGY: fetch - GIT_DEPTH: 100 - CARGO_INCREMENTAL: 0 - CI_IMAGE: "paritytech/ci-linux:production" - DOCKER_OS: "debian:stretch" - ARCH: "x86_64" - ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.35" + GIT_STRATEGY: fetch + GIT_DEPTH: 100 + CARGO_INCREMENTAL: 0 + CI_IMAGE: "paritytech/ci-linux:production" + DOCKER_OS: "debian:stretch" + ARCH: "x86_64" + ZOMBIENET_IMAGE: "docker.io/paritytech/zombienet:v1.3.35" .collect-artifacts: artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: on_success - expire_in: 1 days + name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" + when: on_success + expire_in: 1 days paths: - ./artifacts/ @@ -52,40 +51,40 @@ variables: .pipeline-stopper-artifacts: artifacts: - reports: - dotenv: pipeline-stopper.env + reports: + dotenv: pipeline-stopper.env .common-refs: # these jobs run always* rules: - if: $CI_PIPELINE_SOURCE == "schedule" - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 - - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 - - if: $CI_COMMIT_REF_NAME =~ /^polkadot-v[0-9]+\.[0-9]+.*$/ # i.e. polkadot-v1.0.99, polkadot-v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 + - if: $CI_COMMIT_REF_NAME =~ /^polkadot-v[0-9]+\.[0-9]+.*$/ # i.e. polkadot-v1.0.99, polkadot-v2.1rc1 .pr-refs: # these jobs run always* rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs .publish-refs: rules: - if: $CI_COMMIT_REF_NAME == "master" - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 # run benchmarks manually only on release-parachains-v* branch .benchmarks-manual-refs: rules: - - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 + - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 when: manual # run benchmarks only on release-parachains-v* branch .benchmarks-refs: rules: - - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 + - if: $CI_COMMIT_REF_NAME =~ /^release-parachains-v[0-9].*$/ # i.e. release-parachains-v1.0, release-parachains-v2.1rc1, release-parachains-v3000 .zombienet-refs: rules: @@ -94,14 +93,14 @@ variables: - if: $CI_PIPELINE_SOURCE == "schedule" when: never - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs .job-switcher: before_script: - if echo "$CI_DISABLED_JOBS" | grep -xF "$CI_JOB_NAME"; then echo "The job has been cancelled in CI settings"; exit 0; fi .docker-env: - image: "${CI_IMAGE}" + image: "${CI_IMAGE}" before_script: - !reference [.job-switcher, before_script] - rustup show @@ -113,7 +112,7 @@ variables: - linux-docker-vm-c2 .kubernetes-env: - image: "${CI_IMAGE}" + image: "${CI_IMAGE}" before_script: - !reference [.job-switcher, before_script] tags: @@ -152,33 +151,33 @@ include: # In a DAG, every jobs chain is executed independently of others. The `fail_fast` principle suggests # to fail the pipeline as soon as possible to shorten the feedback loop. cancel-pipeline: - stage: .post + stage: .post needs: - - job: test-linux-stable + - job: test-linux-stable rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs when: on_failure variables: - PROJECT_ID: "${CI_PROJECT_ID}" - PROJECT_NAME: "${CI_PROJECT_NAME}" - PIPELINE_ID: "${CI_PIPELINE_ID}" - FAILED_JOB_URL: "${FAILED_JOB_URL}" - FAILED_JOB_NAME: "${FAILED_JOB_NAME}" - PR_NUM: "${PR_NUM}" + PROJECT_ID: "${CI_PROJECT_ID}" + PROJECT_NAME: "${CI_PROJECT_NAME}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + FAILED_JOB_URL: "${FAILED_JOB_URL}" + FAILED_JOB_NAME: "${FAILED_JOB_NAME}" + PR_NUM: "${PR_NUM}" trigger: - project: "parity/infrastructure/ci_cd/pipeline-stopper" - branch: "as-improve" + project: "parity/infrastructure/ci_cd/pipeline-stopper" + branch: "as-improve" remove-cancel-pipeline-message: stage: .post rules: - - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs variables: - PROJECT_ID: "${CI_PROJECT_ID}" - PROJECT_NAME: "${CI_PROJECT_NAME}" - PIPELINE_ID: "${CI_PIPELINE_ID}" - FAILED_JOB_URL: "https://gitlab.com" - FAILED_JOB_NAME: "nope" - PR_NUM: "${CI_COMMIT_REF_NAME}" + PROJECT_ID: "${CI_PROJECT_ID}" + PROJECT_NAME: "${CI_PROJECT_NAME}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + FAILED_JOB_URL: "https://gitlab.com" + FAILED_JOB_NAME: "nope" + PR_NUM: "${CI_COMMIT_REF_NAME}" trigger: - project: "parity/infrastructure/ci_cd/pipeline-stopper" + project: "parity/infrastructure/ci_cd/pipeline-stopper" diff --git a/scripts/ci/gitlab/pipeline/benchmarks.yml b/scripts/ci/gitlab/pipeline/benchmarks.yml index 2b6455cd90..d1fdd64c34 100644 --- a/scripts/ci/gitlab/pipeline/benchmarks.yml +++ b/scripts/ci/gitlab/pipeline/benchmarks.yml @@ -3,7 +3,7 @@ # Work only on release-parachains-v* branches benchmarks-build: - stage: benchmarks-build + stage: benchmarks-build extends: - .docker-env - .collect-artifacts @@ -14,8 +14,8 @@ benchmarks-build: - cp target/production/polkadot-parachain ./artifacts/ benchmarks-assets: - stage: benchmarks-run - timeout: 1d + stage: benchmarks-run + timeout: 1d extends: - .collect-artifacts - .benchmarks-refs @@ -37,8 +37,8 @@ benchmarks-assets: - weights benchmarks-collectives: - stage: benchmarks-run - timeout: 1d + stage: benchmarks-run + timeout: 1d extends: - .collect-artifacts - .benchmarks-refs @@ -58,8 +58,8 @@ benchmarks-collectives: - weights benchmarks-bridge-hubs: - stage: benchmarks-run - timeout: 1d + stage: benchmarks-run + timeout: 1d extends: - .collect-artifacts - .benchmarks-refs diff --git a/scripts/ci/gitlab/pipeline/build.yml b/scripts/ci/gitlab/pipeline/build.yml index 2b6a284ee1..a60ef29c9a 100644 --- a/scripts/ci/gitlab/pipeline/build.yml +++ b/scripts/ci/gitlab/pipeline/build.yml @@ -2,7 +2,7 @@ # Here are all jobs that are executed during "build" stage build-linux-stable: - stage: build + stage: build extends: - .docker-env - .common-refs @@ -13,8 +13,8 @@ build-linux-stable: RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false script: - echo "___Building a binary, please refrain from using it in production since it goes with the debug assertions.___" - time cargo build --release --locked --bin polkadot-parachain @@ -25,7 +25,7 @@ build-linux-stable: - echo ${CI_COMMIT_REF_NAME} | tee ./artifacts/VERSION build-test-parachain: - stage: build + stage: build extends: - .docker-env - .common-refs @@ -33,11 +33,11 @@ build-test-parachain: variables: # Enable debug assertions since we are running optimized builds for testing # but still want to have debug assertions. - RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" + RUSTFLAGS: "-Cdebug-assertions=y -Dwarnings" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false script: - echo "___Building a binary, please refrain from using it in production since it goes with the debug assertions.___" - time cargo +nightly build --release --locked --bin test-parachain @@ -48,25 +48,25 @@ build-test-parachain: - mv ./target/release/wbuild/cumulus-test-runtime/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm ./artifacts/zombienet/. # build runtime only if files in $RUNTIME_PATH/$RUNTIME_NAME were changed -.build-runtime-template: &build-runtime-template - stage: build +.build-runtime-template: &build-runtime-template + stage: build extends: - .docker-env - .pr-refs # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false variables: - RUNTIME_PATH: "parachains/runtimes/assets" + RUNTIME_PATH: "parachains/runtimes/assets" script: - cd ${RUNTIME_PATH} - for directory in $(echo */); do - echo "_____Running cargo check for ${directory} ______"; - cd ${directory}; - pwd; - SKIP_WASM_BUILD=1 cargo check; - cd ..; + echo "_____Running cargo check for ${directory} ______"; + cd ${directory}; + pwd; + SKIP_WASM_BUILD=1 cargo check; + cd ..; done # DAG: build-runtime-assets -> build-runtime-collectives -> build-runtime-bridge-hubs @@ -75,49 +75,49 @@ build-test-parachain: build-runtime-assets: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/assets" + RUNTIME_PATH: "parachains/runtimes/assets" build-runtime-collectives: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/collectives" + RUNTIME_PATH: "parachains/runtimes/collectives" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-assets - artifacts: false + - job: build-runtime-assets + artifacts: false build-runtime-bridge-hubs: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/bridge-hubs" + RUNTIME_PATH: "parachains/runtimes/bridge-hubs" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-collectives - artifacts: false + - job: build-runtime-collectives + artifacts: false build-runtime-contracts: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/contracts" + RUNTIME_PATH: "parachains/runtimes/contracts" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-collectives - artifacts: false + - job: build-runtime-collectives + artifacts: false build-runtime-starters: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/starters" + RUNTIME_PATH: "parachains/runtimes/starters" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-assets - artifacts: false + - job: build-runtime-assets + artifacts: false build-runtime-testing: <<: *build-runtime-template variables: - RUNTIME_PATH: "parachains/runtimes/testing" + RUNTIME_PATH: "parachains/runtimes/testing" # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: build-runtime-starters - artifacts: false + - job: build-runtime-starters + artifacts: false diff --git a/scripts/ci/gitlab/pipeline/publish.yml b/scripts/ci/gitlab/pipeline/publish.yml index 81e034e06f..84f0a576e3 100644 --- a/scripts/ci/gitlab/pipeline/publish.yml +++ b/scripts/ci/gitlab/pipeline/publish.yml @@ -2,69 +2,69 @@ # Here are all jobs that are executed during "publish" stage .build-push-image: - image: quay.io/buildah/stable:v1.27 + image: quay.io/buildah/stable:v1.27 variables: - DOCKERFILE: "" # docker/path-to.Dockerfile - IMAGE_NAME: "" # docker.io/paritypr/image_name - VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + DOCKERFILE: "" # docker/path-to.Dockerfile + IMAGE_NAME: "" # docker.io/paritypr/image_name + VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" script: - test "$PARITYPR_USER" -a "$PARITYPR_PASS" || - ( echo "no docker credentials provided"; exit 1 ) + ( echo "no docker credentials provided"; exit 1 ) - buildah bud - --format=docker - --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}" - --tag "$IMAGE_NAME:$VERSION" - --file ${DOCKERFILE} . + --format=docker + --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}" + --tag "$IMAGE_NAME:$VERSION" + --file ${DOCKERFILE} . - echo "$PARITYPR_PASS" | - buildah login --username "$PARITYPR_USER" --password-stdin docker.io + buildah login --username "$PARITYPR_USER" --password-stdin docker.io - buildah info - buildah push --format=v2s2 "$IMAGE_NAME:$VERSION" after_script: - buildah logout --all build-push-image-polkadot-parachain-debug: - stage: publish + stage: publish extends: - .kubernetes-env - .common-refs - .build-push-image needs: - - job: build-linux-stable - artifacts: true + - job: build-linux-stable + artifacts: true variables: - DOCKERFILE: "docker/polkadot-parachain-debug_unsigned_injected.Dockerfile" - IMAGE_NAME: "docker.io/paritypr/polkadot-parachain-debug" - VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + DOCKERFILE: "docker/polkadot-parachain-debug_unsigned_injected.Dockerfile" + IMAGE_NAME: "docker.io/paritypr/polkadot-parachain-debug" + VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" build-push-image-test-parachain: - stage: publish + stage: publish extends: - .kubernetes-env - .common-refs - .build-push-image needs: - - job: build-test-parachain - artifacts: true + - job: build-test-parachain + artifacts: true variables: - DOCKERFILE: "docker/test-parachain_injected.Dockerfile" - IMAGE_NAME: "docker.io/paritypr/test-parachain" - VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + DOCKERFILE: "docker/test-parachain_injected.Dockerfile" + IMAGE_NAME: "docker.io/paritypr/test-parachain" + VERSION: "${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" publish-s3: - stage: publish + stage: publish extends: - .kubernetes-env - .publish-refs - image: paritytech/awscli:latest + image: paritytech/awscli:latest needs: - - job: build-linux-stable - artifacts: true + - job: build-linux-stable + artifacts: true variables: - GIT_STRATEGY: none - BUCKET: "releases.parity.io" - PREFIX: "cumulus/${ARCH}-${DOCKER_OS}" + GIT_STRATEGY: none + BUCKET: "releases.parity.io" + PREFIX: "cumulus/${ARCH}-${DOCKER_OS}" script: - echo "___Publishing a binary with debug assertions!___" - echo "___VERSION = $(cat ./artifacts/VERSION) ___" @@ -73,21 +73,21 @@ publish-s3: - aws s3 sync s3://${BUCKET}/${PREFIX}/$(cat ./artifacts/VERSION)/ s3://${BUCKET}/${PREFIX}/latest/ after_script: - aws s3 ls s3://${BUCKET}/${PREFIX}/latest/ - --recursive --human-readable --summarize + --recursive --human-readable --summarize -publish-benchmarks-assets-s3: &publish-benchmarks - stage: publish +publish-benchmarks-assets-s3: &publish-benchmarks + stage: publish extends: - .kubernetes-env - .benchmarks-refs - image: paritytech/awscli:latest + image: paritytech/awscli:latest needs: - - job: benchmarks-assets - artifacts: true + - job: benchmarks-assets + artifacts: true variables: - GIT_STRATEGY: none - BUCKET: "releases.parity.io" - PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-assets" + GIT_STRATEGY: none + BUCKET: "releases.parity.io" + PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-assets" script: - echo "___Publishing benchmark results___" - aws s3 sync ./artifacts/ s3://${BUCKET}/${PREFIX}/ @@ -95,11 +95,11 @@ publish-benchmarks-assets-s3: &publish-benchmarks - aws s3 ls s3://${BUCKET}/${PREFIX}/ --recursive --human-readable --summarize publish-benchmarks-collectives-s3: - <<: *publish-benchmarks + <<: *publish-benchmarks variables: - GIT_STRATEGY: none - BUCKET: "releases.parity.io" - PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-collectives" + GIT_STRATEGY: none + BUCKET: "releases.parity.io" + PREFIX: "cumulus/$CI_COMMIT_REF_NAME/benchmarks-collectives" needs: - - job: benchmarks-collectives - artifacts: true + - job: benchmarks-collectives + artifacts: true diff --git a/scripts/ci/gitlab/pipeline/test.yml b/scripts/ci/gitlab/pipeline/test.yml index 2761ed6055..765a80b7b6 100644 --- a/scripts/ci/gitlab/pipeline/test.yml +++ b/scripts/ci/gitlab/pipeline/test.yml @@ -3,26 +3,26 @@ # It's more like a check, but we want to run this job with real tests in parallel find-fail-ci-phrase: - stage: test + stage: test variables: - CI_IMAGE: "paritytech/tools:latest" - ASSERT_REGEX: "FAIL-CI" - GIT_DEPTH: 1 + CI_IMAGE: "paritytech/tools:latest" + ASSERT_REGEX: "FAIL-CI" + GIT_DEPTH: 1 extends: - .kubernetes-env script: - set +e - rg --line-number --hidden --type rust --glob '!{.git,target}' "$ASSERT_REGEX" .; exit_status=$? - - if [ $exit_status -eq 0 ]; then - echo "$ASSERT_REGEX was found, exiting with 1"; - exit 1; + - if [ $exit_status -eq 0 ]; then + echo "$ASSERT_REGEX was found, exiting with 1"; + exit 1; else - echo "No $ASSERT_REGEX was found, exiting with 0"; - exit 0; + echo "No $ASSERT_REGEX was found, exiting with 0"; + exit 0; fi test-linux-stable: - stage: test + stage: test extends: - .docker-env - .common-refs @@ -38,7 +38,7 @@ test-linux-stable: - time cargo nextest run --all --release --locked --run-ignored all test-doc: - stage: test + stage: test extends: - .docker-env - .common-refs @@ -50,7 +50,7 @@ test-doc: - time cargo test --doc check-runtime-benchmarks: - stage: test + stage: test extends: - .docker-env - .common-refs @@ -61,14 +61,14 @@ check-runtime-benchmarks: - time cargo check -p parachain-template-node --features runtime-benchmarks cargo-check-try-runtime: - stage: test + stage: test extends: - .docker-env - .common-refs # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-runtime-benchmarks - artifacts: false + - job: check-runtime-benchmarks + artifacts: false script: # Check that the node will compile with `try-runtime` feature flag. - time cargo check --all --features try-runtime @@ -76,24 +76,24 @@ cargo-check-try-runtime: - time cargo check -p parachain-template-node --features try-runtime check-rustdoc: - stage: test + stage: test extends: - .docker-env - .common-refs variables: - SKIP_WASM_BUILD: 1 - RUSTDOCFLAGS: "-Dwarnings" + SKIP_WASM_BUILD: 1 + RUSTDOCFLAGS: "-Dwarnings" script: - time cargo +nightly doc --workspace --all-features --verbose --no-deps cargo-check-benches: - stage: test + stage: test extends: - .docker-env - .common-refs # this is an artificial job dependency, for pipeline optimization using GitLab's DAGs needs: - - job: check-rustdoc - artifacts: false + - job: check-rustdoc + artifacts: false script: - time cargo check --all --benches diff --git a/scripts/ci/gitlab/pipeline/zombienet.yml b/scripts/ci/gitlab/pipeline/zombienet.yml index 808edcfb52..d76531b19e 100644 --- a/scripts/ci/gitlab/pipeline/zombienet.yml +++ b/scripts/ci/gitlab/pipeline/zombienet.yml @@ -19,23 +19,23 @@ # common settings for all zombienet jobs .zombienet-common: - stage: zombienet - image: "${ZOMBIENET_IMAGE}" + stage: zombienet + image: "${ZOMBIENET_IMAGE}" needs: - - job: build-push-image-test-parachain - artifacts: true + - job: build-push-image-test-parachain + artifacts: true variables: - POLKADOT_IMAGE: "docker.io/paritypr/polkadot-debug:master" - GH_DIR: "https://github.com/paritytech/cumulus/tree/${CI_COMMIT_SHORT_SHA}/zombienet/tests" - COL_IMAGE: "docker.io/paritypr/test-parachain:${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" + POLKADOT_IMAGE: "docker.io/paritypr/polkadot-debug:master" + GH_DIR: "https://github.com/paritytech/cumulus/tree/${CI_COMMIT_SHORT_SHA}/zombienet/tests" + COL_IMAGE: "docker.io/paritypr/test-parachain:${CI_COMMIT_REF_NAME}-${CI_COMMIT_SHORT_SHA}" FF_DISABLE_UMASK_FOR_DOCKER_EXECUTOR: 1 artifacts: - name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" - when: always - expire_in: 2 days + name: "${CI_JOB_NAME}_${CI_COMMIT_REF_NAME}" + when: always + expire_in: 2 days paths: - ./zombienet-logs - allow_failure: true + allow_failure: true retry: 2 tags: - zombienet-polkadot-integration-test @@ -48,9 +48,9 @@ zombienet-0001-sync_blocks_from_tip_without_connected_collator: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0001-sync_blocks_from_tip_without_connected_collator.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0001-sync_blocks_from_tip_without_connected_collator.zndsl" zombienet-0002-pov_recovery: extends: @@ -60,9 +60,9 @@ zombienet-0002-pov_recovery: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0002-pov_recovery.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0002-pov_recovery.zndsl" zombienet-0003-full_node_catching_up: extends: @@ -72,9 +72,9 @@ zombienet-0003-full_node_catching_up: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0003-full_node_catching_up.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0003-full_node_catching_up.zndsl" zombienet-0004-runtime_upgrade: extends: @@ -84,8 +84,8 @@ zombienet-0004-runtime_upgrade: - .zombienet-after-script needs: - !reference [.zombienet-common, needs] - - job: build-test-parachain - artifacts: true + - job: build-test-parachain + artifacts: true before_script: - ls -ltr * - cp ./artifacts/zombienet/wasm_binary_spec_version_incremented.rs.compact.compressed.wasm /tmp/ @@ -93,9 +93,9 @@ zombienet-0004-runtime_upgrade: - !reference [.zombienet-before-script, before_script] script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0004-runtime_upgrade.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0004-runtime_upgrade.zndsl" zombienet-0005-migrate_solo_to_para: extends: @@ -105,16 +105,16 @@ zombienet-0005-migrate_solo_to_para: - .zombienet-after-script needs: - !reference [.zombienet-common, needs] - - job: build-test-parachain - artifacts: true + - job: build-test-parachain + artifacts: true before_script: - ls -ltr * - !reference [.zombienet-before-script, before_script] script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0005-migrate_solo_to_para.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0005-migrate_solo_to_para.zndsl" zombienet-0006-rpc_collator_builds_blocks: extends: @@ -124,9 +124,9 @@ zombienet-0006-rpc_collator_builds_blocks: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0006-rpc_collator_builds_blocks.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0006-rpc_collator_builds_blocks.zndsl" zombienet-0007-full_node_warp_sync: extends: @@ -136,6 +136,6 @@ zombienet-0007-full_node_warp_sync: - .zombienet-after-script script: - /home/nonroot/zombie-net/scripts/ci/run-test-env-manager.sh - --github-remote-dir="${GH_DIR}" - --concurrency=1 - --test="0007-full_node_warp_sync.zndsl" + --github-remote-dir="${GH_DIR}" + --concurrency=1 + --test="0007-full_node_warp_sync.zndsl" diff --git a/scripts/ci/gitlab/prettier.sh b/scripts/ci/gitlab/prettier.sh new file mode 100755 index 0000000000..299bbee179 --- /dev/null +++ b/scripts/ci/gitlab/prettier.sh @@ -0,0 +1,6 @@ +#!/bin/sh + +# meant to be installed via +# git config filter.ci-prettier.clean "scripts/ci/gitlab/prettier.sh" + +prettier --parser yaml