1
votes

I have three stages and due to some error when my build fails the Jenkins pipeline stage view is as shown below -

enter image description here

Now I am trying to fail the build if certain conditions are not met in one of the stage. But when I am doing that then instead of showing that particular stage in Red color all the subsequent stages are also shown in Red and with a failed tag at the bottom left corner. PFB the related screenshot

enter image description here

As shown in the first image, this behavior is not observed when build fails due to some error.Only the stage where error occurred is in Red with a failed tag at bottom-left corner. All the subsequent Stages are in White color.

I am using the following script inside Second Stage:

steps{if(condition not met){error("Build failed because of this and that..")}}

How to achieve the same view as that of First image when we are Failing the Build on the basis of some condition?

1

1 Answers

1
votes

Posibly you need to upgrade your Jenkins.

I am in version Jenkins ver. 2.204.2 and for me it shows clearly the failure of a particular stage and doesnt show all to be RED.enter image description here