Soleilw 1 年之前
父節點
當前提交
f86cb6ef4f
共有 1 個文件被更改,包括 69 次插入0 次删除
  1. 69
    0
      .drone.yml

+ 69
- 0
.drone.yml 查看文件

@@ -0,0 +1,69 @@
kind: pipeline
type: docker
name: publish-prod-v1

clone:
disable: true
steps:
- name: publish-prod-v1
image: scfobao/dronessh:v1
settings:
host:
- 114.132.85.7

username:
from_secret: SSH_USERNAME
password:
from_secret: SSH_PASSWORD

port: 22
command_timeout: 30m
script:
- cd /home/lqh/apps/job-admin
- git fetch --all
- git reset --hard origin/master
# - docker-compose build
# - docker-compose push
# - docker pull registry.cn-hangzhou.aliyuncs.com/anyu1/rcsc:rcsc_web_prod_latest
#- docker-compose -f /home/lqh/apps-yml/dc-rcsc-web.yaml up -d --force-recreate
when:
branch:
- master


---
kind: pipeline
type: docker
name: publish-test


clone:
disable: true
steps:


- name: publish-test-build-push
image: scfobao/dronessh:v1
settings:
host:
- 114.132.85.7
username:
from_secret: SSH_USERNAME
password:
from_secret: SSH_PASSWORD
port: 22
command_timeout: 30m
script:
- cd /home/lqh/apps/rcsc-web
- git fetch --all
- git reset --hard origin/test
- docker-compose -f docker-compose-test.yml build
# - docker-compose -f docker-compose-test.yml push
# - docker pull registry.cn-hangzhou.aliyuncs.com/anyu1/rcsc:rcsc_web_test_latest
- sleep 1
- docker-compose -f /home/lqh/apps-yml/dc-rcsc-web.yaml up -d --force-recreate
- docker system prune -f --filter "label!=17"
when:
branch:
- test

Loading…
取消
儲存