I would like to collect all triggered jobs results.
My script looks like this:
stage('Integration Tests') {
steps {
script {
def jobs = [:]
def childJob
def childJobName
pipelineIntegrationJobs.each {
i -> jobs["${nirvanaMajor}.${nirvanaMinor}_${i}"] = {
childJob = build (job: "${nirvanaMajor}.${nirvanaMinor}_${i}",
parameters: [
string(name: 'branch', value: "${svnBranch}"),
string(name: 'fix', value: "${env.fix}"),
string(name: 'buildnumber', value: "${env.buildNumber}"),
string(name: 'revision', value: "${env.buildNumber}"),
string(name: 'joblabel', value: "${pipelineName}")
],
quietPeriod: 0, propagate: false, wait: true).result
}
childJobName = "${nirvanaMajor}.${nirvanaMinor}_${i}"
results.put(childJobName, childJob)
}
parallel jobs
}
}
}
In the post section of the pipeline I have this:
script {
println "------------------------------------"
println "Job Status Summary:"
results.each{ k, v -> println "${k}:${v}" }
println "------------------------------------"
}
This yields properly the job names but not job statuses:
*12:22:41* Job Status Summary:[Pipeline] echo*12:22:41*
10.4_test_foundation_win:null[Pipeline] echo*12:22:41*
10.4_test_foundation_linux:null[Pipeline] echo*12:22:41*
10.4_test_client_win:null[Pipeline] echo*12:22:41*
10.4_test_client_linux:null[Pipeline] echo*12:22:41*
10.4_test_base_linux:null[Pipeline] echo*12:22:41*
10.4_test_base_win:null[Pipeline] echo*12:22:41*
10.4_test_admin_api_win:null[Pipeline] echo*12:22:41*
10.4_test_admin_api_linux:null[Pipeline] echo*12:22:41*
10.4_test_admin_api_cluster_win:null[Pipeline] echo*12:22:41*
10.4_test_admin_api_cluster_linux:null[Pipeline] echo*12:22:41*
10.4_test_jms_win:null[Pipeline] echo*12:22:41*
10.4_test_jms_linux:null[Pipeline] echo*12:22:41*
10.4_test_client_tool_linux:null[Pipeline] echo*12:22:41*
10.4_test_client_tool_win:null[Pipeline] echo*12:22:41*
10.4_test_cluster_tool_linux:null[Pipeline] echo*12:22:41*
10.4_test_cluster_tool_win:null[Pipeline] echo*12:22:41*
10.4_test_admin_tool_win:null[Pipeline] echo*12:22:41*
10.4_test_admin_tool_linux:null[Pipeline] echo*12:22:41*
10.4_test_cpp_linux:null[Pipeline] echo*12:22:41*
10.4_test_cpp_win:null[Pipeline] echo*12:22:41* 10.4_test_cpp_osx:null
Could this be because of [wait: true]?
I read different topics that this is the right way to collect the results, but
it is not working in my case.
What I am missing?
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/d0971a97-63dd-4e2f-aebf-ef2ece00e4e8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.