I would like to do this, but in the Jenkins DSL:
If found somewhere this, but it's not working:
job('ps-first') {
steps { shell('echo "landing"') }
postBuildSteps { ...run other job here... }
configure {
it <<
'runPostStepsIfResult' { name('SUCCESS') }
}
}
As explained in https://jenkinsci.github.io/job-dsl-plugin/#path/freeStyleJob-publishers-downstream