Does shield.io support defining the latest successful build of a Jenkins job? #6113
Replies: 1 comment
-
Nope, and this is very much by design. The dynamic badges are intended to be rolling/dynamic reflections of current state, and not trying to only show happy-path results. Doing so could pretty easily result in a badge that's reflecting very old/stale data, which runs counter to the intent. You could also end up with weird/inconsistent behavior if you have both the build status and coverage badges together. One common filter that is supported and used, is to have your badge based off a specific branch, as opposed to the latest job from any branch. This then allows you to shift your badge to be reflective of the current coverage for your default branch ( If you still really want to have a badge that ignores everything other than passed jobs, then your best bet would be to utilize our Endpoint badge feature. You'd have to implement the logic yourself to interact with Jenkins to fetch/filter things out, but you could use an Endpoint badge to achieve that result. |
Beta Was this translation helpful? Give feedback.
-
I have looked at how to define a custom badge to display the code coverage of my project. In this case, the badge always refers to the latest build of the Jenkins job. My question is the following. Is it possible to make the badge reference a specific build, that is, the last successful build of the job?
Beta Was this translation helpful? Give feedback.
All reactions