Rancher部署CI/CD

1.添加集群


  1. 选择自定义
    

3.填写集群名称,配置网络和节点,可选择默认


4.生成集群节点


5.配置企业微信通知,如编译成功、失败会自动推送消息到企业微信





6.设置代码仓库


  1. 进行gitlab认证,Rancher需要拉取代码,所以需要认证
    
    选择gitlab,也可以选择github
    
    gitlab中配置:
    

8.运行流水线


查看流水线执行情况:


9.编译完成后,会自动部署
部署成功后,会有一个容器在运行,可以直接访问.


10.页面访问测试:


11.代码展示


相关链接:
https://www.cnblogs.com/duwamish/p/11028185.html
https://segmentfault.com/a/1190000015724647
https://www.cnblogs.com/xzkzzz/p/8125389.html
https://juejin.im/post/5c4c12e5f265da615e05ce4c
https://www.bookstack.cn/read/rancher-v2.x/68ba29e5375fadcd.md
https://rancher2.docs.rancher.cn/docs/cluster-admin/tools/notifiers/_index/
https://github.com/rancher/pipeline-example-go/blob/master/.rancher-pipeline.yml

原文地址:https://www.cnblogs.com/tomtellyou/p/12931812.html