Multiple repository and git parameter plugin

2,221 views
Skip to first unread message

Tony Martinet

unread,
Aug 25, 2017, 5:33:45 AM8/25/17
to Jenkins Users
Hi,

I'm new to jenkins and trying to setup CI for our embedded projects.

Some of our projects have multiple repository for things such as SDK, Library, and the actual firmware

They are in a directory as the following : 

workspace
└───SDK
     ───CompanyFolder
         ├───Library
         │   ───.git
         ───App
             ├───Firmware2
             │   ───.git
             ───Firmware1
                 ───.git
     └───.git

From what i understood, to manage different repository like this and checkout in a particular order, we should use pipeline.
I was thinking of using one pipeline for each firmware, that checkout SDK, Library, and the actual firmware.

What we want is when developpers are working in a feature, the can build a firmware with branch parameters on all 3 repository.
In order to that, we did :
  • Install git parameters plugin
  • Set up multiple repository in the pipeline configuration
  • Set up 3 git parameters with "Use repository" filter to each repository url

Then when we try to build from parameters, we end up with "!Not git repository configured in SCM configuration" on 2 of the 3 git parameters.
If i left the "Use repository" field blank, i have the branch from the same repository on all 3 git parameters.

Maybe i don't have the right approach and i shouldn't use those feature to achieve what i want.

Can you guys help to solve my issue or point me in the right direction ?

Regards,

Tony
git_parameter.png
scm_configuration.png
build_from_parameters.png

Mark Waite

unread,
Aug 25, 2017, 7:27:29 AM8/25/17
to Jenkins Users
You might consider running all the configurations in parallel from a single pipeline script, rather than prompting the user for their choice of branch.  You might create a single Jenkinsfile on the branch where the developer is working, then start the different configurations in parallel within that Jenkinsfile.

That would give the developers direct control (by editing the Jenkinsfile) of the configurations they evaluate, and would give reasonable defaults (evaluate all the important combinations).

The continuous integration builds for Jenkins plugins (hosted on ci.jenkins.io) do that currently.  They run 4 concurrent configurations.  Two of the configurations run on windows, two on linux.  Two of the configurations evaluate the plugin inside the default Jenkins version, two of the configurations evaluate the plugin in a non-default Jenkins version.

Mark Waite

--
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 jenkinsci-use...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jenkinsci-users/259df69f-30f5-4b1a-8e22-bc9ae4cfec19%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Tony Martinet

unread,
Sep 11, 2017, 5:58:59 AM9/11/17
to Jenkins Users
Hi,

Thanks for your answer Mark, and sorry for the delay of mine.
I played with the pipeline script, and it's a nice solution, but i feel it doesn't suit my need completely.

I want to be able to build a firmware with new libraries or SDK without creating a branch on the FW. I think with pipeline script, i need to create a branch on my firmware even if i don't intend to change something in it, just to have an updated pipeline script.

From the screenshot i posted, is this a bug from git parameter plugin ?

Regards,

Tony

Mark Waite

unread,
Sep 11, 2017, 9:58:27 AM9/11/17
to Jenkins Users
I don't know if the git parameter plugin should handle that use case or not.  It is unexpected (to me) that it behaves differently on subsequent repositories than it does on the first repository.

I wonder if you want multiple SCM's, each with a single repository, rather than a single SCM with multiple repositories beneath it.

Mark Waite

Reply all
Reply to author
Forward
0 new messages