-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
35 lines (32 loc) · 948 Bytes
/
circle.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
machine:
pre:
- curl -sSL https://s3.amazonaws.com/circle-downloads/install-circleci-docker.sh | bash -s -- 1.10.0
services:
- docker
environment:
appname: "haproxy"
dependencies:
override:
- docker info
- docker pull tklx/$appname:latest || true
- docker build -t tklx/$appname:latest .
- docker images
test:
pre:
- git clone https://github.com/tklx/bats.git
- sudo bats/install.sh /usr/local
override:
- IMAGE=tklx/$appname:latest bats --tap tests/basics.bats
deployment:
latest:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push tklx/$appname:latest
release:
tag: /^([0-9]+)\.([0-9]+)\.([0-9]+)$/
owner: tklx
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag tklx/$appname:latest tklx/$appname:$CIRCLE_TAG
- docker push tklx/$appname:$CIRCLE_TAG