summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-01-14 10:22:00 +0000
committerMaxim Kuvyrkov <maxim.kuvyrkov@linaro.org>2019-01-14 12:48:41 +0000
commite21b4050e0b1922a3610a579da4bda95be009ebc (patch)
treecc52af30253fbf59ba86787a277916a9e1b7dffe
parent18ccb2ae92c349d429d4ee344d41fc244b154592 (diff)
tcwg_kernel-bisect.sh: Simplify handling of email body
With updates to tcwg_kernel.yaml we no longer need to output email recipients and body into shell variable, and can just create files with text instead. Change-Id: I85f944aae9fa5ccc446bb26fdf871e65a9164ba1
-rwxr-xr-xtcwg_kernel-bisect.sh27
1 files changed, 13 insertions, 14 deletions
diff --git a/tcwg_kernel-bisect.sh b/tcwg_kernel-bisect.sh
index 7c79bf14..17ade114 100755
--- a/tcwg_kernel-bisect.sh
+++ b/tcwg_kernel-bisect.sh
@@ -254,11 +254,6 @@ case "$toolchain:$current_project" in
llvm:llvm) CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS, adhemerval.zanella@linaro.org, maxim.kuvyrkov@linaro.org, ndesaulniers@google.com, trong@google.com, yvan.roux@linaro.org" ;;
esac
-cat > $artifacts/ci_mail_parameters.sh <<EOF
-CI_MAIL_RECIPIENTS="$CI_MAIL_RECIPIENTS"
-EOF
-chmod +x $artifacts/ci_mail_parameters.sh
-
if [ -f $artifacts/first-bad ]; then
mkdir -p $artifacts/jenkins
touch $artifacts/jenkins/build-name
@@ -302,12 +297,12 @@ if [ -f $artifacts/first-bad ]; then
good_sha1="$last_good"
bad_name="first_bad"
bad_sha1="$first_bad"
- cat >> $artifacts/ci_mail_parameters.sh <<EOF
-CI_MAIL_BODY="Successfully identified regression in $current_project on $target @ $toolchain-${rr[${toolchain}_version]} @ linux-${rr[linux_version]}-$linux_config between bad $bad_rev and baseline $baseline_rev .
+ cat >> $artifacts/jenkins/mail-body.txt <<EOF
+Successfully identified regression in $current_project on $target @ $toolchain-${rr[${toolchain}_version]} @ linux-${rr[linux_version]}-$linux_config between bad $bad_rev and baseline $baseline_rev .
Culprit:
<cut>
-$(git -C $current_project log -n 1 $first_bad | tr '"' "'")
+$(git -C $current_project log -n 1 $first_bad)
</cut>
EOF
@@ -316,13 +311,13 @@ else
good_sha1="$baseline_rev"
bad_name="bad"
bad_sha1="$bad_rev"
- cat >> $artifacts/ci_mail_parameters.sh <<EOF
-CI_MAIL_BODY="Could not identify regression in $current_project on $target @ $toolchain-${rr[${toolchain}_version]} @ linux-${rr[linux_version]}-$linux_config between bad $bad_rev and baseline $baseline_rev down to a single commit. See 'Bisect log' in the links below for bisection details.
+ cat >> $artifacts/jenkins/mail-body.txt <<EOF
+Could not identify regression in $current_project on $target @ $toolchain-${rr[${toolchain}_version]} @ linux-${rr[linux_version]}-$linux_config between bad $bad_rev and baseline $baseline_rev down to a single commit. See 'Bisect log' in the links below for bisection details.
EOF
fi
-cat >> $artifacts/ci_mail_parameters.sh <<EOF
+cat >> $artifacts/jenkins/mail-body.txt <<EOF
Results regressed from (for $good_name == $good_sha1)
<cut>
@@ -364,14 +359,18 @@ Build log: ${BUILD_URL}consoleText
EOF
if [ -f $artifacts/first-bad ]; then
- cat >> $artifacts/ci_mail_parameters.sh <<EOF
+ cat >> $artifacts/jenkins/mail-body.txt <<EOF
Full commit:
<cut>
-$(git -C $current_project show $first_bad | tr '"' "'")
+$(git -C $current_project show $first_bad)
</cut>
-"
EOF
fi
+# Set mail recipients last to preserve catch-error value from tcwg_kernel.yaml.
+cat > $artifacts/jenkins/mail-recipients.txt <<EOF
+$CI_MAIL_RECIPIENTS
+EOF
+
trap "" EXIT