#!/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} # 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 run_step stop_on_fail x update_baseline