I need some help brainstorming a solution for multiproject repositories.
Pipeline building a repository that contains several delivery projects.
The root of the repository contains several delivery projects.
- delivery-project
- delivery1
- CMakeList.txt
- delivery-project-delivery1.spec
- src
- delivery2
- CMakeList.txt
- delivery-project-delivery2.spec
- delivery3
- CMakeList.txt
- delivery-project-delivery3.spec
- src
I could keep one Jenkinsfile on the root. Then iterate through all
directories and build each delivery.
However when there is an SCM change in only one of the deliveries I only
want that one to be built.
This could be solved if I could determine which directory has been changed.
Something like this (ignore closure which doesn't work in Pipeline):
changedDirectories.each { directory ->
dir(directory) {
doBuild()
}
}
Though I'm not sure how to get the SCM changes to determine this.
Considering this delivery git repository will only have a master branch, a
Multibranch Pipeline project is not necessary, and a standard Pipeline job
would suffice.
I could also create a Folder job for delivery-project, and one Pipeline job
for each delivery. Each subproject could contain its own Jenkinsfile which
would be specified in the configuration in Script Path as
delivery1/Jenkinsfile. However when a new delivery project is added to the
repository it would require me to manually add a new Pipeline job for it.
--
You received this message because you are subscribed to the Google Groups
"Jenkins Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
To view this discussion on the web visit
https://groups.google.com/d/msgid/jenkinsci-users/d231ce64-7b7c-467c-8567-caae0f0ae90f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.