summaryrefslogtreecommitdiff
path: root/round-robin.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-20 17:56:41 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-21 14:14:02 +0000
commit3922f589ab98b50295674d01287ed7fc693bbb47 (patch)
tree9e38e71ae0ec10eee1acd3441f42ff24b66f6bfe /round-robin.sh
parent8b5d081995cc6e048c5794ccd0ba2bf3c42d2e1b (diff)
round-robin scripts: Merge <foo>_url and <foo>_branch into <foo>_git
Merge git "_url" and "_branch" specification into a single "_git" argument that's constructed from "URL#BRANCH". This argument also has a special value "baseline", which before was a special value of "branch". This rework makes handling of git references simpler and cleaner, especially on the jenkins side. Change-Id: I1c1c07629728c693b8350dfa1b61fe767d5b0a0b
Diffstat (limited to 'round-robin.sh')
-rw-r--r--round-robin.sh26
1 files changed, 9 insertions, 17 deletions
diff --git a/round-robin.sh b/round-robin.sh
index a0e7d21d..feeafae3 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -6,19 +6,13 @@
# Round-Robin associative array.
declare -gA rr
-# Pretty name for PROJECT's version
-#rr[PROJECT_version]
-
-# PROJECT's git url
-#rr[PROJECT_url]
-
-# PROJECT's git branch or SHA1 revision parsable by git rev-parse.
+# PROJECT's git url#branch or url#SHA1 revision parsable by git rev-parse.
# A special value "baseline" means that PROJECT is not being updated
# in this build, and its baseline branch should be used.
# In a successful build "update_baseline" step will update baseline
# branches of all PROJECTs to the current values, thus setting
# a baseline for the next build.
-#rr[PROJECT_branch]
+#rr[PROJECT_git]
# PROJECT's git SHA1 revision. These are mostly used in manifests.
#rr[PROJECT_rev]
@@ -72,7 +66,7 @@ print_updated_components ()
local delim=""
local c
for c in ${rr[components]}; do
- if [ x"${rr[${c}_branch]}" != x"baseline" ]; then
+ if [ x"${rr[${c}_git]}" != x"baseline" ]; then
echo -ne "$delim$c"
delim=${1- }
fi
@@ -156,10 +150,10 @@ clone_repo ()
local url branch
- if [ x"${rr[${project}_branch]}" != x"baseline" ]; then
+ if [ x"${rr[${project}_git]}" != x"baseline" ]; then
# Fetch and checkout from the specified repo.
- url="${rr[${project}_url]}"
- branch="${rr[${project}_branch]}"
+ url="${rr[${project}_git]%#*}"
+ branch="${rr[${project}_git]#*#}"
else
# Fetch and checkout from baseline repo.
url=$(print_baseline_repo "$project" true)
@@ -633,10 +627,9 @@ No reason to rebase base-artifacts."
for c in ${rr[components]}; do
if echo "${update_components[@]}" | tr ' ' '\n' | grep -q "^$c\$"; then
- echo "${c}_url=${rr[${c}_url]}"
- echo "${c}_branch=${rr[${c}_branch]}"
+ echo "${c}_git=${rr[${c}_git]}"
else
- echo "${c}_branch=baseline"
+ echo "${c}_git=baseline"
fi
done > $trigger_dest/trigger-build-$update_components2
done < <(${rr[breakup_updated_components]})
@@ -647,8 +640,7 @@ No reason to rebase base-artifacts."
cat > $trigger_dest/trigger-bisect <<EOF
current_project=$single_component
-bad_url=${rr[${single_component}_url]}
-bad_branch=$cur_rev
+bad_git=${rr[${single_component}_git]%#*}#$cur_rev
EOF
if [ -f $run_step_artifacts/extra-bisect-params ]; then
cat $run_step_artifacts/extra-bisect-params >> $trigger_dest/trigger-bisect