jenkinsci / badge-plugin

Jenkins Badge plugin
https://plugins.jenkins.io/badge/
MIT License
32 stars 43 forks source link

version 2.0 is incompatible and breaks groovy-postbuild plugin #189

Open mawinter69 opened 2 days ago

mawinter69 commented 2 days ago

Jenkins and plugins versions report

Environment ```text Paste the output here ```

What Operating System are you using (both controller, and any agents involved in the problem)?

doesn't matter

Reproduction steps

https://github.com/jenkinsci/groovy-postbuild-plugin/blob/6eeecb7aeac5faa75313280ad67ad4c938e5bdc0/src/main/java/org/jvnet/hudson/plugins/groovypostbuild/GroovyPostbuildRecorder.java#L214 creates a new instance of BadgeSummaryAction I don't know the exact conditions when the code is called but it results in this stacktrace

[2024-09-18T03:04:30.919Z] java.lang.NoSuchMethodError: 'void com.jenkinsci.plugins.badge.action.BadgeSummaryAction.<init>(java.lang.String)'
[2024-09-18T03:04:30.919Z]  at PluginClassLoader for groovy-postbuild//org.jvnet.hudson.plugins.groovypostbuild.GroovyPostbuildRecorder$BadgeManager.createSummary(GroovyPostbuildRecorder.java:214)
[2024-09-18T03:04:30.919Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
[2024-09-18T03:04:30.919Z]  at java.base/jdk.internal.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)

Expected Results

badge is properly created

Actual Results

build fails

Anything else?

No response

Are you interested in contributing a fix?

No response

strangelookingnerd commented 2 days ago

My suggestion is to upgrade the groovy-postbuild-plugin in order to be compatible (I had that on my bucket list anyway). WDYT?

mawinter69 commented 2 days ago

definitely a solution

mawinter69 commented 2 days ago

Once groovy-postbuild is adjusted I think the release notes should be updated to mention that groovy-postbuild must be updated as well