Am Dienstag, 13. November 2018, 20:40:41 CET schrieb Jesse Glick:
> On Sat, Nov 10, 2018 at 12:12 PM Martin Weber <entenhet...@gmx.de> wrote:
> > Pipeline offers a *different* way of checking out multiple
> > SCMs. With the same branch seen in several SCMs, Pipeline only checks out
> > the branch from the *first SCM* only.
> > 
> > In contrast, Multiple SCMs Plugin checks out a branch from *each SCM* in
> > parallel.
> 
> Daniel’s response, as well as the phrasing of the initial question,
> are mixing up two very different things: multibranch projects and
> plain projects. `multiple-scms` addresses a limitation in plain
> (freestyle) projects that you could not have multiple SCM checkouts in
> your workspace. This is trivially addressed in (plain) Pipeline
> projects simply by doing something like
> 
> dir('first-repo') {
>   git 'http://git/first-repo'
> }
> dir('second-repo') {
>   git 'http://git/second-repo'
> }

Thanks, finally I got it working!
Just for the records; here is what I did (The documentation of resolveScm is 
not very helpful and the snippet generator does not help much here)

checkout scm
dir('client_automation/src/shared') {
checkout resolveScm( source: [$class: 'GitSCMSource',
    credentialsId: 'JenkinsGitCheckout',
    excludes: '',
    traits: [
        [$class: 'jenkins.plugins.git.traits.CloneOptionTrait', depth:
0, noTags: true, reference: '', shallow: true],
        [$class: 'jenkins.plugins.git.traits.BranchDiscoveryTrait']],
    gitTool: 'InSearchPath', id: '_',
//    ignoreOnPushNotifications: false,
    includes: '',
    remote:
'ssh://g...@example.com/develop/tessy-ite--automation-shared.git'
    ],
    targets: [BRANCH_NAME]
    )
   }

But one question remains: Is it possible with resolveScm to poll multiple 
repositories for changes and trigger a job?

> In other words, you may run the `checkout` step (or sugar like the
> `git` step) one time, zero times, a hundred times, with whatever

A plain `git` step does not work, it lacks the BranchDiscoveryTrait.

Martin

-- 
E-Mails sollten Text sein, Text und nur Text.
Wenn Gott gewollt hätte, dass E-Mails in HTML geschrieben würden,
endeten Gebete traditionell mit </amen>.


-- 
You received this message because you are subscribed to the Google Groups 
"Jenkins Developers" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to jenkinsci-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-dev/4238774.buQomSH1gE%40linux.
For more options, visit https://groups.google.com/d/optout.

Reply via email to