Question

Is there a way to make Jenkins polling feature detect that a change has occurred in a sub repo, even when that change has not yet been committed to the parent repo?

Realistically I expect that I'm looking for a plugin that will do a pull -u on any sub-repos, then commit and push that change to the parent before starting the build. I can't see anything like that in the official plugin lists, and am considering building a custom plugin to support it.

Was it helpful?

Solution

This can be accomplished by creating jobs for the sub repositories and polling them for changes. Then setup a build step in the sub repo jobs that will execute a script/batch file to automatically 'promote' the sub repo within the parent. After that you have a couple choices, have your dependent project poll the parent repo waiting for this 'promotion' changeset, or you could make a post build step in your sub repo jobs to kick off the desired build.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top