forked from bellkev/docker-hello-google
-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
37 lines (33 loc) · 1.03 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
machine:
environment:
CLOUDSDK_CORE_DISABLE_PROMPTS: 1
CLOUDSDK_PYTHON_SITEPACKAGES: 1
CLOUDSDK_COMPUTE_ZONE: us-central1-b
CLOUDSDK_CORE_PROJECT: $GCLOUD_PROJECTID
PATH: $PATH:/home/ubuntu/google-cloud-sdk/bin
python:
version: 2.7.3
services:
- docker
dependencies:
cache_directories:
- ~/google-cloud-sdk
- ~/docker
override:
- script/ensure-gcloud-installed.sh
- if [[ -e ~/docker/image.tar ]]; then docker load -i ~/docker/image.tar; fi
- 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:
- script/auth-gcloud.sh
- gcloud docker push $EXTERNAL_REGISTRY_ENDPOINT/hello > /dev/null