forked from mozilla/addons-server
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathcircle.yml
38 lines (34 loc) · 1.02 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
machine:
services:
- docker
hosts:
olympia.dev: 127.0.0.1
dependencies:
override:
- docker version
- >
printf '{"commit":"%s","version":"%s","source":"https://github.com/%s/%s","build":"%s"}\n'
"$CIRCLE_SHA1"
"$CIRCLE_TAG"
"$CIRCLE_PROJECT_USERNAME"
"$CIRCLE_PROJECT_REPONAME"
"$CIRCLE_BUILD_URL"
> version.json
- docker build -t app:build -f Dockerfile.deploy .
test:
override:
- echo "UI Tests are run on Travis CI. https://travis-ci.org/mozilla/addons-server/"
deployment:
latest:
branch: master
commands:
- docker tag app:build ${DOCKERHUB_REPO}:latest
- docker login -e $DOCKERHUB_EMAIL -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
- docker push ${DOCKERHUB_REPO}:latest
releases:
# push all tags
tag: /.*/
commands:
- docker tag app:build ${DOCKERHUB_REPO}:${CIRCLE_TAG}
- docker login -e $DOCKERHUB_EMAIL -u $DOCKERHUB_USER -p $DOCKERHUB_PASS
- docker push ${DOCKERHUB_REPO}:${CIRCLE_TAG}