Edit: Removed "Before submitting..." paragraph
Jenkinsfile
gitlabBuilds(builds: ['Compile', 'Test', 'Package']) {
node {
...
stage("Compile") {
gitlabCommitStatus("Compile") {
...
}
...
}
...
}
Console Output
java.lang.IllegalArgumentException: Expected named arguments but got Compile
at org.jenkinsci.plugins.workflow.cps.DSL.singleParam(DSL.java:542)
at org.jenkinsci.plugins.workflow.cps.DSL.parseArgs(DSL.java:530)
at org.jenkinsci.plugins.workflow.cps.DSL.parseArgs(DSL.java:470)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeStep(DSL.java:183)
at org.jenkinsci.plugins.workflow.cps.DSL.invokeMethod(DSL.java:153)
...
_Describe your problem in a meaningful way_:
Builds fail with above stack under 1.5.9.
Rolling back to 1.5.8 fixes the problem
Might be related to: https://github.com/jenkinsci/gitlab-plugin/commit/799e43326530eb7f8cca569774ea2a4504c72a3c
sigh
There is clearly a gap in testing here...
@stchar can you look at this?
@stchar ping?
@omehegan, @crussell52, sorry missed the message notification.
Yep, you right lack of testing. I will fix it asap. Then I will try to add a regression.
@stchar any update on this?
Thanks for lodging issue, just found this and updated Jenkinsfile's to include name: before the Gitlab stage name.
eg:
before: gitlabCommitStatus("Compile") {
after: gitlabCommitStatus(name: "Compile") {
@omehegan, @crussell52
I'm not familiar with stapler. It's definitely issue with usage of @DataBoundConstructor decorator.
Looks like it's behavior depends on jenkins version, hope it doesn't depend on any of pipeline plugin version.
Anyway I'm trying to restore the original constructor which had been here before I submitted my PR https://github.com/jenkinsci/gitlab-plugin/pull/747
@DataBoundConstructor
public GitLabCommitStatusStep(String name){
this.name = StringUtils.isEmpty(name) ? null : name;
}
I'm also setting up different environments to verify the issue on a vary of Jenkins core and pipeline plugin versions.
@stchar thanks for working on it, if you need help with that area of the code (Stapler etc.) I would suggest posting on the https://groups.google.com/forum/#!forum/jenkinsci-dev mailing list.
Hey @stchar! Any progress on this? I am happy to help or test any items that you have started in on or picking up from where you left off.
@killianbrackey, I think the fix is ready,
I tested it with lts versions 2.107, 2.121.2
Only 2.143 or latest left as mentioned in the issue
You can build the plugin with my fix, or take one from the verification job:
https://ci.jenkins.io/job/Plugins/job/gitlab-plugin/job/PR-823/9/artifact/target/gitlab-plugin-1.5.11-SNAPSHOT.hpi
@stchar That's great news! Is there anything we can do to help get it published?
@stchar, thank you for snapshot, works great! Waiting for new release.
@kappacrafter, thanks for assist, and sorry for a delayed fix.
@omehegan @stchar - Any ETA on a release for this?
@crussell52 sorry for the delay, I have not had time to work on the plugin for awhile. I'll test and merge this now if it's all good.
Released in 1.5.11.
Most helpful comment
Released in 1.5.11.