I\'m rebuilding an existing build pipeline as a jenkins declarative pipeline (multi-branch-pipeline) and have a problem handling build propagation.
After packaging and s
Another way to do it is using the expression directive and beforeAgent, which skips the "decide" step and avoids messing with the "env" global:
pipeline {
agent none
stages {
stage('Tag on Docker Hub') {
when {
expression {
input message: 'Tag on Docker Hub?'
// if input is Aborted, the whole build will fail, otherwise
// we must return true to continue
return true
}
beforeAgent true
}
agent { label 'yona' }
steps {
...
}
}
}
}