diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 507ffa7a3236042ce7534e1df915bea0451c0864..ff974f1c2a705160ab10ac37f160346a97cadda1 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -32,7 +32,6 @@ workflow: rules: - if: $CI_COMMIT_TAG - if: $CI_COMMIT_BRANCH - # - if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" variables: &default-vars GIT_STRATEGY: fetch @@ -499,13 +498,13 @@ build-rust-doc: DOCKERFILE: $PRODUCT.Dockerfile IMAGE_NAME: docker.io/parity/$PRODUCT before_script: - - test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" || - ( echo "no docker credentials provided"; exit 1 ) - script: - echo "cd ./artifacts/$PRODUCT/" # - VERSION="$(cat ./VERSION)" # - echo "${PRODUCT} version = ${VERSION}" # - test -z "${VERSION}" && exit 1 + script: + - test "$Docker_Hub_User_Parity" -a "$Docker_Hub_Pass_Parity" || + ( echo "no docker credentials provided"; exit 1 ) # - buildah bud # --format=docker # --build-arg VCS_REF="${CI_COMMIT_SHA}" @@ -645,8 +644,14 @@ deploy-prometheus-alerting-rules: trigger-simnet: stage: deploy rules: - - if: $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" + # this job runs only on nightly pipeline, that + - if: $CI_COMMIT_REF_NAME == "master" && $CI_PIPELINE_SOURCE == "schedule" && $PIPELINE == "nightly" + # it only makes sense to run it after `publish-docker-substrate` job and it would make sense to add `needs:` here + # but `needs:` requires the mentioned job to run (instead of depending from it) and apparently, it will prevent + # the whole pipeline from starting in case when this job is conditioned and dependent is not. I.e. any other + # scheduled run on not protected branch needs: + # script will fail if there is no artifacts/substrate/VERSION - job: publish-docker-substrate artifacts: false trigger: