新增 pipeline 流水线文件 K8s集群部署
This commit is contained in:
		
							
								
								
									
										39
									
								
								xlcs-parent/service/service-acl/Jenkinsfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							
							
						
						
									
										39
									
								
								xlcs-parent/service/service-acl/Jenkinsfile
									
									
									
									
										vendored
									
									
										Normal file
									
								
							@@ -0,0 +1,39 @@
 | 
			
		||||
pipeline {
 | 
			
		||||
  agent {
 | 
			
		||||
    kubernetes {
 | 
			
		||||
      inheritFrom 'maven'
 | 
			
		||||
      containerTemplate {
 | 
			
		||||
        name 'maven'
 | 
			
		||||
        image 'maven:3.8.4-jdk-8'
 | 
			
		||||
      }
 | 
			
		||||
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
  stages {
 | 
			
		||||
    stage('拉取代码') {
 | 
			
		||||
      steps {
 | 
			
		||||
        checkout([$class: 'GitSCM', branches: [[name: 'devops']],
 | 
			
		||||
                            extensions: [[$class: 'CloneOption', depth: 1, shallow: true]], userRemoteConfigs: [[url: 'http://gitea.hhdxw.top:3000/yovinchen/xlcs.git']]
 | 
			
		||||
                        ])
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    stage('编译jar包') {
 | 
			
		||||
      agent none
 | 
			
		||||
      steps {
 | 
			
		||||
        container('maven') {
 | 
			
		||||
          sh 'mvn -f xlcs-parent/pom.xml -B clean package -Dmaven.test.skip=true -Dautoconfig.skip'
 | 
			
		||||
        }
 | 
			
		||||
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
    stage('保存制品') {
 | 
			
		||||
      steps {
 | 
			
		||||
        archiveArtifacts(artifacts: 'xlcs-parent/service/service-acl/target/service-acl.jar', followSymlinks: false)
 | 
			
		||||
      }
 | 
			
		||||
    }
 | 
			
		||||
 | 
			
		||||
  }
 | 
			
		||||
}
 | 
			
		||||
		Reference in New Issue
	
	Block a user