From 6a10b5d7a45a9b5e8be287a291b5ff2f98b8c308 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jo=C3=A3o=20Paulo=20Silva=20de=20Souza?= <77391175+joao-paulo-parity@users.noreply.github.com> Date: Mon, 27 Dec 2021 06:21:39 -0300 Subject: [PATCH] make check-dependent-* only be executed in PRs (#4588) Make check-dependent-* jobs only be executed in PRs instead of both PRs and master. Reason 1: The companion is not merged at the same time as the parent PR ([1](https://github.com/paritytech/parity-processbot/issues/347#issuecomment-994729950)), therefore the pipeline will fail on master since the companion PR is not yet merged in the other repository. This scenario is demonstrated by the pipeline of https://github.com/paritytech/substrate/commit/82cc3746450ae9722a249f4ddf83b8de59ba6e0d. Reason 2: The job can still fail on master due to a new commit on the companion PR's repository which was merged after `bot merge` happened, as demonstrated by the following scheme: 1. Parent PR is merged 2. Companion PR is updated and set to merge in the future 3. In the meantime a new commit is merged into the companion PR repository's master branch 4. The `check-dependent-*` job runs on master but, due to the new commit, it fails for unrelated reasons While "Reason 2" can be used as an argument against this PR, in that it would be useful to know if the integration is failing on master, "Reason 1" should be taken care of due to this inherent flaw of the current companion build system design. --- .gitlab-ci.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 4a8ea0187c74..bc47fe0b3cdd 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -89,6 +89,10 @@ default: - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs - if: $CI_COMMIT_REF_NAME == "rococo-v1" +.rules-test-pr: &rules-test-pr + rules: + - if: $CI_COMMIT_REF_NAME =~ /^[0-9]+$/ # PRs + #### Vault secrets .vault-secrets: &vault-secrets secrets: @@ -291,6 +295,7 @@ build-malus: .check-dependent-project: &check-dependent-project stage: build <<: *docker-env + <<: *rules-test-pr <<: *vault-secrets script: - git clone