diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-01-30 08:36:00 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-07 12:31:00 +0000 |
commit | aaa033fb30a080d33af6adfc7eb5741a24a5286e (patch) | |
tree | b738e15c9ddc2acae33659a2f7ab30bcfcf3e14d | |
parent | 20471672bdce1df18a7124e71f95b5575a102013 (diff) |
round-robin.sh: Add support for handling new configurations
Every configuration depends on baseline branches
linaro-local/ci/$ci_project/$ci_config existing in all relevant
repos, which is a pain to arrange by hand. We add new variable
rr[init_configuration], which defaults to 'false'.
For new configurations we set this parameter to true, which causes
the build script to use relevant upstream branches for components
and special "empty" branch for base-artifacts. The net result is
that after leaving new configuration for a day or two with
rr[init_configuration] set, the builds will initialize branches
in all relevant repos themselves, at which point we can turn
rr[init_configuration] back off.
Change-Id: Id1c78772619626f1a3e98a213e26046266f838e7
-rw-r--r-- | round-robin.sh | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/round-robin.sh b/round-robin.sh index a09ef49c..4c4b7883 100644 --- a/round-robin.sh +++ b/round-robin.sh @@ -12,9 +12,9 @@ # PROJECT's git SHA1 revision. These are mostly used in manifests. #rr[PROJECT_rev] -# Baseline branch name for current configuration. These branches are -# present in all above git repos. -#rr[baseline_branch]="linaro-local/ci/CONFIGURATION" +# Baseline branch name for current configuration. These branches should +# be present in all above git repos (if ${rr[init_configuration]} is false). +#rr[baseline_branch]="${rr[ci_project]}/${rr[ci_config]}" # PROJECT that we are testing in this build. Use ${rr[current_branch]} for # this project, and ${rr[baseline_branch]} for all other projects. @@ -36,6 +36,10 @@ # Top-level artifacts directory. #rr[top_artifacts]="$top_artifacts" +# Set rr[init_configuration] to 'true' for new projects/configurations +# to initialize baseline branches in git repos. +#rr[init_configuration]=false + # Reset artifacts to an empty state. ${rr[top_artifacts]}/results is the most # important artifact, since it records the metric of how successful the build # is. @@ -60,6 +64,11 @@ reset_artifacts () # base-artifacts repo is big and changes all the time, so we # fetch only the $baseline_branch, instead of all branches. rr[base-artifacts_rev]="${rr[base-artifacts_rev]-${rr[baseline_branch]}}" + if ${rr[init_configuration]-false}; then + rr[base-artifacts_rev]=empty + single_branch=empty + fi + 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 rr[base-artifacts_rev]=$(git -C base-artifacts rev-parse HEAD) @@ -93,6 +102,8 @@ clone_repo () else branch=${rr[current_branch]} fi + elif ${rr[init_configuration]-false}; then + branch="${rr[${project}_branch]}" else branch="refs/remotes/baseline/${rr[baseline_branch]}" fi @@ -123,7 +134,8 @@ clone_repo () rr[${project}_rev]=$cur_rev EOF - if [ x"$project" = x"${rr[current_project]}" ]; then + if [ x"$project" = x"${rr[current_project]}" ] \ + && ! ${rr[init_configuration]-false}; then local baseline_rev baseline_rev=$(git_rev_parse_long $project ${rr[baseline_branch]} baseline) # Prepare for failure. If build fails we will bisect sha1 for |