ci: Do not create manual test-docs job in post-merge pipelines
authorMichel Dänzer <mdaenzer@redhat.com>
Tue, 1 Sep 2020 09:44:54 +0000 (11:44 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 2 Sep 2020 16:29:29 +0000 (16:29 +0000)
Only in pre-merge pipelines for MRs, or in pipelines for forked project
branches.

Having the manual job in post-merge pipelines prevented the pages job
from running automatically as well, which could prevent the public
website from getting updated.

Acked-by: Daniel Stone <daniels@collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6534>

.gitlab-ci.yml

index 1215315dfbaeadfafd444982803c627f960b94c1..234f8e6524cba623b554a7145942dbedae4bc20d 100644 (file)
@@ -76,7 +76,8 @@ test-docs:
     - if: '$GITLAB_USER_LOGIN != "marge-bot" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME != $CI_COMMIT_REF_NAME && $CI_PROJECT_PATH == "mesa/mesa"'
       changes: *docs-or-ci
       when: on_success
-    - changes: *docs-or-ci
+    - if: '$CI_PROJECT_PATH != "mesa/mesa" || $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_COMMIT_REF_NAME'
+      changes: *docs-or-ci
       when: manual
     # Other cases default to never