[Updated] D12133: phabricator-refresh: add a magic value to skip it in the CI
marmoute (Pierre-Yves David)
phabricator at mercurial-scm.org
Thu Feb 3 17:02:37 UTC 2022
Closed by commit rHGfba2d7fab11e: phabricator-refresh: add a magic value to skip it in the CI (authored by marmoute).
This revision was automatically updated to reflect the committed changes.
REPOSITORY
rHG Mercurial
CHANGES SINCE LAST UPDATE
https://phab.mercurial-scm.org/D12133?vs=32039&id=32057
CHANGES SINCE LAST ACTION
https://phab.mercurial-scm.org/D12133/new/
REVISION DETAIL
https://phab.mercurial-scm.org/D12133
AFFECTED FILES
contrib/heptapod-ci.yml
contrib/phab-refresh-stack.sh
CHANGE DETAILS
diff --git a/contrib/phab-refresh-stack.sh b/contrib/phab-refresh-stack.sh
--- a/contrib/phab-refresh-stack.sh
+++ b/contrib/phab-refresh-stack.sh
@@ -1,6 +1,11 @@
#!/bin/bash
set -eu
+if [[ "$PHABRICATOR_TOKEN" == "NO-PHAB" ]]; then
+ echo 'Skipping Phabricator Step' >&2
+ exit 0
+fi
+
revision_in_stack=`hg log \
--rev '.#stack and ::. and topic()' \
-T '\nONE-REV\n' \
@@ -27,6 +32,7 @@
if [[ "$PHABRICATOR_TOKEN" == "" ]]; then
echo 'missing $PHABRICATOR_TOKEN variable' >&2
+ echo '(use PHABRICATOR_TOKEN="NO-PHAB" to disable this step)' >&2
exit 2
fi
diff --git a/contrib/heptapod-ci.yml b/contrib/heptapod-ci.yml
--- a/contrib/heptapod-ci.yml
+++ b/contrib/heptapod-ci.yml
@@ -56,6 +56,11 @@
phabricator-refresh:
stage: phabricator
+ rules:
+ - if: '"$PHABRICATOR_TOKEN" != "NO-PHAB"'
+ when: on_success
+ - if: '"$PHABRICATOR_TOKEN" == "NO-PHAB"'
+ when: never
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}"
To: marmoute, #hg-reviewers, Alphare
Cc: Alphare, mercurial-patches
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurial-scm.org/pipermail/mercurial-patches/attachments/20220203/e79acb04/attachment-0002.html>
More information about the Mercurial-patches
mailing list