54 lines
1.4 KiB
YAML
54 lines
1.4 KiB
YAML
---
|
|
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
|
|
when:
|
|
branch:
|
|
- master
|
|
|
|
- name: draft-deploy
|
|
image: minio/mc
|
|
environment:
|
|
MC_HOST_meutel:
|
|
from_secret: MC_HOST_meutel
|
|
commands:
|
|
- 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:
|
|
- "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'"
|
|
- echo http://${DRONE_COMMIT}.home.www.meutel.net
|
|
when:
|
|
branch:
|
|
exclude:
|
|
- master
|
|
|
|
trigger:
|
|
event:
|
|
- push
|
|
|
|
---
|
|
kind: signature
|
|
hmac: aaba50ea0cb9790e6590e78a08c079041bca6ef6e7e0f406c63b0dcc583f91ab
|
|
|
|
...
|