Commit 2bc75d0f authored by daidekun's avatar daidekun

优化gitrepo参数

parent b7d390a3
...@@ -48,10 +48,19 @@ def prepare_python(contextDir) { ...@@ -48,10 +48,19 @@ def prepare_python(contextDir) {
sh "cp -rf /home/quant_group/qg-dockerfiles/templates/python ${contextDir}" sh "cp -rf /home/quant_group/qg-dockerfiles/templates/python ${contextDir}"
} }
def checkout(branchNames, gitRepo) { def checkout(branchNames, systemNames) {
arrBranchName = branchNames.split(",") arrBranchName = branchNames.split("--")
arrSystemName = systemNames.split("--")
i = 0
for (branchName in arrBranchName) { for (branchName in arrBranchName) {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@git.quantgroup.cn:${gitRepo}.git" response = httpRequest "http://192.168.4.3:10088/config_server/get_node_command/${systemNames}"
def res_json = jsonParse(response.content)
def gitGroup = res_json["gitGroup"]
git branch: arrBranchName[i], credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@git.quantgroup.cn:${gitGroup}/${systemName}.git"
i = i + 1
} }
} }
......
...@@ -11,9 +11,9 @@ def call(body) { ...@@ -11,9 +11,9 @@ def call(body) {
def isDeploy = env.IS_DEPLOY def isDeploy = env.IS_DEPLOY
def buildNumber = env.BUILD_NUMBER def buildNumber = env.BUILD_NUMBER
t = gitRepo.split("/") /* t = gitRepo.split("/")
def gitGroup = t[0] def gitGroup = t[0]*/
def originSystemName = t[1] def originSystemName = gitRepo
def systemName = originSystemName.toLowerCase() def systemName = originSystemName.toLowerCase()
def harborGroup = "library" def harborGroup = "library"
...@@ -66,7 +66,7 @@ def call(body) { ...@@ -66,7 +66,7 @@ def call(body) {
} }
} }
stage('Build') { stage('Build') {8
_utils.beautyEcho(4, 'Build') _utils.beautyEcho(4, 'Build')
switch (config.buildType) { switch (config.buildType) {
case "java": case "java":
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment