Using jenkins embeddable build plugin to spruce up confluence and github
I have been using build status plugin for as long as I have been using Jenkins. It has the beauty of giving the current health of the branch at a glance.
But it is rather static and in-flexible. I was very glad to see that Thomas Dee took the initiave and gave this plugin a much needed upgrade in 2019. Check out the README.md for more details.
NOTE: If you are like me and don’t know how to install beta jenkins plugins follow this documentation from Jenkins
With the new plugin we can configure quite a few things including the subject (replaces the static build) part and the status. It is also possible to use other jenkins build attributes like duration, id and name. Through which you can get more meaningful meta data about the repo status like this
To add something like above into github the link looks like this
Adding the query parameter subject will provide customization and it can also take in some variables.
Encoding is tricky and you have to use ‘%20’ for spaces
Embed status into confluence document
- Go to jenkins job -> click on embedded build status -> copy unproected markup
- In confluence + -> insert markup -> paste from 1
- Edit this URL to your liking, taking care of encoding
eg: to get a status like ‘Master build duration ${duration}’ encoding becomes
subject=Master%20build%20duration%20%24%7Bduration%7D