forked from andresriancho/django-uwsgi-nginx-ssh
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
52 lines (41 loc) · 2.11 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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
machine:
services:
- docker
test:
override:
- echo "No tests."
#
# The builds at registry.hub.docker.com are awfully slow. Building at CI and
# pushing to the registry.
#
deployment:
production:
branch: master
owner: andresriancho
commands:
#
# Build the docker image and upload it to the registry
#
- docker build -t andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-production .
# Push the new image to docker registry
- sed "s/<EMAIL>/$DOCKER_EMAIL/;s/<AUTH>/$DOCKER_AUTH/" < dockercfg.template > ~/.dockercfg
- docker tag andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-production andresriancho/django-uwsgi-nginx-ssh:production
- docker tag andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-production andresriancho/django-uwsgi-nginx-ssh:latest
- docker push andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-production
- docker push andresriancho/django-uwsgi-nginx-ssh:production
- docker push andresriancho/django-uwsgi-nginx-ssh:latest
- 'curl --header "Content-Type: application/json" --request POST https://circleci.com/api/v1/project/andresriancho/django-uwsgi-nginx-ssh-fat/tree/master?circle-token=ddaa2f4c13b60f6c67c229b343eb13a4cee777d0'
staging:
branch: develop
owner: andresriancho
commands:
#
# Build the docker image and upload it to the registry
#
- docker build -t andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-staging .
# Push the new image to docker registry
- sed "s/<EMAIL>/$DOCKER_EMAIL/;s/<AUTH>/$DOCKER_AUTH/" < dockercfg.template > ~/.dockercfg
- docker tag andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-staging andresriancho/django-uwsgi-nginx-ssh:staging
- docker push andresriancho/django-uwsgi-nginx-ssh:${CIRCLE_SHA1:0:7}-staging
- docker push andresriancho/django-uwsgi-nginx-ssh:staging
- 'curl --header "Content-Type: application/json" --request POST https://circleci.com/api/v1/project/andresriancho/django-uwsgi-nginx-ssh-fat/tree/master?circle-token=ddaa2f4c13b60f6c67c229b343eb13a4cee777d0'