Если вы используете конвейер jenkins
node(){
..
..
..
if (currentBuild.result == "SUCCESS") {
// If wait is set to true you can use the downstream_build.result to define the
//currentBuild.result
def downstream_build = build job: '<path-to>/another-build-job', wait: true
// Here you can set dependency between downstream and current build job
currentBuild.result = downstream_build.result
}
}
Если вы установите wait
на false
, ваш конвейер может немедленно завершиться, но вы не можете использовать downstream_build.result
node(){
..
..
..
if (currentBuild.result == "SUCCESS") {
def downstream_build = build job: '<path-to>/another-build-job', wait: false
}
}
Другим способом является Trigger Plugin