Build docker branch
This commit is contained in:
parent
567dc58d9b
commit
2c3f807c09
21
.ansible/deploy-draft.yml
Normal file
21
.ansible/deploy-draft.yml
Normal 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:
|
38
.drone.yml
38
.drone.yml
@ -25,7 +25,7 @@ steps:
|
|||||||
commands:
|
commands:
|
||||||
- go vet ./...
|
- go vet ./...
|
||||||
|
|
||||||
- name: docker
|
- name: docker
|
||||||
image: plugins/docker
|
image: plugins/docker
|
||||||
settings:
|
settings:
|
||||||
registry: reg.meutel.net
|
registry: reg.meutel.net
|
||||||
@ -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
|
||||||
|
|
||||||
...
|
...
|
||||||
|
Loading…
Reference in New Issue
Block a user