目 录CONTENT

文章目录

Jenkins模拟GitOps系列06-模拟全套流程

cplinux98
2022-04-30 / 0 评论 / 0 点赞 / 403 阅读 / 165 字 / 正在检测是否收录...

00:文章简介

介绍基于Jenkins的GITOPS中的 模拟全套流程。

01:模拟提交

开发人员在gitlab-ci仓库中提交代码

sed -i "s#0.9.2-SNAPSHOT#0.9.3-SNAPSHOT#g" pom.xml 
sed -i "s#0.9.2#0.9.3#g" src/main/java/com/neo/controller/HelloWorldController.java
sed -i "s#0.9.2#0.9.3#g" Jenkinsfile 

提交前

image-20220405143907641

# curl 10.109.86.171/version
version 0.9.2

进行提交

git add .
git commit -m "V0.9.3"
git push origin develop

02:ci结果

image-20220405144731737

image-20220405144745299

03:通知运维人员进行cd

sed -i "s#0.9.2#0.9.3#g" kubernetes/03-deployment.yaml
git add .
git push origin develop

04:cd结果

image-20220405145222238

image-20220405145319542

0

评论区