Build docker branch

This commit is contained in:
Meutel 2019-09-13 09:42:35 +02:00
parent 567dc58d9b
commit 2c3f807c09
2 changed files with 57 additions and 2 deletions

21
.ansible/deploy-draft.yml Normal file
View File

@ -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:

View File

@ -39,13 +39,47 @@ steps:
event: event:
- tag - 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: trigger:
event: event:
- push - push
- tag - 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 kind: signature
hmac: 0f5318785e361ab48470f37a93f15cb218f6f2a22dbdd2ec2f16298dd7577ada hmac: 2432bc54b5194625c455761323cb615cc117611ee9af4639f9b3463824f158fa
... ...