Show a Jenkins pipeline stage as failed without failing the whole job

前端 未结 7 1044
被撕碎了的回忆
被撕碎了的回忆 2020-12-01 02:26

Here\'s the code I\'m playing with

node {
    stage \'build\'
    echo \'build\'

    stage \'tests\'
    echo \'tests\'

    stage \'end-to-end-tests\'
             


        
相关标签:
7条回答
  • 2020-12-01 03:20

    Sounds like JENKINS-26522. Currently the best you can do is set an overall result:

    if (result.equals("SUCCESS")) {
        stage 'deploy'
        build 'deploy'
    } else {
        currentBuild.result = e2e.result
        // but continue
    }
    
    0 讨论(0)
提交回复
热议问题