This repository has been archived by the owner on Dec 14, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 6
/
circle.yml
37 lines (33 loc) · 1.55 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
general:
branches:
ignore:
machine:
environment:
docker_image: geometalab/geoconverter
docker_file: docker/Dockerfile
docker_context: .
services:
- docker
dependencies:
override:
- docker info
- docker build -t $docker_image -f $docker_file $docker_context
test:
override:
- docker run -it --rm --env DJANGO_ENV_FILE=/dev/null $docker_image python3 manage.py geoconvversion
deployment:
release:
branch: master
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker push $docker_image
- docker tag $docker_image $docker_image:$(docker run -it --rm --env DJANGO_ENV_FILE=/dev/null $docker_image python3 manage.py geoconvversion --dockertag | sed -rn 's/^([-._A-Za-z0-9]+).*$/\1/p')
- docker push $docker_image:$(docker run -it --rm --env DJANGO_ENV_FILE=/dev/null $docker_image python3 manage.py geoconvversion --dockertag | sed -rn 's/^([-._A-Za-z0-9]+).*$/\1/p')
develop:
branch: develop
commands:
- docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS
- docker tag $docker_image $docker_image:latest-dev
- docker push $docker_image:latest-dev
- docker tag $docker_image:latest-dev $docker_image:$(docker run -it --rm --env DJANGO_ENV_FILE=/dev/null $docker_image python3 manage.py geoconvversion --dockertag | sed -rn 's/^([-._A-Za-z0-9]+).*$/\1/p')
- docker push $docker_image:$(docker run -it --rm --env DJANGO_ENV_FILE=/dev/null $docker_image python3 manage.py geoconvversion --dockertag | sed -rn 's/^([-._A-Za-z0-9]+).*$/\1/p')