|
@@ -4,7 +4,7 @@ def jenkins_home="/var/jenkins_home/workspace/k8s"
|
|
def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue-jenkins"
|
|
def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue-jenkins"
|
|
def release="${BUILD_NUMBER}"
|
|
def release="${BUILD_NUMBER}"
|
|
def projectList = project_name.split(",")
|
|
def projectList = project_name.split(",")
|
|
-def list2 = "{'mchsrv','sharebms2'}"
|
|
|
|
|
|
+def list2 = ['mchsrv','sharebms2']
|
|
|
|
|
|
|
|
|
|
ansiColor('xterm') {
|
|
ansiColor('xterm') {
|
|
@@ -16,11 +16,13 @@ ansiColor('xterm') {
|
|
stage('build images') {
|
|
stage('build images') {
|
|
for (int i = 0; i < projectList.length ; i++) {
|
|
for (int i = 0; i < projectList.length ; i++) {
|
|
echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
|
|
- if ("${projectList[i]}" == "mchsrv" || "${projectList[i]}" == "sharebms2") {
|
|
|
|
- sh "docker build -t ${xy_image}/${projectList[i]}:${release} -f ${jenkins_home}/share-v2/${projectList[i]}/Dockerfile ${jenkins_home}/share-v2/${projectList[i]}"
|
|
|
|
- } else {
|
|
|
|
- echo "2222222222222"
|
|
|
|
|
|
+ for (int j = 0 ; j < list2.size() ; j++) {
|
|
|
|
+ if ("${projectList[i]}" == "${list2[j]}") {
|
|
|
|
+ echo "11111111111"
|
|
|
|
+ }else {
|
|
|
|
+ echo "22222222222"
|
|
}
|
|
}
|
|
|
|
+ }
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|
|
}
|