diff options
Diffstat (limited to 'tcwg_dummy-build.sh')
-rwxr-xr-x | tcwg_dummy-build.sh | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/tcwg_dummy-build.sh b/tcwg_dummy-build.sh new file mode 100755 index 00000000..69108f56 --- /dev/null +++ b/tcwg_dummy-build.sh @@ -0,0 +1,43 @@ +#!/bin/bash + +set -euf -o pipefail + +scripts=$(dirname $0) +# shellcheck source=jenkins-helpers.sh +. $scripts/jenkins-helpers.sh +# shellcheck source=round-robin.sh +. $scripts/round-robin.sh + +convert_args_to_variables "$@" +obligatory_variables rr[ci_project] rr[ci_config] rr[components] bisect_log +declare -A rr +declare bisect_log + +rr[mode]="${rr[mode]-build}" +rr[update_baseline]="${rr[update_baseline]-ignore}" +rr[baseline_branch]="linaro-local/ci/${rr[ci_project]}/${rr[ci_config]}" +rr[${rr[components]}_git]=${rr[${rr[components]}_git]-baseline} + +# Artifacts version +rr[major]=4 +rr[minor]=0 + +# Set start and finish steps for different modes. +start_at="" +if [ x"${rr[mode]}" = x"bisect" ]; then + start_at="clone_repo-${rr[components]}" +fi +run_step_init "$start_at" "" "${rr[top_artifacts]}" "true" + +no_regression_p () +{ + local rev + rev=$(get_current_git "${rr[components]}_rev") + if grep -q "^git bisect bad $rev" "$bisect_log"; then + return 1 + fi +} + +run_step stop_on_fail -10 reset_artifacts +run_step skip_on_fail 0 clone_repo "${rr[components]}" +run_step reset_on_fail x check_regression |