ci: Only run the sanity job if there's a MR
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Thu, 10 Dec 2020 11:48:32 +0000 (12:48 +0100)
committerMarge Bot <eric+marge@anholt.net>
Thu, 10 Dec 2020 12:57:08 +0000 (12:57 +0000)
As it will fail right away if there isn't, and that prevents the CI to
run on people's branches.

$ ci-fairy check-merge-request --require-allow-collaboration --junit-xml=check-merge-request.xml
ERROR: No open merge request against mesa/mesa with sha 9f6aba4be0ceb59d35732651cc44f676e93b70b5

Signed-off-by: Tomeu Vizoso <tomeu.vizoso@collabora.com>
Fixes: d4151f2e ("ci: Run sanity job only in pre-merge pipelines")
Reviewed-by: Michel Dänzer <mdaenzer@redhat.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/8032>

.gitlab-ci.yml

index c7debe7..9c2c3cd 100644 (file)
@@ -500,7 +500,7 @@ sanity:
     - .fdo.ci-fairy
   stage: sanity
   rules:
-    - if: *is-forked-branch-or-pre-merge
+    - if: *is-pre-merge
       when: on_success
     # Other cases default to never
   variables: