addons-server/circle.yml

40 строки
1.1 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 "Skipped...Running our uitests on every pull request breaks"
- echo "them irregularly and they're badly maintained at the moment."
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}