khmarbaise / incremental-module-builder

Incremental Module Builder
https://khmarbaise.github.io/incremental-module-builder/
Apache License 2.0
41 stars 9 forks source link

[Feature] Compute changes from a given revision/commit instead of using local changes #6

Open jakub-bochenski opened 7 years ago

jakub-bochenski commented 7 years ago

Should be useful for CI systems.

There is already an "Incremental Builds" option in Jenkins Maven Integration Plugin, but it doesn't work too well.

khmarbaise commented 7 years ago

What do you mean by it doesn't work too well?

jakub-bochenski commented 7 years ago

For one it doesn't allow any control -- it always takes changes since last build, so you have to do a full build if there is a failure. Also you have to manually detect the above and force a full build in a roundabout way.

Most importantly though it requires the use of Maven Project type, which has a lot of bugs and incompatibilities

howama commented 7 years ago

This would be very useful if it automatically picked the revision to compute changes from. My use case is doing a build after pulling changes made by other people. Ideally the incremental plugin would be able to work out if there are changes in the history since the last build of the module. (e.g. comparing artifact timestamps with those from the git history)

famod commented 6 years ago

I have hacked a solution for definining a revision and I am about to create a PR for this.

@khmarbaise For this I would like to introduce a system property incremental.startRev. WDYT?

@howama Nice idea! IMHO you should create a separate ticket for that as it goes well beyond the explicit definition of a revision by the user.

jakub-bochenski commented 6 years ago

https://github.com/vackosar/gitflow-incremental-builder already handles this

famod commented 6 years ago

@jakub-bochenski Thanks for the pointer! Unfortunately gitflow-incremental-builder needs an excessive amount of time to calculate the reactor in case a file is changed in the root project of a large project with many modules (with dependencies between those modules). I will file an issue for that but as long as this isn't fixed gitflow-incremental-builder is not a viable alternative.

Edit: Issue reported: https://github.com/vackosar/gitflow-incremental-builder/issues/25

jakub-bochenski commented 6 years ago

@famod please do file a report. I've heard about this problem from some of my colleagues but was never able to replicate it

famod commented 6 years ago

PR #16 sent, chose a shorter name for the property: imb.startRev (imb for incremental-module-builder).