1:下载插件
下载安装:Extended Choice Parameter Plug-In
官方配置:
2: 创建项目
3:配置项目
4:配置脚本
脚本:
root@debian43:/home/ops# cat hanye_online.sh
#!/bin/bash
#------------
#name erp_qa.sh
#version: 1.0
#online erp_qa project
#------------
#cd /home/erp/hanye/A1/
#git pull origin master
#gulp
#php artisan migrate --force
#php artisan queue:restart
#sleep 30
#备份程序代码文件目录
TIME='date +%Y%m%d%H%M'
if [ $# -eq 1 ] ;then
case $1 in
A1)
cd /home/ops/hanye/A1
echo "/home/ops/hanye/A1"
git pull origin master
/usr/local/bin/composer install
/home/ops/testpipe/node_modules/.bin/gulp
/usr/local/php/bin/php artisan migrate --force
/usr/local/php/bin/php artisan queue:restart
;;
A2)
cd /home/ops/hanye/A2
echo "/home/ops/hanye/A2"
git pull origin master
/usr/local/bin/composer install
/home/ops/testpipe/node_modules/.bin/gulp
/usr/local/php/bin/php artisan migrate --force
/usr/local/php/bin/php artisan queue:restart
;;
A3)
cd /home/ops/hanye/A3
echo "/home/ops/hanye/A3"
git pull origin master
/usr/local/bin/composer install
/home/ops/testpipe/node_modules/.bin/gulp
/usr/local/php/bin/php artisan migrate --force
/usr/local/php/bin/php artisan queue:restart
;;
*)
echo -e "\033[33mUsage: $0 {A1|A2|A3}\033[0m"
echo "case REEOR"
;;
esac
else
echo "input variable is space"
echo "if ERROR"
fi
阅读(2423) | 评论(0) | 转发(0) |