0
votes

The Groovy Postbuild Plugin has methods for adding badges and labels to the builds, but as the name suggests this can only be run after the main build stage.

Is it possible to get access to the methods provided by the plug-in such as addShortText from within a plain groovy command executed in Jenkins (Add build step - Execute Groovy Script)?

I want to show these labels from the start of the build process, as they are known from the parameters passed when triggering the build. This makes tracking the specific build which is currently being executed easier.

1
Probably it's possible. You need to get the plugin sources, see how it's being done and finally do it exactly the same in the custom script. - Opal

1 Answers

0
votes

It's possible, it's called Groovy plugin

There is also another very useful plugin called Any Step plugin, that allows to use publishers as build steps, and build steps as post-build actions