summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLaurent Alfonsi <laurent.alfonsi@linaro.org>2022-09-19 08:13:39 +0200
committerLaurent Alfonsi <laurent.alfonsi@linaro.org>2022-09-21 15:42:57 +0200
commit3013bdc274f2d41b3cfcb5c118f42713a22b1b82 (patch)
treebf0d4b7d142dfc9a394c43c73aa8661a79cb5e08
parentb3f137a0fefa39046a11022a1a13b933822a8e3c (diff)
round-robin.sh: update_baseline ignore/force need a baseline
Change-Id: I4e636883cfe6ece1fb3b62e7171a07b4136515ac
-rw-r--r--round-robin.sh9
1 files changed, 8 insertions, 1 deletions
diff --git a/round-robin.sh b/round-robin.sh
index c058a3d9..901ac0ab 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -149,11 +149,18 @@ reset_artifacts ()
# base-artifacts repo is big and changes all the time, so we
# fetch only the $baseline_branch, instead of all branches.
local single_branch
- if [ x"${rr[update_baseline]}" = x"init" ] || [ x"${rr[update_baseline]}" = x"ignore" ]; then
+ if [ x"${rr[update_baseline]}" = x"init" ]; then
single_branch=empty
else
single_branch=${rr[baseline_branch]}
fi
+
+ if [ x"$(git ls-remote --heads https://git-us.linaro.org/toolchain/ci/base-artifacts.git refs/heads/$single_branch)" = x"" ]; then
+ # This can happen for update_baseline = init / force.
+ assert_with_msg "ERROR: No baseline branch. Need a baseline for this update_baseline mode." \
+ false
+ fi
+
rr[base-artifacts_rev]="${rr[base-artifacts_rev]-$single_branch}"
clone_or_update_repo base-artifacts ${rr[base-artifacts_rev]} https://git-us.linaro.org/toolchain/ci/base-artifacts.git auto $single_branch
cat <<EOF | manifest_out