Status: Open (View Workflow)
On "master" task, no problem, jenkins checkout good repo and branch.
But on "slave" tasks, It checkout the same branch for all scm (git in my case).
- create a multiconfiguration project
- Add 2 scm git
- 1 for repo/branch A (on / by default, or on dir "A", irrelevant)
- 2 for repo/branch B and put it on dir "B"
- add configuration matrix, with one axis that can take multiple values
On slave the folders structure gets created correctly, but the second one is empty.
When checking the console output, the "master" task clones and checks out the two repos correctly (different revision numbers (long string, probably a hash) for each of the 2 repos).
Each of the "slave" tasks defined by the configuration matrix, will try to fetch and checkout the same revision number for both repos, and therefore will fail on the second one.
The Jenkins Pipeline provides this facility in a more flexible, reliable, and supportable way. Rather than using a matrix configuration job, use:
If there is some critical reason that you cannot use Declarative Pipeline, then use:
Declarative Pipeline should be the first path because it intentionally limits the types of mistakes that a new user can make. It is the second generation of Jenkins Pipeline domain specific language. It uses what was learned from the first generation language (scripted) to intentionally reduce user mistakes.
Declarative Pipeline jobs can be defined graphically with Jenkins Blue Ocean. See the Jenkins Minute series for brief clips that illustrate Pipeline editing with Blue Ocean:
- Jenkins Minute Videos (9 of them)
If you prefer a longer session, you could view:
Hi kohsuke any progress on this?