Parcourir la source

更新 'Jenkinsfile'

chenghongxi il y a 4 ans
Parent
commit
ae74acd712
1 fichiers modifiés avec 2 ajouts et 1 suppressions
  1. 2 1
      Jenkinsfile

+ 2 - 1
Jenkinsfile

@@ -4,6 +4,7 @@ def jenkins_home="/var/jenkins_home/workspace/k8s"
 def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue-jenkins"
 def release="${BUILD_NUMBER}"
 def projectList = project_name.split(",")
+def list2 = "{'mchsrv','sharebms2'}"
 
 
 ansiColor('xterm') {
@@ -15,7 +16,7 @@ ansiColor('xterm') {
 		stage('build images') {
 			for (int i = 0; i < projectList.length ; i++) {
 				echo "\u001B[32m############正在build images,项目名为:${projectList[i]}############\u001B[0m"
-					if ("${projectList[i]}" == "['mchsrv']"){
+					if ("${projectList[i]}" == "${list2}"){
 						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 "222222222222"