diff --git a/substrate/.gitlab-ci.yml b/substrate/.gitlab-ci.yml index 9619e60043..d29fb27ec4 100644 --- a/substrate/.gitlab-ci.yml +++ b/substrate/.gitlab-ci.yml @@ -119,6 +119,11 @@ default: - if: $CI_COMMIT_REF_NAME == "tags" - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 +.nightly-pipeline: &nightly-pipeline + rules: + # this job runs only on nightly pipeline with the mentioned variable, against `master` branch + - if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" + #### stage: .pre skip-if-draft: @@ -199,17 +204,7 @@ test-prometheus-alerting-rules: cargo-deny: stage: test <<: *docker-env - rules: - - if: $CI_PIPELINE_SOURCE == "pipeline" - when: never - - changes: - - "Cargo.lock" - - "**/Cargo.toml" - - if: $CI_PIPELINE_SOURCE == "web" - - if: $CI_PIPELINE_SOURCE == "schedule" - - if: $CI_COMMIT_REF_NAME == "master" - - if: $CI_COMMIT_REF_NAME == "tags" - - if: $CI_COMMIT_REF_NAME =~ /^v[0-9]+\.[0-9]+.*$/ # i.e. v1.0, v2.1rc1 + <<: *nightly-pipeline script: - cargo deny check --hide-inclusion-graph -c .maintain/deny.toml after_script: @@ -654,9 +649,7 @@ deploy-prometheus-alerting-rules: trigger-simnet: stage: deploy - rules: - # this job runs only on nightly pipeline with the mentioned variable, against `master` branch - - if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" + <<: *nightly-pipeline needs: - job: publish-docker-substrate trigger: