Search code examples
jenkinsjenkins-pipelinejenkins-pluginsbadge

How to get Jenkins build monitor plugin to display badges?


I am trying to integrate the badges plugin with the jenkins build monitor plugin, which according to the latest release notes should be possible now. (https://github.com/jan-molak/jenkins-build-monitor-plugin/releases/tag/v1.11%2Bbuild.201701152243)

I have downloaded and installed all required plugins and dependencies. And added the following code to my Jenkins pipeline in the Post always block.

addBadge(icon:"text.gif", text:"cucumber-report", id:"cukerep", link:"http://www.google.com")

But after the build finishes without errors, no badges show up in my build monitor plugin view.

I also ticked the show badges box in the build monitor view.

Does anyone know what I am missing?


Solution

  • I think this is a bug in jenkins monitor view that no badges are shown.

    However, if you use the method

    addShortText (text: "ExampleText", background: "red", border: "1", borderColor: "black", color: "black")
    

    the text will be displayed.

    enter image description here