Commit c7c9c25f authored by wentao.suo's avatar wentao.suo

fix

parent 0de722b0
......@@ -362,6 +362,8 @@ def getDocketPackageImage(buildType,buildEnv){
def check_and_build(buildType,systemName,branchName,contextDir){
def buildEnv =""
switch(buildType){
case "java":
......@@ -383,22 +385,33 @@ def check_and_build(buildType,systemName,branchName,contextDir){
def pacegeDockerInfo = getDocketPackageImage(buildType,buildEnv)
if (systemName =="di-ting-ui"){
cpb(buildType,systemName,branchName,contextDir)
return
}
docker.image(pacegeDockerInfo["image"]).inside(pacegeDockerInfo["args"]){
/*checkout code*/
stage('Checkout') {
checkout(buildType, systemName, branchName)
}
/*prepare config*/
stage('Prepare') {
prepare_config(buildType, systemName, contextDir)
}
/*build*/
stage('Build'){
build(buildType, systemName, contextDir)
}
cpb(buildType,systemName,branchName,contextDir)
}
}
def cpb(buildType,systemName,branchName,contextDir){
/*checkout code*/
stage('Checkout') {
checkout(buildType, systemName, branchName)
}
/*prepare config*/
stage('Prepare') {
prepare_config(buildType, systemName, contextDir)
}
/*build*/
stage('Build'){
build(buildType, systemName, contextDir)
}
}
def dockerbuild_and_push(imageTagInfo,buildNumber,systemName,branchName,cluster,timeStemp,contextDir){
......
......@@ -50,8 +50,13 @@ def call(body) {
/* 2 */
echo originSystemName
if(originSystemName =="di-ting-ui"){
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) {
_utils.beautyEcho("checkout & build < ${originSystemName} : ${originBranchName} >", "stage")
for(def i = 0; i<systemNames.length; i++){
dir(systemNames[i]){
_stage.check_and_build(config.buildType, systemNames[i], branchNames[i], contextDir)
......@@ -60,25 +65,10 @@ def call(body) {
}
_utils.beautyEcho("build over", "info")
} else {
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) {
_utils.beautyEcho("checkout & build < ${originSystemName} : ${originBranchName} >", "stage")
for(def i = 0; i<systemNames.length; i++){
dir(systemNames[i]){
_stage.check_and_build(config.buildType, systemNames[i], branchNames[i], contextDir)
}
}
_utils.beautyEcho("build over", "info")
}
}
/* 3 */
withDockerServer([uri: "tcp://192.168.4.96:2375/"]) {
......
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