ci: do not trigger phabricator for merge-request stable
authorPierre-Yves David <pierre-yves.david@octobus.net>
Tue, 17 May 2022 00:09:51 +0100
branchstable
changeset 49181 477b5145e1a0
parent 49179 df68d64b0d50
child 49182 e3ac39edaa94
child 49201 c29e79d11b01
ci: do not trigger phabricator for merge-request The fast the phabricator steps has a `rules` entry makes it selected for the special `merge_requests` pipelines. The other ones behave as default and are not selected tot the mrege_request pipelines. This result in a second pipeline to be created, with only the phabricator pipeline in it. Which usually succeed fast (since there is nothing to do). This is harmful as this create a false sense of "the series is passing" and Gitlab will use this simplistic pipeline for validation. By explicitly preventing the pipeline to be created in the merge-request case, we prevent this situation to happens Note that the job will be dropped (alonside phabricator) in the next two weeks anyway.
contrib/heptapod-ci.yml
--- a/contrib/heptapod-ci.yml	Wed May 11 17:56:29 2022 -0700
+++ b/contrib/heptapod-ci.yml	Tue May 17 00:09:51 2022 +0100
@@ -11,7 +11,7 @@
     TEST_HGTESTS_ALLOW_NETIO: "0"
 
 .all_template: &all
-  when: always
+  when: on_success
 
 .runtests_template: &runtests
     <<: *all
@@ -49,11 +49,11 @@
 
 phabricator-refresh:
     stage: phabricator
-    rules:
-      - if: '"$PHABRICATOR_TOKEN" != "NO-PHAB"'
-        when: on_success
-      - if: '"$PHABRICATOR_TOKEN" == "NO-PHAB"'
-        when: never
+    except:
+      refs:
+        - merge_requests
+      variables:
+        - $PHABRICATOR_TOKEN == "NO-PHAB"
     variables:
       DEFAULT_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)"
       STABLE_COMMENT: ":white_check_mark: refresh by Heptapod after a successful CI run (:octopus: :green_heart:)\n⚠ This patch is intended for stable ⚠\n{image https://media.giphy.com/media/nYI8SmmChYXK0/source.gif}"