1 Star 0 Fork 0

tqyin/autotest

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
文件
克隆/下载
Jenkinsfile 1.04 KB
一键复制 编辑 原始数据 按行查看 历史
tqyin 提交于 2018-04-25 17:19 . init
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" }}
Loading...
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/zedhs/auto.git
git@gitee.com:zedhs/auto.git
zedhs
auto
autotest
master

搜索帮助