Build status jenkins

Chikku picture Chikku · Jul 25, 2012 · Viewed 7.4k times · Source

How can i access jenkins build status at runtime without email-ext plugin?

i want to access build_status using environment variable of jenkins. Or Any other way to access build status variable of jenkins?

Answer

Vladimir Sinenko picture Vladimir Sinenko · Jul 25, 2012

The default Jenkins environment variables don't include the build result.

However, you can use the Groovy Postbuild Plugin, which is run under the Jenkins JVM and have access to the current instance of the build.

Then from groovy you can access the build result via manager.build.result. See my answer here for the example usage.