Aaron Riedel
0f9179d3ec
All checks were successful
continuous-integration/drone/push Build is passing
90 lines
No EOL
1.6 KiB
YAML
90 lines
No EOL
1.6 KiB
YAML
kind: pipeline
|
|
name: deploy
|
|
steps:
|
|
- name: docker
|
|
image: plugins/docker
|
|
settings:
|
|
username:
|
|
from_secret: DOCKER_USERNAME
|
|
password:
|
|
from_secret: DOCKER_PASSWORD
|
|
repo: secondhemd/shbot
|
|
tags: latest
|
|
when:
|
|
branch:
|
|
include:
|
|
- master
|
|
event:
|
|
include:
|
|
- push
|
|
- name: docker-build
|
|
image: plugins/docker
|
|
settings:
|
|
username:
|
|
from_secret: DOCKER_USERNAME
|
|
password:
|
|
from_secret: DOCKER_PASSWORD
|
|
repo: secondhemd/shbot
|
|
tags: latest
|
|
dry_run: true
|
|
when:
|
|
branch:
|
|
exclude:
|
|
- master
|
|
event:
|
|
exclude:
|
|
- push
|
|
- name: dev docker
|
|
image: plugins/docker
|
|
settings:
|
|
username:
|
|
from_secret: DOCKER_USERNAME
|
|
password:
|
|
from_secret: DOCKER_PASSWORD
|
|
repo: secondhemd/shbot
|
|
tags: dev
|
|
when:
|
|
branch:
|
|
include:
|
|
- dev
|
|
event:
|
|
include:
|
|
- push
|
|
- name: deploy
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
- s.ar21.de
|
|
username: root
|
|
key:
|
|
from_secret: DEPLOY_SSH_KEY
|
|
port: 22
|
|
command_timeout: 2m
|
|
script:
|
|
- cd /root && docker-compose pull shbot && docker-compose up -d shbot
|
|
when:
|
|
branch:
|
|
include:
|
|
- master
|
|
event:
|
|
include:
|
|
- push
|
|
- name: deploy dev
|
|
image: appleboy/drone-ssh
|
|
settings:
|
|
host:
|
|
- s.ar21.de
|
|
username: root
|
|
key:
|
|
from_secret: DEPLOY_SSH_KEY
|
|
port: 22
|
|
command_timeout: 2m
|
|
script:
|
|
- cd /root && docker-compose -f shbot-dev.yaml pull shbot-dev && docker-compose -f shbot-dev.yaml up -d shbot-dev
|
|
when:
|
|
branch:
|
|
include:
|
|
- dev
|
|
event:
|
|
include:
|
|
- push |