一、介绍
流水线发布代码
1、官网
https://www.jenkins.io/zh

2、kubesphere里的介绍
https://kubesphere.io/zh/docs/v3.3/devops-user-guide/how-to-use/pipelines/choose-jenkins-agent/

3、git仓库
可以自己写点测试代码,提交,待会测试用
https://gitee.com/
4、创建devops项目

5、创建流水线

二、PHP发布步骤
1、第一步:拉代码

拉代码运行成功,当然自己得提前去代码仓库设置好自己的测试仓库。

2、制作镜像
思路:首先制作一个PHP+nginx的镜像,然后利用dockerfile把拉到的代码打进去,制作一个新镜像。
正好我之前做过一个,可以利用一下。
php+nginx的镜像制作过程: https://blog.csdn.net/u014225032/article/details/125165684
有了这个镜像之后,需要你把他推送到阿里云,待会编写项目的dockerfile要用到,因为这里要和阿里云打交道,所以少不了账号密码。
阿里云账号注册 https://cr.console.aliyun.com/cn-hangzhou/instances/mirrors

自己注册一下,创建个实例,开个仓库就完事了。
持续更新中