Search code examples
jenkinsjenkins-pluginsjenkins-pipelinejenkins-workflow

Set Jenkins build status to Success if one of jobs fails


I have a pipeline build with next stages:

enter image description here

The result of job C may be unsuccessful, but it should not influence on status of the Build. This should be blue:

enter image description here

Is it possible to do this in pipeline plugin?


Solution

  • You can use propagate: false

    Try the following code:

    stage 'C'
    build job: 'Job that fails', propagate: false