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

fix

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