summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-04-20 08:43:12 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2023-04-20 08:44:56 +0000
commitb5474943e1cd9c53f72cb8760b01575e9ddfdc46 (patch)
treedf76eb377340546fd20824c7d961d60bd3dd22df
parent8afd908d3cde17193cbb4a0ab1d57a725bd811ba (diff)
tcwg-update-tested.sh: Workaround git quirks between jenkins and "git review"
Change-Id: I63e76568977f978d16eb79d8621d99325988cc27
-rwxr-xr-xtcwg-update-tested.sh10
1 files changed, 6 insertions, 4 deletions
diff --git a/tcwg-update-tested.sh b/tcwg-update-tested.sh
index e21fc127..709ded88 100755
--- a/tcwg-update-tested.sh
+++ b/tcwg-update-tested.sh
@@ -19,20 +19,22 @@ set -u
if $verbose; then set -x; fi
+# Repos cloned by Jenkins have the core.hooksPath set to /dev/null, causing
+# the "git review" command to fail (see
+# https://storyboard.openstack.org/#!/story/2010342) so change it back to
+# its default value.
+git -C abe config --unset core.hooksPath
git -C abe review -s
git -C abe push gerrit $GIT_COMMIT:refs/heads/tested
+git -C jenkins-scripts config --unset core.hooksPath
git -C jenkins-scripts review -s
git -C jenkins-scripts push gerrit $GIT_COMMIT_1:refs/heads/tested
pushd dockerfiles
GIT_COMMIT_2=$(git rev-parse $GIT_COMMIT_2)
-# Repos cloned by Jenkins have the core.hooksPath set to /dev/null, causing the git review
-# command to fail (see https://storyboard.openstack.org/#!/story/2010342) so change it
-# back to its default value.
git config --unset core.hooksPath
-
git review -s
git checkout -B tcwg-tested origin/tcwg-tested
if [ x"$(git diff HEAD $GIT_COMMIT_2 | wc -l)" != x"0" ]; then