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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to