代码拉取完成,页面将自动刷新
node { def version=3.0 def mvnHome = tool 'M3' def dockerHome = tool 'docker' def jdk =tool 'jdk' env.PATH = "${mvnHome}/bin:${env.PATH}" env.PATH = "${dockerHome}/bin:${env.PATH}" env.PATH = "${jdk}/bin:${env.PATH}" env.PATH = "/root/local/bin:${env.PATH}" stage('get Code') { git branch: 'master', credentialsId: 'gitlab', url: 'http://10.112.101.94/cloudzone/autotest.git' } stage('mvn build'){ sh "mvn install" } stage('build image'){ //sh "docker rmi -f 10.112.101.90/cloudzone/autotest:1.0" sh "docker build -t 10.112.101.90/cloudzone/autotest:${version} ." } stage('push image'){ sh "docker login 10.112.101.90 -u admin -p Harbor12345" //sh "docker tag cloudzone/autotest:1.0 10.112.101.90/cloudzone/autotest:1.0" sh "docker push 10.112.101.90/cloudzone/autotest:${version}" } stage('deploy'){ // sh "kubectl delete -f springboot.yaml" // sh "kubectl create -f springboot.yaml" sh "kubectl apply -f springboot.yaml --record" }}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。