ghale / gradle-jenkins-plugin

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

Bump JobDSL to 1.50 #83

Closed realdadfish closed 7 years ago

realdadfish commented 7 years ago

I've pulled in the patch from @philbert and updated upon his changes to 1.50.

Unit tests ran through with 100% success, however, I don't know how I can fix the integration tests, I always see

java.lang.NullPointerException: Cannot invoke method replaceAll() on null object
    at com.terrafolio.gradle.plugins.jenkins.integTest.AbstractJenkinsIntegrationTest.setup(AbstractJenkinsIntegrationTest.groovy:15)

and I have no idea how I can give it the needed jenkins.plugin property. My naive attempt to use

gradle check -Djenkins.plugin=build/libs/gradle-jenkins-plugin-1.3.3.jar

failed obviously.

philbert commented 7 years ago

Your build failed on the on the nebula.lint plugin. You can remove that from the build.gradle. I added it but never got it to work.

> Failed to apply plugin [id 'nebula.lint']
   > Could not generate a proxy class for class com.netflix.nebula.lint.plugin.LintGradleTask.

There is still some hope to revive this plugin. I'm leading a project in a large company where this plugin is used to create jenkins jobs, but using Jenkins 2.

The integration tests rely on jenkins 1 and testing against jenkins 2 fails because 1 was open by default and 2 is locked down, so the jenkins plugin thinks that jenkins never starts, when it's actually waiting for the security token to be entered.

I'm starting to get pretty good a writing jenkins plugins so I might get around to fixing this but it depends on a few things.

realdadfish commented 7 years ago

Hrm... haven't seen this when I used a system-provided Gradle version while building this plugin (I have 2.14 installed on my local machine, the wrapper is at 2.11). I guess if one bumps the wrapper the nebula plugin might as well start to work, but I removed it for now anyways.

ghale commented 7 years ago

Thanks for the PR - I've merged this work separately and further updated to job-dsl-core 1.53. Sorry for the long delay.