fix(pipeline): update SourceFetcher to use dynamic git credentials ID
Signed-off-by: 孙振宇 <>
This commit is contained in:
parent
aad8742710
commit
044f96d525
@ -19,7 +19,7 @@ class SourceFetcher {
|
|||||||
steps.env.workroot = "${steps.env.WORKSPACE}/devops-workspace/${configurations.serviceName}"
|
steps.env.workroot = "${steps.env.WORKSPACE}/devops-workspace/${configurations.serviceName}"
|
||||||
|
|
||||||
steps.dir(steps.env.workroot) {
|
steps.dir(steps.env.workroot) {
|
||||||
steps.git branch: configurations.serviceGitBranch, credentialsId: 'git-bot-credentials', url: configurations.serviceGitRepo
|
steps.git branch: configurations.serviceGitBranch, credentialsId: configurations.serviceGitCredentialsId, url: configurations.serviceGitRepo
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
3
first-class-pipeline/tests/Jenkinsfile
vendored
3
first-class-pipeline/tests/Jenkinsfile
vendored
@ -13,6 +13,9 @@ executeFreeleapsPipeline {
|
|||||||
// monorepo: all services codes are in the same repo and using sub-folders to separate them
|
// monorepo: all services codes are in the same repo and using sub-folders to separate them
|
||||||
// separated: each service has its own repo
|
// separated: each service has its own repo
|
||||||
serviceGitRepoType = 'monorepo' // monorepo, separated
|
serviceGitRepoType = 'monorepo' // monorepo, separated
|
||||||
|
// serviceGitCredentialsId used to specify the git credentials id of the service codes
|
||||||
|
// the credentials should be stored in Jenkins
|
||||||
|
serviceGitCredentialsId = 'gitops-mvp-app-azure-devops'
|
||||||
// executeMode used to specify the pipeline execution mode
|
// executeMode used to specify the pipeline execution mode
|
||||||
// on-demand: the pipeline will be triggered with code changes, only changed components will be executed
|
// on-demand: the pipeline will be triggered with code changes, only changed components will be executed
|
||||||
// fully: the pipeline will be triggered without code changes, all components will be executed
|
// fully: the pipeline will be triggered without code changes, all components will be executed
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user