aboutsummaryrefslogtreecommitdiff
path: root/jenkins
diff options
context:
space:
mode:
authorMatt Rendina <rendinam@users.noreply.github.com>2018-04-05 16:31:11 -0400
committerGitHub <noreply@github.com>2018-04-05 16:31:11 -0400
commit28eb9198885f8350df153bb48f4e6adfe6120166 (patch)
tree52395d86798b9a402a02dbc9ebbdaf301082a788 /jenkins
parent858d93847c43090f8c2bf65d8c81cbbab1158e2c (diff)
downloadbuild_control-28eb9198885f8350df153bb48f4e6adfe6120166.tar.gz
Add info to e-mail notification subject, improve formatting (#60)1.0.22
Diffstat (limited to 'jenkins')
-rw-r--r--jenkins/multi_trigger.groovy26
1 files changed, 24 insertions, 2 deletions
diff --git a/jenkins/multi_trigger.groovy b/jenkins/multi_trigger.groovy
index 958dee8..fb65be8 100644
--- a/jenkins/multi_trigger.groovy
+++ b/jenkins/multi_trigger.groovy
@@ -6,9 +6,12 @@ node('master') {
tasks = [:]
build_objs = [:]
+ build_types = []
stage("Trigger") {
for (platform in platforms.tokenize()) {
+ build_type = platform.tokenize("_")[0]
+ build_types += build_type
def platname = platform // must be inside for loop
println("platname = ${platname}")
tasks["${platname}"] = {
@@ -25,18 +28,37 @@ node('master') {
}
stage("Report") {
+ // Parallel execution of the code blocks defined within the 'tasks' map.
parallel(tasks)
println("Results...")
+ println(build_types)
results_msg = ""
- build_objs.each{
+
+ compare = build_types[0]
+ build_type = compare
+ for (type in build_types[1..-1]) {
+ if (type != compare) {
+ build_type = "mixed"
+ break
+ }
+ }
+
+ platcount = build_objs.size()
+ successes = 0
+ build_objs.each {
key, value -> results_msg = "${results_msg}${key} build #: ${value.number}, result: ${value.result}\n"
for (pkg_result in value.description.split('\n')) {
+ if (pkg_result == "SUCCESS") {
+ successes++
+ }
results_msg = "${results_msg}${pkg_result}\n"
}
+ results_msg = "${results_msg}\n"
}
println(results_msg)
def recipients = mail_recipients.replaceAll("\n", " ")
- mail body: results_msg, subject: "Build summary", to: recipients, from: "jenkins@boyle.stsci.edu"
+ def subject = "Build summary, ${build_type} - ${successes}/${platcount} platforms successful"
+ mail body: results_msg, subject: subject, to: recipients, from: "jenkins@boyle.stsci.edu"
}
}