瀏覽代碼

更新 'Jenkinsfile'

chenghongxi 4 年之前
父節點
當前提交
0a3631e8c2
共有 1 個文件被更改,包括 8 次插入1 次删除
  1. 8 1
      Jenkinsfile

+ 8 - 1
Jenkinsfile

@@ -19,9 +19,16 @@ ansiColor('xterm') {
 		}
 		stage('push aliyuncs registry') {
 			for (int i = 0; i < projectList.length ; i++) {
-				echo "正在推送镜像,项目名为:${projectList[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]}"
+         	}
+		}
 	}
 }