Is there anyway I can create a two module projects in gradle, and trigger a build for each module by itself?
Root project 'Example'
Jenkinsfile
\--- Project ':SubProject'
Jenkinsfile
I want that jenkins will trigger a build only in the module that has been changed.
for example :
If my SubProject
changed, then only SubProject
will execute it's own Jenkinsfile
.
I looked up for this option for a very long time...
As you can see in the other questions, there is no any easy way to achieve that.
Is there any Jenkins pipeline
or plugin
that can deal with that?
./gradlew :build
./gradlew :SubProject:build
However, the triggering of one project only will most likely be the tricky thing as they most likely live in the same source control location.
Maybe the easy fix is also to have them decoupled, using svn:externals
or Git submodules.
Use excludedRegions
to exclude folders/files that would trigger a build.
https://jenkins.io/doc/pipeline/steps/workflow-scm-step/
I'm unsure about the support of JenkinsFile...
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.