部署测试
Some checks failed
continuous-integration/drone/push Build is failing

This commit is contained in:
孟凡懂 2022-06-29 11:23:12 +08:00
parent 71e34d3d40
commit a01077514d

View File

@ -1,7 +1,7 @@
---
kind: pipeline
type: ssh
name: car4s
name: "服务器部署"
server:
host: 110.40.192.42:8022
@ -13,28 +13,27 @@ clone:
disable: true
steps:
- name: Git Set
- name: "Git 设置"
environment:
GIT_NAME:
from_secret: GIT_NAME
GIT_PASSWD:
from_secret: GIT_PASSWD
commands:
- echo "Git 设置"
- export GIT_NAME=$GIT_NAME
- export GIT_PASSWD=$GIT_PASSWD
- cd /www/wwwroot/car.des8.com
- git remote rm origin
- git remote add origin http://heibai2006:4167208@git.des8.com/heibai2006/car4s.git
#- echo "[remote \"origin\"]\n" > ~/.gitconfig
#- echo "url = http://$GIT_NAME:$GIT_PASSWD@git.des8.com/heibai2006/car4s.git" > ~/.gitconfig
- git remote add origin http://$GIT_NAME:$GIT_PASSWD@git.des8.com/heibai2006/car4s.git
- name: Clone
- name: "Clone 代码"
commands:
- echo "Clone 代码"
- cd /www/wwwroot/car.des8.com
- pwd && ls -l
- git pull origin master
- name: Env
- name: "设置Env配置"
commands:
- echo "设置Env配置"
- cd /www/wwwroot/car.des8.com
@ -51,13 +50,21 @@ steps:
- echo "debug = false" >> .env
- cat .env
- name: Chown to www
- name: "更改文件权限"
commands:
- echo "更改文件权限"
- cd /www/wwwroot/car.des8.com
- chown -R www:www ./
- pwd && ls -l
- name: "清除缓存"
commands:
- echo "清除缓存"
- cd /www/wwwroot/car.des8.com/runtime
- rm -rf ./cache
- rm -rf ./temp
- pwd && ls -l
trigger:
branch:
- master
- master