addons-server/circle.yml

39 строки
1.0 KiB
YAML

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}