Yes, the pipeline approach I'm suggesting will require that each branch has
a Jenkinsfile, and the contents of that Jenkinsfile must specify which
repositories are used to checkout that pipeline.

I think that is desirable, since I want the source code in the repository
to control the definition of the Jenkins job.

I don't want a pipeline job where the pipeline is defined inside the
Jenkins job.  A pipeline in the Jenkins job is separate from the source
code, and that feels like the wrong direction to me.

Mark Waite

On Wed, Dec 21, 2016 at 12:22 PM Torsten Reinhard <[email protected]>
wrote:

> But than you need the locations (and branches) of the repositories inside
> the Jenkinsfile (or a resource read/parsed from the Jenkinsfile), right?
>
> Something like:
> // checkout repo1 (origin)
> checkout([$class: 'GitSCM', branches: [[name: '*/master']],
> doGenerateSubmoduleConfigurations: false, extensions: [[$class:
> 'RelativeTargetDirectory', relativeTargetDir: 'origin']], gitTool:
> 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId:
> 'Bitbucket_Access', name: 'origin', url:
> 'ssh://[email protected]:7999/path/to/repo1.git']]])
>
> // checkout repo1-config (origin-config)
> checkout([$class: 'GitSCM', branches: [[name: '*/master']],
> doGenerateSubmoduleConfigurations: false, extensions: [[$class:
> 'RelativeTargetDirectory', relativeTargetDir: 'origin-config']], gitTool:
> 'Default', submoduleCfg: [], userRemoteConfigs: [[credentialsId:
> 'Bitbucket_Access', name: 'origin', url:
> 'ssh://[email protected]:7999/path/to/repo1-config.git']]])
>
>
> Compared to just
>
> checkout scm
>
> which will work for multi-branches, the above approach doesnt seem to
> scale or am I missing something?
>
> I would like an approach where both the repo1 and the repo1-config are
> configured in the Pipeline job - and the Jenkinsfile will be more generic
> (without hard coded URL“s inside)
>
> Your thoughts ?
>
> Regards, Torsten
>
>
> --
> 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 [email protected].
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/jenkinsci-users/a692a6fb-a34f-4f14-8354-1cf9387ef98a%40googlegroups.com
> <https://groups.google.com/d/msgid/jenkinsci-users/a692a6fb-a34f-4f14-8354-1cf9387ef98a%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/jenkinsci-users/CAO49JtGkdGJZ2z6UbVT2iuSijN2_Vmc3X%3Dm27x6E%2BOte%3DixmVg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to