44 lines
863 B
YAML
44 lines
863 B
YAML
---
|
|
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
|
|
environment:
|
|
GIT_NAME:
|
|
from_secret: GIT_NAME
|
|
GIT_PASSWD:
|
|
from_secret: GIT_PASSWD
|
|
commands:
|
|
- echo "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 remote rm origin
|
|
- git remote add origin http://heibai2006:4167208@git.des8.com/heibai2006/car4s.git
|
|
- git pull origin master
|
|
|
|
- name: Chown to www
|
|
commands:
|
|
- chown -R www:www ./
|
|
- pwd && ls -l
|
|
|
|
|
|
trigger:
|
|
branch:
|
|
- master |