Anand Patel
Anand Patel

Reputation: 6431

Jenkins - What's the difference between lastFailedBuild vs lastUnstableBuild vs lastUnSuccessfulBuild?

What's the difference between lastFailedBuild vs lastUnstableBuild vs lastUnSuccessfulBuild in Jenkins?

Upvotes: 5

Views: 2083

Answers (2)

Mike D
Mike D

Reputation: 6195

To boil it down from the Jenkins terminology page which is not very clear.

lastFailedBuild - last time/link that compilation failed during the build, see below.

lastUnstableBuild - last time/link that tests failed during the build, see below.

lastUnsuccessfulBuild - ambiguous, see below.

Note: plugins can change the build states as well.


Unstable build - A build is unstable if it was built successfully and one or more publishers report it unstable. For example if the JUnit publisher is configured and a test fails then the build will be marked unstable.

Broken/Failed build - Build that failed during compilation.

Unsuccessful Build - Amibiguous, could mean both unstable and failed or just one of those.


Update: Jenkins now defines a new set of terminology which fails to mention any of these.

Upvotes: 5

Ruben Fernandez
Ruben Fernandez

Reputation: 11

lastFailedBuild - When a build fails (Red ball).

lastUnstablesBuild - When a build is not stable (Yellow ball).

lastUnSuccessfulBuild - When any of the above occurs. (I'm not sure)

Upvotes: 0

Related Questions