Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Jenkins Git Publisher, multiple repos and Multiple SCM

We have multiple Git repositories, all required for a single build so we have to use MultiSCM to get source.

I'm hooking it up to Git Publisher, to push a tag after each build, and it works nicely on a test against a single repo, but I can't get it to play nice with MultiSCM. Is it possible?

like image 387
Damien Ryan Avatar asked Aug 22 '14 02:08

Damien Ryan


People also ask

Can I have multiple Git repositories?

With Git, using multiple repositories is the only way to work efficiently. This enables each team to work independently, and do their work faster. You can also make sure that developers only have access to the repositories they need access to (thus making Git more secure.)

Which plugin allows use of Git as a SCM?

Rundeck provides SCM Export and SCM Import providers for Git. This plugin allows Source Code Management of the jobs, versioning, exporting or importing their definitions using a remote Git repository.

How do I add multiple SCMs to Jenkins?

In the SCM section of the Jenkins job configuration screen, choose 'Multiple SCMs'. You'll then see a drop-down list of the available SCM plugins which can be configured similar to the way build steps are configured for a freestyle job. When chosen, each SCM plugin will present its normal set of configuration options.


2 Answers

The short answer is the plugin doesn't support multiple repos (yet). It's much easier to add a final job step that cds into each repo and runs git tag; git push --tags.

like image 142
Damien Ryan Avatar answered Sep 26 '22 19:09

Damien Ryan


I think that you won't be able to publish tags to multiple Git repositories until this bug is fixed: https://issues.jenkins-ci.org/browse/JENKINS-13779. But don't hold your breath. Note that the bug is nearly 4 years old already.

like image 32
Tom Bryan Avatar answered Sep 22 '22 19:09

Tom Bryan