How to add a post build action in the pipeline in Jenkins

ⅰ亾dé卋堺 提交于 2019-12-03 13:33:39
Olia

You can simply add post action to your pipeline script, in case of using declarative pipeline. It is explained in Pipeline syntax reference.

You can add a stage for post build to add post build action in pipeline:

stage 'post-build'
node(Slave01){
build job: 'testing_build'
}

You can use this stage as:

try {
    //Stages to be included in build
    ...
} catch {
    ...
} finally {
    stage 'post-build'
    ...
}
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!