shbot/.drone.yml

73 lines
1.4 KiB
YAML
Raw Normal View History

2022-07-01 03:16:22 +02:00
kind: pipeline
name: deploy
steps:
2023-09-24 04:35:05 +02:00
- name: docker
2023-12-24 20:27:54 +01:00
registry: git.ar21.de
2022-07-01 03:16:22 +02:00
username:
2023-12-24 20:27:54 +01:00
from_secret: REGISTRY_USER
2022-07-01 03:16:22 +02:00
password:
2023-12-24 20:27:54 +01:00
from_secret: REGISTRY_PASS
repo: git.ar21.de/secondhemd/shbot
2022-07-01 03:16:22 +02:00
tags: latest
when:
branch:
- master
- name: docker-build
2023-12-24 20:27:54 +01:00
registry: git.ar21.de
2022-07-01 03:16:22 +02:00
username:
2023-12-24 20:27:54 +01:00
from_secret: REGISTRY_USER
2022-07-01 03:16:22 +02:00
password:
2023-12-24 20:27:54 +01:00
from_secret: REGISTRY_PASS
repo: git.ar21.de/secondhemd/shbot
2022-07-01 03:16:22 +02:00
tags: latest
dry_run: true
when:
2023-09-24 04:35:05 +02:00
branch:
exclude:
2022-07-21 17:42:08 +02:00
- master
2022-07-03 03:11:36 +02:00
- name: dev docker
image: plugins/docker
settings:
2023-12-24 20:27:54 +01:00
registry: git.ar21.de
2022-07-03 03:11:36 +02:00
username:
2023-12-24 20:27:54 +01:00
from_secret: REGISTRY_USER
2022-07-03 03:11:36 +02:00
password:
2023-12-24 20:27:54 +01:00
from_secret: REGISTRY_PASS
repo: git.ar21.de/secondhemd/shbot
2022-07-03 03:11:36 +02:00
tags: dev
when:
branch:
- dev
- 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
2022-07-03 03:11:36 +02:00
when:
branch:
- master
2022-07-03 03:24:56 +02:00
- 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
2022-07-03 03:24:56 +02:00
when:
branch:
- dev
2023-09-24 04:35:05 +02:00
when:
event:
- push