gradle-info-plugin icon indicating copy to clipboard operation
gradle-info-plugin copied to clipboard

info-ci: Ability to plug in custom CI info providers

Open boxheed opened this issue 10 years ago • 5 comments

It would be good to be able to plug in other ContinuousIntegrationInfoProvider implementations in order to use this plugin on other CI servers such as Travis, Bamboo or Drone.io.

The implementation uses the ServiceLoader to discover the ContinuousIntegrationInfoProvider implementations. This allows others to provide implementations for other CI servers that are not provided within the gradle-info-plugin itself.

boxheed avatar Feb 24 '15 22:02 boxheed

Thanks for the pull request. We are going to have a look at it soon.

bmuschko avatar Mar 07 '15 12:03 bmuschko

Cool addition. My biggest worry is what Gradle can and will do to the classpath available between plugins. E.g. in the future I'm not sure we're guaranteed to have access to other jar/plugins in the buildscript classpath.

I'd rather see this plugin know about all sorts of systems in a "cheap" way, then dynamically load up configurations with the appropriate jars to execute. From a user's point of view, they shouldn't need to know what other providers to add. But then again, I can see the Enterprise side of things, where they might want to configure their own providers internally behind the scenes.

quidryan avatar May 06 '15 16:05 quidryan

I agree with you. I have used the Java Service Loader in some of my other plugins and whilst it works fine when using it in the older syntax by including it on the build script classpath and then applying the plugin, it doesn't work using the newer style plugins syntax, so from this perspective I couldn't recommend applying this pull request in the state that it is in.

I have however taken the an alternative approach to extending the CI providers in one of my own plugins here:https://github.com/boxheed/gradle-extended-info-plugin which has implementations for a number of the CI providers.

boxheed avatar May 06 '15 20:05 boxheed

Accidental slip with the mouse.

boxheed avatar May 06 '15 20:05 boxheed

Do you have any ideas on how to approach making CI providers pluggable, other than I have done in my own extension to your plugin?

boxheed avatar May 06 '15 20:05 boxheed