Releases: jenkinsci/badge-plugin
2.5
2.4
2.3
2.2
🐛 Bug fixes
- Fix pipeline syntax snippet generation (#198) (#199) @strangelookingnerd
📝 Documentation updates
- Fix pipeline syntax snippet generation (#198) (#199) @strangelookingnerd
📦 Dependency updates
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3435 (#197) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3413 (#195) @renovate
- Update dependency org.jenkins-ci.plugins:plugin to v4.88 (#193) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3387 (#192) @renovate
2.1
🐛 Bug fixes
- Allow fields to be optional in declarative pipeline (#188) @strangelookingnerd
2.0
🚀 New Major Version
The Badge Plugin has been completely reworked to overcome some limitations and bugs of previous versions and in order to be easier to maintain.
This release is expected to not cause incompatibilities with existing pipeline definitions and configuration on a technical level but may introduce some (minor) visual changes to existing badges and summaries. See the following secions as well as #151 and the README for more details.
In case you find a bug or potential incompatibility that may have slipped the extensive testing please do not hesitate to create a new issue.
💥 Breaking Changes and Deprecations
The new new major version 2.0 is marked as be incompatible with previous versions and deprecates most of the previous pipeline steps and fields for these steps.
💥 Incompatible downstream plugins
As of now the following plugins are incompatible with Badge Plugin 2.x:
- groovy-postbuild-plugin - See PR 81 - Please update to version
264.vf6e02a_77d5b_c
as compatible release - build-monitor-plugin - See PR 995 - Please update to version
1.14-925.v95b_9089a_4c7f
as compatible realease
Users of these plugins are advised to upgrade the Badge Plugin alongside compatible releases of the respective plugin.
💥 HTML formatting delegated to global Jenkins MarkupFormatter
- Breaking: Remove Badge Plugin global configuration
- This will mostly affect usage in
JCasC
but also may impact some visualization, see next points
- This will mostly affect usage in
- All text is formatted using
Jenkins.get().getMarkupFormatter().translate()
- Breaking: It is no longer possible to use non-sanitized HTML in badges (unless there is a
MarkupFormatter
for it) - This is a huge security improvement that prevents any malicious injections via HTML / JavaScript and makes configuration easier
- Breaking: It is no longer possible to use non-sanitized HTML in badges (unless there is a
❓ What does that mean? Why is my text not rendered as HTML anymore?
As of now there are multiple MarkupFormatter implementation available. The default that is shipped with Jenkins is Plain Text
that will not render any HTML or any other markup languages.
In case you find that your badges or summaries created by the Badge Plugin are no longer rendering HTML in their texts, it is likely caused by the configured MarkupFormatter being Plain Text
.
To render HTML in badges and summaries you will need to change the global Jenkins Configuration to use Safe HTML
provided via OWASP Markup Formatter.
See the README for details.
❓ My Jenkins Configuration as Code (JCasC) fails to start Jenkins, what can I do?
Since the global plugin configuration got removed, the JCasC directives such as
jenkins:
security:
badgePlugin:
disableFormatHTML: false
are no longer valid and should be removed or better replaced by configuring Jenkins global MarkupFormatter
jenkins:
markupFormatter:
rawHtml:
disableSyntaxHighlighting: true
🚧 Deprecations
At this point it is not clear when or if these deprecations will be removed, however use is discouraged and there are no plans to maintain deprecated functionallity.
- Deprecate
addHtmlBadge
(can be substituted byaddBadge
)- Remains backwards compatibility for existing pipelines and configs
- Add deprecation notices to build output
- Deprecate
addShortText
(can be substituted byaddBadge
)- Remains backwards compatibility for existing pipelines and configs
- Add deprecation notices to build output
- Deprecate
createSummary
(can be substituted byaddSummary
)- Remains backwards compatibility for existing pipelines and configs
- Add deprecation notices to build output
- Remove all documentation of deprecated badges
🚀 New features and improvements
🚀 addBadge
reworked
- Refrain from building CSS styles or classes in jelly but rather have them as user input
- All
text
can be plain text or HTML (withSafe HTML
MarkupFormatter enabled) - Can be used for both, text and icon badges
- Supports built-in icon, Jenkins icons and symbols as well as icons and symbols of other plugins
- New fields:
- id - optional identifier of the badge
- text - text used for the badge or the hover text when an icon is selected
- icon - icon used for the badge
- cssClass - optional CSS class to be applied to a badge
- style - optional CSS style to be applied to a badge
- link - optional link for a badge
👷🏼 addInfoBadge
, addWarningBadge
, addErrorBadge
reworked
- Inherit directly from
addBadge
🚀 New addSummary
- Substitutes
createSummary
and has all feature the other badges have - Allows having a link in the summary
🚀 Manipulate a badge during build time
- All pipeline steps now return the action that was created and allow to manipulate a badge in a pipeline
def badge = addBadge(icon: 'everything-is-awesome.png', text: 'All is good!') ... badge.setText('Somehing bad happened!') badge.setIcon('everything-is-on-fire.png')
🤖 Generated Changelog
🚀 New features and improvements
- Refactoring for new major version (#151) @strangelookingnerd
📝 Documentation updates
✍ Other changes
- Update Jenkins Security Scan action (#176) @strangelookingnerd
- Modernize to Jenkins 2.440.3 (#174) @sghill-rewrite
📦 Dependency updates
22 changes
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3358 (#186) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3334 (#185) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3307 (#183) @renovate
- Update dependency org.jenkins-ci.plugins:plugin to v4.87 (#182) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3289 (#181) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3276 (#180) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3271 (#179) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3258 (#178) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.440.x to v3234 (#175) @renovate
- Update dependency org.jenkins-ci.plugins:plugin to v4.86 (#173) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.426.x to v3208 (#172) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.426.x to v3193 (#170) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.426.x to v3180 (#169) @renovate
- Update dependency org.jenkins-ci.plugins:plugin to v4.85 (#168) @renovate
- Update dependency org.jenkins-ci.plugins:plugin to v4.84 (#167) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.426.x to v3157 (#166) @renovate
- Update dependency io.jenkins.tools.bom:bom-2.426.x to v3143 (#165) @renovate
- Configure Renovate (#163) @strangelookingnerd
- chore(deps): bump io.jenkins.tools.bom:bom-2.426.x from 3120.v4d898e1e9fc4 to 3135.v6d6c1f6b_3572 (#162) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.82 to 4.83 (#160) @dependabot
- chore(deps): bump io.jenkins.tools.bom:bom-2.426.x from 3105.v672692894683 to 3120.v4d898e1e9fc4 (#161) @dependabot
- chore(deps): bump io.jenkins.tools.bom:bom-2.426.x from 3080.vfa_b_e4a_a_39b_44 to 3105.v672692894683 (#159) @dependabot
1.13
🐛 Bug fixes
- Hard-code size of icons (#148) (#158) @strangelookingnerd
✍ Other changes
- README.md: fix typo "fot" => "for" (#156) @jimklimov
📦 Dependency updates
- chore(deps): bump io.jenkins.tools.bom:bom-2.426.x from 3056.v53343b_a_b_a_850 to 3080.vfa_b_e4a_a_39b_44 (#157) @dependabot
1.12
🐛 Bug fixes
- JENKINS-73187 - Do not apply icon size to text badges (#153) @MarkEWaite
📝 Documentation updates
- Add configuration as code documentation (#154) @MarkEWaite
📦 Dependency updates
- chore(deps): bump io.jenkins.tools.bom:bom-2.426.x from 3041.ve87ce2cdf223 to 3056.v53343b_a_b_a_850 (#155) @dependabot
1.11
💥 Breaking changes
- Move configuration as code setting from the
unclassified
section to thesecurity
section (#150) @strangelookingnerd
🚀 New features and improvements
- Improve global configuration (#150) @strangelookingnerd
🐛 Bug fixes
- Use size class for all icons, not just symbols (#149) @MarkEWaite
📝 Documentation updates
- Improve global configuration (#150) @strangelookingnerd
- Code cleanup (#144) @strangelookingnerd
- Remove readme generator (#140) @strangelookingnerd
- Enable Codecov Coverage and Jenkins Security Scan (#139) @strangelookingnerd
- Fix spelling error in README template (#138) @MarkEWaite
👻 Maintenance
- Code cleanup (#144) @strangelookingnerd
- Enable spotless (#142) @strangelookingnerd
- Missing POST/RequirePOST annotation (#141) @strangelookingnerd
- Remove readme generator (#140) @strangelookingnerd
- Enable Codecov Coverage and Jenkins Security Scan (#139) @strangelookingnerd
- Move change logs to GitHub releases via release drafter (#136) @strangelookingnerd
🚦 Tests
- Check link with leading / (#147) @MarkEWaite
- Test getText() with isDisableFormatHTML (#146) @MarkEWaite
- Fix mistake in earlier coverage test commit (#145) @MarkEWaite
- Add a few tests to increase code coverage (#143) @MarkEWaite
- Enable Codecov Coverage and Jenkins Security Scan (#139) @strangelookingnerd
- Upgrade tests to run with JUnit5 (#137) @strangelookingnerd
1.10
🚀 New features and improvements
🐛 Bug fixes
- Rename createSummary display name to Create Summary (#77) @dparapanov
📝 Documentation updates
- Improve README generator (#108) @MarkEWaite
- Improve documentation formatting (#102) @MarkEWaite
- Document removeSummaries (#101) @andreasgrob
👻 Maintenance
- Require Jenkins 2.426.3 or newer (#132) @MarkEWaite
- Remove unused commons-validator dependency (#131) @MarkEWaite
- Reduce Jenkinsfile diffs to archetype (#114) @MarkEWaite
- Add Plugin Development Team to CODEOWNERS (#113) @sghill-rewrite
- Test with Java 21 (#110) @MarkEWaite
- Require Jenkins 2.346.3 as minimum Jenkins version (#71) @MarkEWaite
🚦 Tests
- Use versions from bom (#109) @MarkEWaite
- Move parallel test control to Jenkinsfile (#107) @MarkEWaite
- fix(jenkins) Simplify Jenkinsfile (#82) @gounthar
✍ Other changes
- Move change logs to GitHub releases via release drafter (#136) @strangelookingnerd
- Modernize to Jenkins 2.401.3 (#118) @sghill-rewrite
- chore: Parallelize Tests (#105) @rahulsom
- chore(github) Removes the
maven
build which is unnecessary (#80) @gounthar - Optimize Gitpod config (#66) @jmMeessen
- Gitpodify repository (#64) @jmMeessen
- Add index.jelly (#56) @offa
- Use plugin bom (#41) @MarkEWaite
- Misc enhancements (#39) @offa
- Fix dependabot config (#38) @offa
- Update to Jenkins v2.277 LTS (#34) @offa
- Enable dependabot (#28) @offa
- Use GitHub for plugins.jenkins.io documentation (#22) @MarkEWaite
- Use HTTPS URLs in pom.xml (#21) @daniel-beck-bot
- add global config (#20) @bakito
- Fix JENKINS-53841 - (#14) @LinuxSuRen
- fix one char typo border vs. order (#9) @balihb
- fix action hierarchy (#7) @bakito
- Adding removeBadge(icon) and removeAllBadges() methods to remove existing badges (#5) @bakito
📦 Dependency updates
58 changes
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.81 to 4.82 (#135) @dependabot
- chore(deps): bump io.jenkins.tools.bom:bom-2.426.x from 3010.vec758b_8e7da_3 to 3041.ve87ce2cdf223 (#134) @dependabot
- chore(deps): bump io.jenkins.tools.incrementals:git-changelist-maven-extension from 1.7 to 1.8 (#129) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.80 to 4.81 (#128) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.78 to 4.80 (#127) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.77 to 4.78 (#126) @dependabot
- chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.1.1 to 3.2.0 (#125) @dependabot
- chore(deps-dev): bump com.hubspot.jinjava:jinjava from 2.7.1 to 2.7.2 (#124) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.76 to 4.77 (#122) @dependabot
- chore(deps): bump io.jenkins.tools.bom:bom-2.401.x from 2675.v1515e14da_7a_6 to 2745.vc7b_fe4c876fa_ (#123) @dependabot
- chore(deps): bump io.jenkins.tools.bom:bom-2.401.x from 2643.vfa_93ff299d20 to 2675.v1515e14da_7a_6 (#121) @dependabot
- chore(deps): bump io.jenkins.tools.bom:bom-2.401.x from 2612.v3d6a_2128c0ef to 2643.vfa_93ff299d20 (#119) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.75 to 4.76 (#120) @dependabot
- chore(deps): bump org.codehaus.mojo:exec-maven-plugin from 3.1.0 to 3.1.1 (#117) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.73 to 4.75 (#116) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.72 to 4.73 (#115) @dependabot
- chore(deps-dev): bump com.hubspot.jinjava:jinjava from 2.7.0 to 2.7.1 (#111) @dependabot
- chore(deps): bump org.jenkins-ci.plugins:plugin from 4.71 to 4.72 (#112) @dependabot
- chore(deps): bump plugin from 4.69 to 4.71 (#106) @dependabot
- chore(deps): bump plugin from 4.65 to 4.69 (#103) @dependabot
- chore(deps): bump git-changelist-maven-extension from 1.6 to 1.7 (#104) @dependabot
- chore(deps): bump bom-2.361.x from 2025.v816d28f1e04f to 2102.v854b_fec19c92 (#100) @dependabot
- chore(deps): bump plugin from 4.62 to 4.65 (#99) @dependabot
- chore(deps): bump plugin from 4.57 to 4.62 (#98) @dependabot
- chore(deps): bump plugin from 4.55 to 4.57 (#95) @dependabot
- chore(deps): bump antisamy-markup-formatter from 2.7 to 159.v25b_c67cd35fb_ (#93) @dependabot
- chore(deps-dev): bump jinjava from 2.5.1 to 2.7.0 (#96) @dependabot
- chore(deps): bump bom-2.361.x from 1836.vfe602c266c05 to 1968.vb_14a_29e76128 (#94) @dependabot
- chore(deps): bump git-changelist-maven-extension from 1.4 to 1.6 (#91) @dependabot
- chore(deps): bump plugin from 4.54 to 4.55 (#92) @dependabot
- chore(deps): bump bom-2.361.x from 1792.v0295db_e7c548 to 1798.vc671fe94856f (#89) @dependabot
- chore(deps): bump plugin from 4.53 to 4.54 (#88) @dependabot
- chore(deps): bump bom-2.361.x from 1775.vf0577a_a_01778 to 1792.v0295db_e7c548 (#87) @dependabot
- chore(deps): bump bom-2.361.x from 1757.vf3c66da_b_7492 to 1763.v092b_8980a_f5e (#85) @dependabot
- Bump bom-2.361.x from 1750.v0071fa_4c4a_e3 to 1757.vf3c66da_b_7492 (#84) @dependabot
- Bump bom-2.361.x from 1742.vb_70478c1b_25f to 1750.v0071fa_4c4a_e3 (#83) @dependabot
- Bump plugin from 4.51 to 4.53 (#79) @dependabot
- Bump bom-2.346.x from 1723.vcb_9fee52c9fc to 1742.vb_70478c1b_25f (#78) @dependabot
- Bump bom-2.346.x from 1678.vc1feb_6a_3c0f1 to 1723.vcb_9fee52c9fc (#74) @dependabot
- Bump plugin from 4.50 to 4.51 (#75) @dependabot
- Bump plugin from 4.49 to 4.50 (#72) @dependabot
- Bump bom-2.346.x from 1670.v7f165fc7a_079 to 1678.vc1feb_6a_3c0f1 (#73) @dependabot
- Bump plugin from 4.48 to 4.49 (#69) @dependabot
- Bump plugin from 4.47 to 4.48 (#67) @dependabot
- Bump plugin from 4.46 to 4.47 (#65) @dependabot
- Bump plugin from 4.45 to 4.46 (#63) @dependabot
- Bump plugin from 4.43.1 to 4.45 (#62) @dependabot
- Bump git-changelist-maven-extension from 1.3 to 1.4 (#61) @dependabot
- Bump exec-maven-plugin from 3.0.0 to 3.1.0 (#59) @dependabot
- Bump plugin from 4.42 to 4.43.1 (#60) @dependabot
- Bump plugin from 4.41 to 4.42 (#58) @dependabot
- Bump plugin from 4.40 to 4.41 (#57) @dependabot
- Bump plugin from 4.38 to 4.40 (#55) @dependabot
- Bump plugin from 4.37 to 4.38 (#53) @dependabot
- Bump plugin from 4.35 to 4.37 (#51) @dependabot
- Bump plugin from 4.34 to 4.35 (#50) @dependabot
- Bump plugin from 4.33 to 4.34 (#49) @dependabot
- Bump script-security from 1.75 to 1.78 (#29) @dependabot