Search code examples
hudsonjenkinshudson-pluginsjenkins-plugins

Build status jenkins


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?


Solution

  • 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.