diff options
author | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-20 12:42:58 +0000 |
---|---|---|
committer | Maxim Kuvyrkov <maxim.kuvyrkov@linaro.org> | 2019-02-22 11:42:35 +0000 |
commit | b553f7818103b3fb2c774020db885b20b584276f (patch) | |
tree | 43bbdc85a288d5f209b485d4591d013ca24f7c02 | |
parent | 1a60129203bf7933a360230e62cca84d9e8a00e7 (diff) |
jenkins-helpers.sh: Simplify run_step* functions
Remove copying of entries from base-artifacts/STEP/ to artifacts/STEP/
for skipped steps.
We used to rely on $run_step_prev_artifacts/build-ok markers to
detect pass/fail conditions of the previous step -- something that
we now explicitly handle with skip_/reset_/stop_on_on_fail modes
of run_step(). So remove unused feature.
Change-Id: I06e4298aa06ffb2aaf677d2c51e89da61ae9b119
-rw-r--r-- | jenkins-helpers.sh | 29 | ||||
-rwxr-xr-x | tcwg_kernel-build.sh | 13 |
2 files changed, 6 insertions, 36 deletions
diff --git a/jenkins-helpers.sh b/jenkins-helpers.sh index adcbe352..58ec2a29 100644 --- a/jenkins-helpers.sh +++ b/jenkins-helpers.sh @@ -1030,18 +1030,13 @@ git_push () # $1: Step to start execution at (or "" to start at the very first step) # $2: Step to finish execution at (or "" to run till the very end) # $3: Top artifact directory -# $4: Top baseline artifact directory (see Note 1) -# $5: Whether to enable "set -x" verbosity for execution steps. -# -# Note 1: Artifacts for steps before $run_step_start_at/$1 will be copied over -# from $base_artifacts/$4 +# $4: Whether to enable "set -x" verbosity for execution steps. run_step_init () { run_step_start_at="$1" run_step_finish_at="$2" run_step_top_artifacts="$3" - run_step_base_artifacts="$4" - run_step_verbose="$5" + run_step_verbose="$4" run_step_count="0" run_step_prev_step="" @@ -1049,12 +1044,6 @@ run_step_init () run_step_status=0 run_step_artifacts="" - if [ x"$run_step_base_artifacts" != x"" ]; then - run_step_use_baseline=true - else - run_step_use_baseline=false - fi - # We need absolute paths for $run_step_artifacts, which is constructed from # $run_step_top_artifacts. mkdir -p "$run_step_top_artifacts" @@ -1071,9 +1060,8 @@ run_step_init () # 2. artifact handling -- create/clean artifact directories per step. # Also, copy baseline artifacts for steps before START_AT to simulate # skipped steps. -# Step commands have $run_step_artifacts and $run_step_prev_artifacts -# pointing to artifact directories for current and previous step -# respectively. +# Step commands have $run_step_artifacts pointing to artifact directory +# for current step. # 3. logging -- dump stdout and and stderr output of step commands # into per-step console.log files, and, also, into the top-level # console.log file. @@ -1110,10 +1098,8 @@ run_step () if [ x"$pretty_step" = x"$run_step_start_at" \ -o x"$run_step_start_at" = x"" -a x"$run_step_prev_step" = x"" ]; then run_step_active=true - run_step_use_baseline=false fi - run_step_prev_artifacts=$run_step_artifacts run_step_artifacts=$run_step_top_artifacts/$run_step_count-$pretty_step rm -rf "$run_step_artifacts" @@ -1157,13 +1143,6 @@ run_step () assert false esac fi - elif $run_step_use_baseline; then - echo "COPYING BASE-ARTIFACTS for ${step[@]}" - local base_artifacts - base_artifacts="$run_step_base_artifacts/$(basename $run_step_artifacts)" - if [ -d "$base_artifacts" ]; then - rsync -a --del "$base_artifacts/" "$run_step_artifacts/" - fi else echo "SKIPPING ${step[@]}" fi diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh index dabc2995..a5737837 100755 --- a/tcwg_kernel-build.sh +++ b/tcwg_kernel-build.sh @@ -10,7 +10,7 @@ convert_args_to_variables "$@" obligatory_variables rr[ci_config] -# Execution mode: baseline, bisect, continue, jenkins-full +# Execution mode: baseline, bisect, jenkins-full rr[mode]="${rr[mode]-baseline}" # Set custom revision for one of the projects, and use baseline revisions @@ -52,7 +52,6 @@ trap "eval \"echo ERROR at \${FUNCNAME[0]}:\${BASH_LINENO[0]}\"" EXIT # Set start and finish steps for different modes. default_start_at="" default_finish_at="" -base_artifacts_opt="base-artifacts" case "${rr[mode]}" in "baseline") default_finish_at="update_baseline" @@ -68,14 +67,6 @@ case "${rr[mode]}" in esac default_finish_at="check_regression" ;; - "continue") - # Developer mode. - case "${rr[toolchain]}" in - "gnu") default_start_at="prepare_abe" ;; - "llvm") default_start_at="build_llvm" ;; - esac - base_artifacts_opt="" - ;; "jenkins-full") ;; esac if [ x"$start_at" = x"default" ]; then @@ -85,7 +76,7 @@ if [ x"$finish_at" = x"default" ]; then finish_at="$default_finish_at" fi -run_step_init "$start_at" "$finish_at" "${rr[top_artifacts]}" "$base_artifacts_opt" "$verbose" +run_step_init "$start_at" "$finish_at" "${rr[top_artifacts]}" "$verbose" # Build Linux kernel build_linux () |