|
@@ -14,16 +14,17 @@ 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 < projectList.length ; i++) {
|
|
|
+ for (int i = 0; i < sharev2list.size ; i++) {
|
|
|
echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
|
- if ("${projectList[i]}" == "${sharev2list}") {
|
|
|
- sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/share-v2/${projectList[i]}/Dockerfile ${jenkins_home}/share-v2/${projectList[i]}"
|
|
|
+ for (int j = 0 ; j <projectList.length ; j++)
|
|
|
+ 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[i]}" == "${logonsvrlist}") {
|
|
|
- sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/logonsvr/${projectList[i]}/Dockerfile ${jenkins_home}/logonsvr/${projectList[i]}"
|
|
|
+ } 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[i]}:${release} -f ${jenkins_home}/${projectList[i]}/Dockerfile ${jenkins_home}/${projectList[i]}"
|
|
|
+ sh "docker build -t ${xy_image}/${projectList[j]}:${release} -f ${jenkins_home}/${projectList[j]}/Dockerfile ${jenkins_home}/${projectList[j]}"
|
|
|
}
|
|
|
|
|
|
}
|