Automatically format ci pipeline specs with prettier (#2229)

This commit is contained in:
Mira Ressel
2023-02-27 13:09:58 +01:00
committed by GitHub
parent 0ce339be67
commit 590387a01c
8 changed files with 194 additions and 187 deletions
+7 -7
View File
@@ -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
+33 -33
View File
@@ -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
+46 -46
View File
@@ -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
+21 -21
View File
@@ -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
+36 -36
View File
@@ -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"
+6
View File
@@ -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