Add resume also for maven-parent.

This commit is contained in:
Manuele Simi 2019-12-08 15:59:50 -05:00
parent 05df0c77f3
commit fe1719cce5
1 changed files with 12 additions and 7 deletions

19
Jenkinsfile vendored
View File

@ -157,13 +157,18 @@ pipeline {
// the maven-parent needs to be built (once) at each execution // the maven-parent needs to be built (once) at each execution
stage('build maven-parent') { stage('build maven-parent') {
steps { steps {
def gjob = build(job: 'maven-parent', wait: true, propagate: true, if ( ('true'.equals(${resume})) && (wasSuccess('maven-parent')) ) {
parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_parent_file}"], // propagate success
[$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"], sh "echo -e \\\"maven-parent,SUCCESS\\\">> $JOB_REPORT"
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']] } else {
]) def gjob = build(job: 'maven-parent', wait: true, propagate: true,
sh "echo -e \\\"${name},${gjob.getResult()}\\\">> $JOB_REPORT" parameters: [[$class: 'StringParameterValue', name: 'gcube_settings', value: "${maven_parent_file}"],
echo "Done with maven-parent" [$class: 'StringParameterValue', name: 'local_repo', value: "${maven_local_repo_path}"],
[$class: 'LabelParameterValue', name: 'exec_label', label: "CD", nodeEligibility: [$class: 'AllNodeEligibility']]
])
sh "echo -e \\\"maven-parent,${gjob.getResult()}\\\">> $JOB_REPORT"
echo "Done with maven-parent"
}
} }
} }
stage('build components') { stage('build components') {