Skip all the jobs if resume is enabled && success.
This commit is contained in:
parent
b2324d2fad
commit
5c120a3207
|
@ -233,12 +233,20 @@ def buildComponents(args, maven_settings_file, maven_local_repo_path) {
|
|||
if (args.items) {
|
||||
parallel args.items?.collectEntries { name ->
|
||||
["${name}": {
|
||||
if (name && !"NONE".equalsIgnoreCase(name))
|
||||
build(job: name,
|
||||
if (name && !"NONE".equalsIgnoreCase(name)) {
|
||||
if ( ("${resume}" == 'true') && (jobs["${name}"] == 'SUCCESS') ) {
|
||||
echo "Skipping ${name}"
|
||||
// propagate success
|
||||
sh "echo -e \\\"${name},SUCCESS\\\">> $JOB_REPORT"
|
||||
} else {
|
||||
build(job: name,
|
||||
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_settings_file}"],
|
||||
[$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"],
|
||||
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']]
|
||||
])
|
||||
sh "echo -e \\\"${name},${gjob.getResult()}\\\">> $JOB_REPORT"
|
||||
}
|
||||
}
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue