|
@@ -14,20 +14,19 @@ ansiColor('xterm') {
|
|
|
checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${git_auth}", url: "${git_url}"]]])
|
|
|
}
|
|
|
stage('build images') {
|
|
|
- for (int i = 0; i < sharev2list.size() ; i++) {
|
|
|
-
|
|
|
- for (int j = 0 ; j <projectList.length ; j++)
|
|
|
- echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
|
- if ("${projectList[j]}" == "${sharev2list[i]}") {
|
|
|
- sh "docker build -t ${xy_image}/${projectList[j]}:${release} -f ${jenkins_home}/share-v2/${projectList[j]}/Dockerfile ${jenkins_home}/share-v2/${projectList[j]}"
|
|
|
- echo "11111111111111111111111111"
|
|
|
- } else if ("${projectList[j]}" == "${sharev2list[i]}") {
|
|
|
- sh "docker build -t ${xy_image}/${projectList[j]}:${release} -f ${jenkins_home}/logonsvr/${projectList[j]}/Dockerfile ${jenkins_home}/logonsvr/${projectList[j]}"
|
|
|
- } else {
|
|
|
- echo "222222222222"
|
|
|
- sh "docker build -t ${xy_image}/${projectList[j]}:${release} -f ${jenkins_home}/${projectList[j]}/Dockerfile ${jenkins_home}/${projectList[j]}"
|
|
|
+ for (int i = 0; i < projectList.length ; i++) {
|
|
|
+ for (int j = 0 ; j < sharev2list.size() ; j++) {
|
|
|
+ echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
|
+ if ("${projectList[i]}" == "${sharev2list[j]}") {
|
|
|
+ sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/share-v2/${projectList[i]}/Dockerfile ${jenkins_home}/share-v2/${projectList[i]}"
|
|
|
+ echo "11111111111111111111111111"
|
|
|
+ } else if ("${projectList[j]}" == "${sharev2list[i]}") {
|
|
|
+ sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/logonsvr/${projectList[i]}/Dockerfile ${jenkins_home}/logonsvr/${projectList[i]}"
|
|
|
+ } else {
|
|
|
+ echo "222222222222"
|
|
|
+ sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/${projectList[i]}/Dockerfile ${jenkins_home}/${projectList[i]}"
|
|
|
+ }
|
|
|
}
|
|
|
-
|
|
|
}
|
|
|
}
|
|
|
}
|