浏览代码

更新 '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]}"
+         	}
+		}
 	}
 	}
 }
 }