ResolveSCM is for the use case where you want to checkout a matching branch
name in another repo... but fallback to other branches of it doesn’t exist.

Eg Apache Maven uses it so that you can add a feature to Core (main git
repo) and add integration tests (side git repo) and test them both in the
same build.

HTH

On Mon 1 Apr 2019 at 21:09, Martin Weber <entenhet...@gmx.de> wrote:

> Am Mittwoch, 27. März 2019, 21:35:44 CEST schrieb Mark Waite:
> > On Wed, Mar 27, 2019 at 2:02 PM Martin Weber <entenhet...@gmx.de> wrote:
> > > 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)
> >
> > I think you may find it easier to use checkout without using resolveScm.
> > Can you help me understand why you chose to use resolveScm?
>
> D. Beck suggested that earlier in this thread.
>
> >
> > See the following examples for multiple checkouts in a single
> Jenkinsfile.
> >
> >
> https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-43198/Jenkinsfile
> >
> https://github.com/MarkEWaite/jenkins-bugs/blob/JENKINS-47874/Jenkinsfile
>
> Hmmh, do these examples really monitor different SCMs for changes and
> trigger
> a build?
>
> Anyway, thanks for your response.
>
> 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/32380527.vBj4gx0osB%40linux
> .
> For more options, visit https://groups.google.com/d/optout.
>
-- 
Sent from my phone

-- 
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/CA%2BnPnMwkb75c82j62xs7aO7nMsfXdrahJRCAQy9vq41BPqcOxA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to