返回

阿里流水线使用教程

发布时间:2022-10-13 18:37:27 346
# php# 数据库# docker# 数据# 技术

登录

​​https://flow.aliyun.com/​​

一般是使用公司的RAM用户登录

阿里流水线使用教程_缓存

新建流水线

阿里流水线使用教程_php_02

选择流水线模板

一般可以根据技术架构,选择不同的流水线模板,没有合适的就用自定义的即可。

阿里流水线使用教程_缓存_03

选择代码源

可以根据公司代码,托管位置或仓库位置,选择代码源;

阿里流水线使用教程_git_04

例如我们使用CodeUp

阿里流水线使用教程_git_05

添加监听代码提交

阿里流水线使用教程_php_06

CodeUp后台设置webhook

阿里流水线使用教程_php_07

获取git版本

阿里流水线使用教程_git_08

主机部署

阿里流水线使用教程_php_09

部署脚本

cd /home/wwwroot

mkdir branch

git clone https://codeup.aliyun.com/xxx.git /home/wwwroot/xxx.cn

chmod -R 777 /home/wwwroot/branch

cd /home/wwwroot/xxx.cn

为 数据库数据表添加缓存(添加新字段时候需要运行此命令,不然有缓存不生效,缓存在runtime/schema文件夹)

docker exec -i php7.3 /bin/bash -c 'cd /home/wwwroot/xxx.cn/ && php think optimize:schema'

rm -rf runtime

cd /home/wwwroot/xxx.cn-20220105.bak/txxx.cn/public

cd /home/wwwroot/xxxx.cn

chmod -R 777 runtime


cd public

git config core.filemode false

git checkout -b testing

git branch

git status

docker exec -i php7.3 /bin/bash -c 'cd /home/wwwroot/xxx.cn/ && composer update'

git checkout testing

git reset --hard 061bc22b8a53fb83936c5c34978451a1ec9226c5

git status

git pull origin testing


你要保守你心,胜过保守一切。

作者:刘俊涛的博客​


特别声明:以上内容(图片及文字)均为互联网收集或者用户上传发布,本站仅提供信息存储服务!如有侵权或有涉及法律问题请联系我们。
举报
评论区(0)
按点赞数排序
用户头像
精选文章
thumb 中国研究员首次曝光美国国安局顶级后门—“方程式组织”
thumb 俄乌线上战争,网络攻击弥漫着数字硝烟
thumb 从网络安全角度了解俄罗斯入侵乌克兰的相关事件时间线
下一篇
PhpStorm 64位无法打开 2022-10-13 18:15:28