summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-20 08:58:48 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2021-07-20 09:50:19 +0000
commit76647264ef88f7a794c11af63f3dd0d3d2b213ce (patch)
treebb21283bb015bc944abf0395acf5c1a1dfeff70b
parent050ddab77da4a1c12b49acb360597b704e2eaeab (diff)
downloadjenkins-scripts-76647264ef88f7a794c11af63f3dd0d3d2b213ce.tar.gz
round-robin-bisect.sh: Integrate workaround for creating new branches
... from round-robin.sh:push_baseline(). Change-Id: Ie2b132f7b912e6d3dfa2cbf931ff70b6e08b06e3
-rwxr-xr-xround-robin-bisect.sh11
-rw-r--r--round-robin.sh7
2 files changed, 9 insertions, 9 deletions
diff --git a/round-robin-bisect.sh b/round-robin-bisect.sh
index 6a8dc817..2328da64 100755
--- a/round-robin-bisect.sh
+++ b/round-robin-bisect.sh
@@ -308,8 +308,15 @@ fi
# that might cut down bisection time. Mostly, these are first_bad and
# last_good commits.
interesting_commits="../bisect/interesting-commits"
-interesting_commits_rev=${interesting_commits_rev-linaro-local/ci/${rr[ci_project]}}
-clone_or_update_repo $interesting_commits $interesting_commits_rev https://git-us.linaro.org/toolchain/ci/interesting-commits.git auto $interesting_commits_rev
+
+interesting_commits_url=https://git-us.linaro.org/toolchain/ci/interesting-commits.git
+interesting_commits_branch=linaro-local/ci/${rr[ci_project]}
+if ! git ls-remote --heads $interesting_commits_url \
+ | grep -q ".* refs/heads/$interesting_commits_branch"; then
+ interesting_commits_branch=empty
+fi
+interesting_commits_rev=${interesting_commits_rev-$interesting_commits_branch}
+clone_or_update_repo $interesting_commits $interesting_commits_rev $interesting_commits_url auto $interesting_commits_branch
interesting_commits_rev=$(git -C $interesting_commits rev-parse HEAD)
cat <<EOF | manifest_out
declare -g interesting_commits_rev=$interesting_commits_rev
diff --git a/round-robin.sh b/round-robin.sh
index 9d330d6f..f41a5900 100644
--- a/round-robin.sh
+++ b/round-robin.sh
@@ -778,13 +778,6 @@ push_baseline ()
if [ x"${rr[update_baseline]}" = x"rebase" ]; then
return
- elif [ x"${rr[update_baseline]}" = x"init" ]; then
- # Create branch in interesting-commits for custom ci_projects. These
- # are used in bisect jobs.
- if ! git ls-remote --heads https://git.linaro.org/toolchain/ci/interesting-commits | grep -q ".* refs/heads/${rr[baseline_branch]}"; then
- clone_baseline_repo interesting-commits empty false
- git_push interesting-commits baseline linaro-local/ci/${rr[ci_project]}
- fi
fi
local url