From 1c612e8c0945297fe47615f0d1a3fada900c4ce7 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michel=20D=C3=A4nzer?= Date: Mon, 22 Jun 2020 11:13:05 +0200 Subject: [PATCH] gitlab-ci: Use rules: instead of except:/only: for test-docs job Only run the job automatically for Marge Bot, otherwise let it be triggered manually. v2: * Never run this job for the main project, since it's only needed in pre-merge pipelines. * Add comment explaining that cases not covered by explicit rules default to "when: never". Reviewed-by: Daniel Stone Part-of: --- .gitlab-ci.yml | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 42a969559ef..227a27d9bb6 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -47,13 +47,17 @@ pages: test-docs: extends: .docs-base stage: container+docs - except: - refs: - - master@mesa/mesa - only: - changes: - - docs/**/* - - .gitlab-ci.yml + rules: + - if: '$CI_PROJECT_NAMESPACE == "mesa"' + when: never + - if: '$GITLAB_USER_LOGIN == "marge-bot"' + changes: &docs-or-ci + - docs/**/* + - .gitlab-ci.yml + when: on_success + - changes: *docs-or-ci + when: manual + # Other cases default to never # When to automatically run the CI .ci-run-policy: -- 2.30.2