Jenkins continue pipeline on failed stage

后端 未结 3 1137
盖世英雄少女心
盖世英雄少女心 2021-01-06 05:10

I have a jenkins setup with a bunch of pipelines. I wrote a new pipeline which can start all pipelines at once. I would like to build other stages, even if one of them fails

3条回答
  •  攒了一身酷
    2021-01-06 05:40

    If they should be run in a sequence you can do something like this:

    def buildResult= 'success'
    try{
      build 'centos6.testing'
    }catch(e){
       buildResult = 'failure'
    }
    currentBuild.result = buildResult
    

    If they should be run in parallell you just run them: https://www.cloudbees.com/blog/parallelism-and-distributed-builds-jenkins

自定义标题
段落格式
字体
字号
代码语言
提交回复
热议问题