-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
38 lines (34 loc) · 1.22 KB
/
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
36
37
38
## Customize test commands
machine:
services:
- docker
environment:
TAG: ardoq/ardoq-docker-compose-addon:build-${CIRCLE_BUILD_NUM}
LATEST: ardoq/ardoq-docker-compose-addon:latest
TESTTAG: ardoq/ardoq-docker-compose-addon:test
dependencies:
override:
- docker info
compile:
override:
- docker run --rm -v ~/.m2/repository:/root/.m2/repository -v $(pwd):/build -w /build -e "LEIN_ROOT=true" $(grep FROM Dockerfile|cut -d' ' -f2) lein uberjar
- docker build -t ${TAG} .
test:
override:
- docker run --rm -v ~/.m2/repository:/root/.m2/repository -v $(pwd):/build -w /build -e "LEIN_ROOT=true" $(grep FROM Dockerfile|cut -d' ' -f2) lein test
deployment:
production:
branch: master
commands:
# inserts DOCKER_AUTH and DOCKER_EMAIL from environment (NB DOCKER_AUTH is base64 of username and password)
# - envsubst < dockercfg.template > ~/.dockercfg
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push ${TAG}
- docker tag ${TAG} ${LATEST}
- docker push ${LATEST}
test:
branch: test
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag ${TAG} ${TESTTAG}
- docker push ${TESTTAG}