0

Say we have a Java project with subprojects like

  • persistence
  • businessA
  • businessB
  • web

where everything depends on persistence and web depends on both business subprojects.

We use git and feature branches.

We use jenkins with pipelines and jenkins' multibranch feature to build and test those feature branches every time there is a push to the central repo.

The problem is that the codebase is rather large and running tests needs 1+ hour overall. It would be great if the the pipeline would only execute tests of the subprojects that changed (and its dependents) in respect to develop branch. Gradle can do incremental builds but when jenkins creates a workspace for a feature branch gradle needs to do a full build. (e.g. a new feature branch changes code in web subproject only and there is no need to run all tests on the other 3 subprojects)

So how do we avoid a full build (especially running all tests) on a new feature branch in a Jenkins multibranch pipeline?

torek
  • 448,244
  • 59
  • 642
  • 775
erik
  • 253
  • 2
  • 11

1 Answers1

0

I now use gradle remote cache because that it is what I want.

I just needed to write a small tool to remove old cache entries.

erik
  • 253
  • 2
  • 11