fix(pipeline): update SourceFetcher to use dynamic git credentials ID

Signed-off-by: 孙振宇 <>
This commit is contained in:
孙振宇 2025-02-07 15:44:52 +08:00
parent aad8742710
commit 044f96d525
2 changed files with 4 additions and 1 deletions

View File

@ -19,7 +19,7 @@ class SourceFetcher {
steps.env.workroot = "${steps.env.WORKSPACE}/devops-workspace/${configurations.serviceName}"
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
}
}
}

View File

@ -13,6 +13,9 @@ executeFreeleapsPipeline {
// monorepo: all services codes are in the same repo and using sub-folders to separate them
// separated: each service has its own repo
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
// 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