diff --git a/polkadot/.gitlab-ci.yml b/polkadot/.gitlab-ci.yml index 3f367fb8ff..6078874a04 100644 --- a/polkadot/.gitlab-ci.yml +++ b/polkadot/.gitlab-ci.yml @@ -803,3 +803,25 @@ publish-rustdoc: - echo "___Rustdoc was successfully published to https://paritytech.github.io/polkadot/___" after_script: - rm -rf .git/ ./* + +#### stage: .post + +# This job cancels the whole pipeline if any of provided jobs fail. +# 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 + needs: + - job: test-linux-stable + artifacts: false + - job: check-runtime-benchmarks + artifacts: false + - job: check-try-runtime + artifacts: false + rules: + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + when: on_failure + variables: + PROJECT_ID: "${CI_PROJECT_ID}" + PIPELINE_ID: "${CI_PIPELINE_ID}" + trigger: "parity/infrastructure/ci_cd/pipeline-stopper"