gitlab-ci: Do not create the "success" job when the test-docs job exists
authorMichel Dänzer <mdaenzer@redhat.com>
Mon, 22 Jun 2020 09:16:17 +0000 (11:16 +0200)
committerMarge Bot <eric+marge@anholt.net>
Wed, 1 Jul 2020 14:31:38 +0000 (14:31 +0000)
It's redundant in that case.

v2:
* Adapt to v2 of test-docs job rules.

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

.gitlab-ci.yml

index a12b9dae01378cbac8e7c3fb1718bb62ca88a70b..e73b9001c9d79346f63a263d6bec151383cd841c 100644 (file)
@@ -97,11 +97,15 @@ test-docs:
 success:
   stage: success
   image: debian:stable-slim
-  only:
-    - merge_requests
-  except:
-    changes:
-      *all_paths
+  rules:
+    - if: '$CI_PROJECT_NAMESPACE == "mesa"'
+      when: never
+    - if: '$GITLAB_USER_LOGIN == "marge-bot"'
+      changes: *docs-or-ci
+      when: never
+    - changes: *all_paths
+      when: never
+    - when: on_success
   variables:
     GIT_STRATEGY: none
   script: