forked from jamiepg1/docker-hello-google
-
Notifications
You must be signed in to change notification settings - Fork 1
/
circle.yml
42 lines (38 loc) · 1.33 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
machine:
environment:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
CLOUDSDK_PYTHON_SITEPACKAGES: 1
CLOUDSDK_COMPUTE_ZONE: us-central1-a
CLOUDSDK_CORE_PROJECT: circle-docker-hello
CLOUDSDK_CONTAINER_CLUSTER: cluster-2
PATH: $PATH:/home/ubuntu/google-cloud-sdk/bin
python:
version: 2.7.3
dependencies:
cache_directories:
- ~/kubernetes
- ~/google-cloud-sdk
- ~/docker
override:
- script/ensure-gcloud-installed.sh
- sudo docker -d -D -e lxc -s btrfs --insecure-registry $EXTERNAL_REGISTRY_ENDPOINT:
background: true
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- script/git-set-mtimes.pl
- docker build -t $EXTERNAL_REGISTRY_ENDPOINT/hello:$CIRCLE_SHA1 .
- mkdir -p ~/docker; docker save $EXTERNAL_REGISTRY_ENDPOINT/hello:$CIRCLE_SHA1 > ~/docker/image.tar
database:
override:
- echo
test:
override:
- docker run -d -p 3000:3000 -e "SECRET_KEY_BASE=foo" $EXTERNAL_REGISTRY_ENDPOINT/hello:$CIRCLE_SHA1
- curl --retry 10 --retry-delay 5 -v http://localhost:3000
deployment:
prod:
branch: master
commands:
# - docker login -e $DOCKER_EMAIL -u $DOCKER_USER -p $DOCKER_PASS $EXTERNAL_REGISTRY_ENDPOINT
- docker push $EXTERNAL_REGISTRY_ENDPOINT/hello:$CIRCLE_SHA1
- script/auth-gcloud.sh
- script/rolling-update.sh