dirk-thomas/vcstool

Jenkins Integration

Closed this issue · 6 comments

We use this tool on our project and are very happy with the simplicity that it brings in managing multiple repositories. We were having some issues integrating with Jenkins though.

Any suggestions on how this can be integrated with Continuous Integration tool (Jenkins).
We could clone all repositories using shell script. Need to figure out a way to trigger build on any commit on the list of repositories.

Thanks for your help on this.

I am not sure I understand what kind of integration you are expecting.

The triggering of builds in Jenkins would be independent from this tool. Jenkins offers plugins to either do that using webhooks from GitHub (or other) repos or by polling for changes in them.

Within the job configuration you can invoke vcs in the same way as you would in the command line during one of the build steps. Optionally you could use some of the environment variables provided by Jenkins to generate a .repos file specific to a job configuration.

I am not sure if that answers your question or if it even goes in the right direction?

This is nothing vcstool can help with - it is just a command line tool.

You will have to configure your Jenkins job separately. I have used the GitHub pull request builder plugin for this in the past. A newer plugin aiming to replace it is the GitHub branch source plugin which might be worth a look.

This is one example how I make use of vcstool in Jenkins to pull a set of repos, switch to a specific branch name in all repos (where available) and merge the branch state with the latest state of the default branch: https://github.com/ros2/ci/blob/d72944c4f7ce588fda2b6306272d38a820d1d206/ros2_batch_job/__main__.py#L542-L566

Assuming my previous comments answered your question I will go ahead and close this ticket. Please feel free to continue commenting.

Thanks @dirk-thomas for your suggestions. This helps.