summaryrefslogtreecommitdiff
path: root/tcwg_kernel-build.sh
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-11-24 08:31:58 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2018-11-26 15:06:19 +0000
commit6e8534990c0ebf491c43b9a6f771e5149b5e08d1 (patch)
tree6570b763fb12a8f586d360cef6277904514d5300 /tcwg_kernel-build.sh
parentd993e2699ac3a33a416bba0058f5bda8158fa309 (diff)
tcwg_kernel-build.sh: Preserve artifacts/jenkins in reset_artifacts
So that we can archive info provided by tcwg_kernel.yaml such as build-name and (in future) URL links to jobs. The latter will be helpful when browsing results history in base-artifacts.git repo. Also fix a bug that preserved all of "artifacts/1-reset_artifacts/*" files, instead of only artifacts/1-reset_artifacts/console.log. Change-Id: I549126e7284bd34452abecd35553160d325c79e7
Diffstat (limited to 'tcwg_kernel-build.sh')
-rwxr-xr-xtcwg_kernel-build.sh12
1 files changed, 9 insertions, 3 deletions
diff --git a/tcwg_kernel-build.sh b/tcwg_kernel-build.sh
index c67b7ca4..964340ac 100755
--- a/tcwg_kernel-build.sh
+++ b/tcwg_kernel-build.sh
@@ -107,9 +107,15 @@ reset_artifacts ()
(
set -euf -o pipefail
- # We are called by run_step, which writes to console.log files,
- # so remove everything but these files.
- find $top_artifacts -maxdepth 1 ! -path $top_artifacts ! -path $top_artifacts/console.log ! -path $run_step_artifacts ! -path $run_step_artifacts/console.log -print0 | xargs -0 rm -rf
+ # Clean $top_artifacts but preserve
+ # - $top_artifacts/console.log and $run_step_artifacts/console.log, which
+ # are being written to by run_step().
+ # - $top_artifacts/jenkins/*, which is cleaned by tcwg_kernel.yaml.
+ find $top_artifacts -maxdepth 2 \
+ ! -path $top_artifacts ! -path $top_artifacts/console.log \
+ ! -path $run_step_artifacts ! -path $run_step_artifacts/console.log \
+ ! -path "$top_artifacts/jenkins/*" \
+ -print0 | xargs -0 rm -rf
# Set success metric to worst possible (-3).
echo "Starting build" > $top_artifacts/results