云效构建流水线部署PHP项目
构建部署,生成制品包
mkdir -p /home/admin/application
tar zxvf /home/admin/app/package.tgz -C /home/admin/application/
sh /home/admin/application/deploy.sh restart
无构建部署
echo ${GIT_REPO}
echo ${GIT_BRANCH}
echo ${COMMIT_ID}
git clone ${GIT_REPO} -b ${GIT_BRANCH}
if [ ! -d "/var/www/html/php-demo" ]; then
Git clone $Git_REPO /var/www/html/php-demo;
fi
cd /var/www/html/php-demo;
Git checkout ${COMMIT_ID};
文档地址:
https://help.aliyun.com/document_detail/224610.html
https://help.aliyun.com/document_detail/154942.html
支持版本回退;
主要使用Git checkout ${COMMIT_ID};
管理版本