2019-03-24 22:28:17 +08:00
|
|
|
kind: pipeline
|
2019-03-24 23:24:21 +08:00
|
|
|
name: ssh-test
|
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
steps:
|
|
|
|
- name: ssh
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host: staging.beepvoice.app
|
|
|
|
username: core
|
|
|
|
key:
|
|
|
|
from_secret: ssh_key
|
|
|
|
script:
|
|
|
|
- cd /home/core/website && ls
|
|
|
|
---
|
|
|
|
kind: pipeline
|
2019-03-24 22:28:17 +08:00
|
|
|
name: website
|
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
steps:
|
|
|
|
- name: docker
|
|
|
|
image: plugins/docker
|
|
|
|
settings:
|
|
|
|
registry: registry.makerforce.io
|
|
|
|
repo: registry.makerforce.io/beep/website
|
|
|
|
auto_tag: true
|
|
|
|
username:
|
|
|
|
from_secret: docker_username
|
|
|
|
password:
|
|
|
|
from_secret: docker_password
|
2019-03-25 00:39:02 +08:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
2019-03-24 22:28:17 +08:00
|
|
|
---
|
|
|
|
kind: pipeline
|
|
|
|
name: deploy
|
|
|
|
clone:
|
|
|
|
depth: 1
|
|
|
|
steps:
|
|
|
|
- name: copy-docker-compose
|
|
|
|
image: appleboy/drone-scp
|
|
|
|
settings:
|
|
|
|
host: staging.beepvoice.app
|
|
|
|
username: core
|
2019-03-24 23:24:21 +08:00
|
|
|
key:
|
2019-03-24 22:28:17 +08:00
|
|
|
from_secret: ssh_key
|
|
|
|
source:
|
|
|
|
- docker-compose.yml
|
|
|
|
target: /home/core/website
|
2019-03-25 00:39:02 +08:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
2019-03-24 22:28:17 +08:00
|
|
|
- name: docker-compose-up
|
|
|
|
image: appleboy/drone-ssh
|
|
|
|
settings:
|
|
|
|
host: staging.beepvoice.app
|
|
|
|
username: core
|
2019-03-24 23:24:21 +08:00
|
|
|
key:
|
2019-03-24 22:28:17 +08:00
|
|
|
from_secret: ssh_key
|
|
|
|
script:
|
|
|
|
- >-
|
|
|
|
cd /home/core/website && /home/core/docker-compose pull
|
|
|
|
- >-
|
|
|
|
cd /home/core/website && /home/core/docker-compose up -d
|
2019-03-25 00:39:02 +08:00
|
|
|
when:
|
|
|
|
branch:
|
|
|
|
- master
|
2019-03-25 00:19:48 +08:00
|
|
|
- name: slack
|
|
|
|
image: plugins/slack
|
|
|
|
settings:
|
|
|
|
webhook:
|
|
|
|
from_secret: slack_webhook_beep
|
2019-03-24 22:28:17 +08:00
|
|
|
depends_on:
|
|
|
|
- website
|