blob: 958dee809fe2a8fae3e70ec203af366ce703819c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
|
// Trigger one or more jobs, collect results from each triggered job and e-mail
// a status summary to the recipients defined in the 'email_recipients' job
// parameter.
node('master') {
tasks = [:]
build_objs = [:]
stage("Trigger") {
for (platform in platforms.tokenize()) {
def platname = platform // must be inside for loop
println("platname = ${platname}")
tasks["${platname}"] = {
build_objs["${platname}"] = build(
job: "/AstroConda/${platname}/_dispatch",
parameters: [
booleanParam(name: 'cull_manifest',
value: cull_manifest.toBoolean()
)
],
propagate: false)
} // end tasks
} // end for
}
stage("Report") {
parallel(tasks)
println("Results...")
results_msg = ""
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')) {
results_msg = "${results_msg}${pkg_result}\n"
}
}
println(results_msg)
def recipients = mail_recipients.replaceAll("\n", " ")
mail body: results_msg, subject: "Build summary", to: recipients, from: "jenkins@boyle.stsci.edu"
}
}
|