ghale / gradle-jenkins-plugin

Gradle plugin to programmatically configure Jenkins jobs.
123 stars 42 forks source link

update to job-dsl-plugin 1.44+ (or provide hacking instructions?) #77

Closed philbert closed 7 years ago

philbert commented 8 years ago

Working my way up the groovy learning curve, I discovered that the cause of this error: > No signature of method: javaposse.jobdsl.dsl.helpers.WorkflowDefinitionContext.cpsScm() is applicable for argument types

Is due to the method only being added in 1.44 of the jenkins-job-dsl: https://jenkinsci.github.io/job-dsl-plugin/#path/workflowJob-definition-cpsScm

Whereas the gradle-jenkins-plugin only supports 1.43 currently. Do you have any estimate which you'll support the latest? Or alternative provide some hacking instructions so I could fix the issue myself, and I'd be happy to submit a PR back to you.

philbert commented 8 years ago

So I'm trying to update to job-dsl-plugin 1.44 and I've run into what looks like a pretty major issue because of this change.

It looks like some weird stuff in MapJobManagement.groovy kind of worked around this issue in job-dsl-plugin 1.43, however tying to clean that code up leaves me with 108 broken test cases. That branch is here.

However I discovered by accident a workaround that leaves the original weird stuff in place, that leaves me with only 1 broken test case. That branch is here.

So the proper fix looks like a big job that I'm not sure I'm up for, as I'm new to groovy and gradle. Can you give me any advice on how to proceed?

philbert commented 8 years ago

FYI, I managed to get my custom build of the gradle-jenkins-plugin working in my local environment and confirmed that my original error has disappeared and that I'm creating the pipeline jobs as I expect to with the correct configuration.