我有四个不同的项目(或存储库)。我想创建一个从不同存储库中提取代码的管道(也存在从特定存储库中选择分支的情况)。拉出代码后,我想运行这些项目的docker图像
pipeline {
agent any
parameters {
gitParameter branchFilter: 'origin.*/(.*)', defaultValue:'master',name: 'BRANCH_CORE', type: 'PT_BRANCH'
gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_STATS', type: 'PT_BRANCH'
gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_NOTIFICATION', type: 'PT_BRANCH'
gitParameter branchFilter: 'origin.*/(.*)', defaultValue: 'master', name: 'BRANCH_SESSION', type: 'PT_BRANCH'
}
stages
{
stage('SCM Checkout Core')
{
steps
{
git branch: "${params.BRANCH_CORE}", url: 'URL of core repo'
}
}
stage('SCM Checkout Stats')
{
steps
{
git branch: "${params.BRANCH_STATS}", url: 'URL of stats repo'
}
}
stage('SCM Checkout Notification')
{
steps {
git branch: "${params.BRANCH_NOTIFICATION}",url: 'URL of notification repo '
}
}
stage('SCM Checkout Session') {
steps {
git branch: "${params.BRANCH_SESSION}",url: 'URL of session repo '
}
}
}
}
我期望有一个目录,我可以在其中获得多个项目目录(根据我们选择的代码分支)