Prevention of publishing artifacts that have no changes


(Phil Swenson) #1

We have a problem with every team publishing milestones on a nightly basis even if nothing has changed. We have many teams with many projects scattered throughout the world. They all kick off a build every night and publish milestones.

I originally had thought they should simply set up jenkins to only run the nightly milestone build if code had changed. However this isn’t good enough. It’s possible that a dependency might have changed and this may cause the manifest (OSGi) to change even though source code is identical. In this case we’d still want to publish.

My second idea was to write a plugin that downloaded the previous version of the artifact and see if there are any class file changes and any significant manifest changes (timestamps and version labels on the jar are not significant).

I was told about this experimental feature in gradle: http://www.gradle.org/docs/current/userguide/comparing_builds.html

would this address my issue?

thanks


(René Groeschke) #2

Hello Phil, the incubating “comparing build” feature is a more a feature for bulid admins doing refactorings, updating their gradle versions, etc.

one simple workaround might be to add some logic in the onlyIf closure of your upload task. there you can add some logic to check if sources or the osgi descriptor has changed.


(Peter Walker) #3

Hi Phil,

Gradle has a flexible versioning scheme, so you are constrained to a basic SNAPSHOT/Release system. Therefore, it might be possible to solve this by addressing the publishing process, rather than trying to reduce the impact of the publishing process.

This is easier to discuss in person, so please contact me if you want to explore further. Regards, Peter Walker COO Gradleware Inc. peter.walker@gradleware.com http://www.gradleware.com/team#peter-walker http://www.linkedin.com/in/peterbwalker Phone: 914 418 4010