Creation of a multi-project Gradle on Jenkins

I have a Gradle multiplexer hosted in a Mercurial repository. I would like to configure my Jenkins so that if I make changes to only one subproject, then only this subproject will be created and published in my Nexus repo.

Can someone give me a hint? Or is it even possible?

+5
jenkins gradle
source share
3 answers

Leave our final decision for the future here.

We created a separate Jenkins task for each subproject. Jenkins Mercurial plugin allows you to specify "modules":

Reduce unnecessary assemblies by listing the "modules" in the "repository", separated by commas or spaces. A module is the name of the directory in the repository in which this project lives. If this field is set, changes outside the specified modules will not initiate the assembly (even if the entire repository is checked in any case due to the Mercurial restriction).

Thus, our tasks are launched only when changes have occurred in the sub-monitoring project.

0
source share

We kind of work.

We create a project in Jenkins for each gradle subproject. And in the Jenkins configuration, we only build a subproject, doing something like:

gradle clean :<subproject>:build 

We still have a problem that the task runs for all checks for the entire project. I would like to configure Jenkins to build only if there is a checkin in the subproject, but I don't know how to specify it.

+2
source share

I think you need to create a project in jenkins for each subproject.

Another option would be to find if there is a way to intercept repo synchronization and see which subproject has changed, and do it dynamically dynamically.

0
source share

All Articles