meutel.net_home/.drone.yml

54 lines
1.4 KiB
YAML
Raw Normal View History

2019-09-10 17:43:02 +00:00
---
kind: pipeline
type: docker
name: default
steps:
- name: deploy
image: minio/mc
environment:
MC_HOST_meutel:
from_secret: MC_HOST_meutel
commands:
- mc cp --recursive public/* meutel/home
2019-09-11 07:16:53 +00:00
when:
branch:
- master
2019-09-15 09:32:05 +00:00
- name: draft-deploy
2019-09-11 07:16:53 +00:00
image: minio/mc
environment:
MC_HOST_meutel:
from_secret: MC_HOST_meutel
commands:
2019-09-15 09:32:05 +00:00
- mc cp --recursive public/* meutel/home-drafts/${DRONE_COMMIT}/
when:
branch:
exclude:
- master
- name: draft-config
image: consul
environment:
MC_HOST_meutel:
from_secret: MC_HOST_meutel
commands:
2019-09-15 11:52:45 +00:00
- "consul kv put -http-addr=http://consul:8500 traefik/frontends/home-drafts-${DRONE_COMMIT}/backend minio"
- "consul kv put -http-addr=http://consul:8500 traefik/frontends/home-drafts-${DRONE_COMMIT}/entrypoints http"
- "consul kv put -http-addr=http://consul:8500 traefik/frontends/home-drafts-${DRONE_COMMIT}/routes/${DRONE_COMMIT}/rule 'Host:${DRONE_COMMIT}.home.www.meutel.net;AddPrefix:/home-drafts/${DRONE_COMMIT};ReplacePathRegex: ^/home-drafts/${DRONE_COMMIT}/$ /home-drafts/${DRONE_COMMIT}/index.html'"
2019-09-11 07:16:53 +00:00
- echo http://${DRONE_COMMIT}.home.www.meutel.net
when:
branch:
exclude:
- master
2019-09-10 17:43:02 +00:00
trigger:
2019-09-11 07:16:53 +00:00
event:
- push
2019-09-11 06:01:12 +00:00
---
kind: signature
2019-09-15 11:52:45 +00:00
hmac: aaba50ea0cb9790e6590e78a08c079041bca6ef6e7e0f406c63b0dcc583f91ab
2019-09-11 06:01:12 +00:00
...