diff --git a/.ansible/deploy-draft.yml b/.ansible/deploy-draft.yml new file mode 100644 index 0000000..9c3cab2 --- /dev/null +++ b/.ansible/deploy-draft.yml @@ -0,0 +1,21 @@ +--- +- hosts: docker + tasks: + - name: deploy draft + docker_container: + name: "bouquins_draft_{{ draft_name }}" + image: "reg.meutel.net/go-bouquins:{{ draft_name }}" + state: present + recreate: yes + labels: + traefik.enable: true + traefik.port: 8080 + traefik.docker.network: proxybackend + traefik.frontend.rule: "Host:{{ draft_name }}.bouquins.www.meutel.net" + networks: + name: proxybackend + # TODO volumes + volumes_from: + - mydata + +# vim:ft=ansible: diff --git a/.drone.yml b/.drone.yml index 8491d28..43b0756 100644 --- a/.drone.yml +++ b/.drone.yml @@ -25,7 +25,7 @@ steps: commands: - go vet ./... - - name: docker + - name: docker image: plugins/docker settings: registry: reg.meutel.net @@ -39,13 +39,47 @@ steps: event: - tag + - name: docker-branch + image: plugins/docker + settings: + registry: reg.meutel.net + repo: reg.meutel.net/go-bouquins + tags: ${DRONE_BRANCH##feature/} + debug: true + username: + from_secret: registry_login + password: + from_secret: registry_password + when: + branch: + - feature/* + trigger: event: - push - tag +--- +kind: pipeline +type: ssh +name: deploy + +server: + host: meutel.net + user: drone + ssh_key: + from_secret: drone_ssh_key + +steps: + - name: deploy-branch + commands: + - id + +depends_on: + - default + --- kind: signature -hmac: 0f5318785e361ab48470f37a93f15cb218f6f2a22dbdd2ec2f16298dd7577ada +hmac: 2432bc54b5194625c455761323cb615cc117611ee9af4639f9b3463824f158fa ...