فهرست منبع

更新 'Jenkinsfile'

chenghongxi 4 سال پیش
والد
کامیت
da3e4f1d55
1فایلهای تغییر یافته به همراه13 افزوده شده و 0 حذف شده
  1. 13 0
      Jenkinsfile

+ 13 - 0
Jenkinsfile

@@ -23,5 +23,18 @@ ansiColor('xterm') {
 				}
 			} 
 		}
+		stage('push aliyuncs registry') {
+			for (int i = 0; i < projectList.length ; i++) {
+				echo "\u001B[32m############正在推送镜像,项目名为:${projectList[i]}############\u001B[0m" 
+				sh "docker push ${xy_image}${projectList[i]}:${BUILD_NUMBER}"
+			}
+		}
+		stage('push aliyuncs registry') {
+			for (int i = 0; i < projectList.length ; i++) {
+				sh "cd ${jenkins_home}"
+				sh "chmod +x ${jenkins_home}jenkins.py"
+				sh "python3 jenkins.py ${projectList[i]}"
+         	}
+		}
 	}
 }