build-monitor-plugin
build-monitor-plugin copied to clipboard
Customize build monitor text
I would like the ability to customize the build monitor text dynamically from a Jenkinsfile. e.g.…
pipeline {
stages {
stage('Run Analysis') {
steps {
// do some stuff
// the text I want to display in Build Monitor is now in output.txt
}
}
stage('Update Build Monitor') {
steps {
// ???
}
}
}
}
I couldn't find any way to do this in the docs. Is this possible currently? If not, I would like to submit it as a feature request.
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.
Hi there! Could you please elaborate a bit more on what you mean by "build monitor text"?
@jan-molak I mean the title and subtitle strings that appear on the build monitor view:
In my case, I want to regularly, automatically run some customer satisfaction analytics and show something like this (photoshopped):
This could be helpful for communicating lots of different data (e.g. test suite run time, file size of build artifacts, etc.)
What you can do today is:
- Use a display name for the job, which will replace "QA >> my-repo" with a static name, for example "Customer satisfaction"
- Set the build description after the execution with a desired statement, or use postbuild badges
- Disable committers for that job
Thanks, I guess it would be helpful if I could do more than currentBuild.setDisplayName
and currentBuild.setDisplayName
and currentBuild.setDescription
.
@getaaron build description supports simple HTML, so you can format text (bold, color) and add a table, see screenshot:
@vanta , Can you shortly guide me how to construct the dashboard as yours above? Where exactly is the space for build description, so we can add text colors and tables? Thanks in advance for your help.
See my comment below
For every build you can set a description programmatically. By default it contains a date of build I believe. Just put a HTML there, e.g.:
currentBuild.description='line1<br/>HTML test<br/>line2'
@jan-molak @vanta : Is it possible to add the description for the jobs using the Build Monitor Plugin ?