Commit 72ba510e authored by daidekun's avatar daidekun

checkout bugs

parent 8ccd3c85
......@@ -46,12 +46,18 @@ def prepare_python(contextDir) {
sh "cd /home/quant_group/qg-dockerfiles/templates/python; git pull; cd -"
sh "cp -rf /home/quant_group/qg-dockerfiles/templates/python ${contextDir}"
}
/*
def checkout(branchName, gitRepo) {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@git.quantgroup.cn:${gitRepo}.git"
}*/
def checkout(branchName, gitRepo) {
echo "git remote site is:"
if (gitRepo in ["QG/di-ting"]) {
echo "git@gitabc.xyqb.com:${gitRepo}.git"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@gitabc.xyqb.com:${gitRepo}.git"
}else {
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@git.quantgroup.cn:${gitRepo}.git"
}
}
def checkoutLuaUI(branchName, gitRepo) {
if(gitRepo.contains("--")){
t1 = gitRepo.split("/")
groups = t1[0].split("--")
......@@ -70,7 +76,7 @@ def checkout(branchName, gitRepo) {
dir (project) {
echo "git remote site is:"
if (gitRepo in ["QG/di-ting-ui","QG/di-ting"]) {
if (gitRepo in ["QG/di-ting-ui"]) {
echo "git@gitabc.xyqb.com:${gitRepo}.git"
git branch: branchName, credentialsId: 'e1ccb1ac-1282-4fb4-b766-530ca1a2a2db', url: "git@gitabc.xyqb.com:${gitRepo}.git"
}else {
......@@ -81,9 +87,7 @@ def checkout(branchName, gitRepo) {
}
def build_java(namespace, systemName, contextDir) {
dir (systemName) {
sh '/usr/share/maven/bin/mvn clean package -P test -D maven.test.skip=true'
}
sh '/usr/share/maven/bin/mvn clean package -P test -D maven.test.skip=true'
}
def copy_files_java(systemName, contextDir) {
......
......@@ -38,7 +38,14 @@ def call(body) {
stage('Checkout') {
_utils.beautyEcho(2, 'Checkout')
_stage.checkout(branchName, gitRepo)
switch (config.buildType) {
case "lua-ui":
_stage.checkoutLuaUI(branchName, gitRepo)
break
default:
_stage.checkout(branchName, gitRepo)
break
}
}
stage('Prepare') {
......@@ -48,9 +55,6 @@ def call(body) {
case "java":
_stage.prepare_java(systemName, contextDir)
break
/* case "ui":
_stage.prepare_ui(systemName, contextDir)
break*/
case "nodejs":
_stage.prepare_nodejs(systemName, contextDir)
break
......@@ -71,10 +75,7 @@ def call(body) {
switch (config.buildType) {
case "java":
_stage.build_java(namespace, originSystemName, contextDir)
break
/* case "ui":
_stage.build_ui(namespace, originSystemName, contextDir, gitRepo, branchName, workspace)
break*/
break
case "nodejs":
_stage.build_nodejs(namespace, originSystemName, contextDir, gitRepo, branchName, workspace)
break
......
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