--- kind: pipeline type: ssh name: car4s server: host: 110.40.192.42:8022 user: root ssh_key: from_secret: SSH_KEY clone: disable: true steps: - name: Git Set environment: GIT_NAME: from_secret: GIT_NAME GIT_PASSWD: from_secret: GIT_PASSWD commands: - echo "Git 设置" - 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 - name: Clone commands: - echo "Clone 代码" - cd /www/wwwroot/car.des8.com - pwd && ls -l - git pull origin master - name: Env commands: - echo "设置Env配置" - cd /www/wwwroot/car.des8.com - echo "[app]" > .env - echo "debug = false" >> .env - echo "trace = false" >> .env - echo "[database]" >> .env - echo "hostname = 127.0.0.1" >> .env - echo "database = car_des8_com" >> .env - echo "username = car_des8_com" >> .env - echo "password = eSfcCeDH76zC3MLG" >> .env - echo "hostport = 3306" >> .env - echo "prefix = car_" >> .env - echo "debug = false" >> .env - cat .env - name: Chown to www commands: - echo "更改文件权限" - chown -R www:www ./ - pwd && ls -l trigger: branch: - master