Browse Source

更新 'Jenkinsfile'

chenghongxi 4 năm trước cách đây
mục cha
commit
a158f3c93e
1 tập tin đã thay đổi với 2 bổ sung20 xóa
  1. 2 20
      Jenkinsfile

+ 2 - 20
Jenkinsfile

@@ -1,4 +1,4 @@
-def git_auth="d4b4c06c-7a45-4969-a06d-8363858e81cd"
+def git_auth="828a7f69-4160-4ff8-a8ce-cf76fa430d0f"
 def git_url="http://10.68.0.122:3000/mengqingchuang/k8swebapi.git"
 def jenkins_home="/var/jenkins_home/workspace/k8swebapi/"
 def xy_image="registry-vpc.cn-beijing.aliyuncs.com/xinyue/"
@@ -8,23 +8,5 @@ def projectList = project_name.split(",")
 node {
     stage('pull code') {
         checkout([$class: 'GitSCM', branches: [[name: '*/master']], doGenerateSubmoduleConfigurations: false, extensions: [], submoduleCfg: [], userRemoteConfigs: [[credentialsId: "${git_auth}", url: "${git_url}"]]])}
-    stage('build images') {
-        for (int i = 0; i < projectList.length ; i++) {
-             echo "正在build images,项目名为:${projectList[i]}"
-             sh "docker build -t ${xy_image}${projectList[i]}:${release} -f ${jenkins_home}${projectList[i]}/Dockerfile ${jenkins_home}${projectList[i]}"
-        }      
-    }
-    stage('push aliyuncs registry') {
-         for (int i = 0; i < projectList.length ; i++) {
-              echo "正在推送镜像,项目名为:${projectList[i]} " 
-              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]}"
-         }
-    }
+
 }