heptapod-ci: automatically refresh existing phabricator Diff on push
authorPierre-Yves David <pierre-yves.david@octobus.net>
Sat, 28 Nov 2020 14:15:55 +0100
changeset 45991 c7f40562389f
parent 45990 5de27798d2af
child 45992 9dd5b129ff28
heptapod-ci: automatically refresh existing phabricator Diff on push If a changeset have been submitted to Phabricator and a new version is pushed to heptapod, we should refresh the state on Phabricator. If we do not do this, they are a risk of an older version being applied from Phabricator. In this situation content-divergence will be (rightfully) detected by evolution. We only refresh the Diff if the test pass, to avoid updating Phabricator with broken content. Differential Revision: https://phab.mercurial-scm.org/D9451
contrib/heptapod-ci.yml
--- a/contrib/heptapod-ci.yml	Sat Nov 28 14:11:54 2020 +0100
+++ b/contrib/heptapod-ci.yml	Sat Nov 28 14:15:55 2020 +0100
@@ -1,5 +1,6 @@
 stages:
   - tests
+  - phabricator
 
 image: registry.heptapod.net/mercurial/ci-images/mercurial-core
 
@@ -47,6 +48,11 @@
     variables:
         PYTHON: python3
 
+phabricator-refresh:
+    stage: phabricator
+    script:
+      - ./contrib/phab-refresh-stack.sh
+
 rust-cargo-test-py3-dirstate-tree:
     <<: *rust_cargo_test
     variables: