-
Notifications
You must be signed in to change notification settings - Fork 0
/
circle.yml
38 lines (38 loc) · 1.48 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
machine:
environment:
GCLOUD_PROJECT: $GCLOUD_PROJECTID
services:
- docker
checkout:
post:
- git submodule sync --recursive
- git submodule update --init --recursive
dependencies:
pre:
- echo $GCLOUD_KEY | base64 --decode > ${HOME}/client-secret.json
- gcloud --quiet components update app
- gcloud auth activate-service-account --key-file ${HOME}/client-secret.json
- gcloud config set project $GCLOUD_PROJECTID
override:
- echo "Just overriding CircleCI inferred dependency installation..."
cache_directories:
- ~/docker
test:
override:
- echo "No tests so far"
deployment:
test:
branch: master
commands:
- if [[ -e ~/docker/image-test.tar ]]; then docker load -i ~/docker/image-test.tar; fi
- docker build -t $EXTERNAL_REGISTRY_ENDPOINT/project-processor-test .
- mkdir -p ~/docker; docker save $EXTERNAL_REGISTRY_ENDPOINT/project-processor-test > ~/docker/image-test.tar
- gcloud docker push $EXTERNAL_REGISTRY_ENDPOINT/project-processor-test
production:
tag: /v[0-9]+(\.[0-9]+)*/
owner: muzhack
commands:
- if [[ -e ~/docker/image-production.tar ]]; then docker load -i ~/docker/image-production.tar; fi
- docker build -t $EXTERNAL_REGISTRY_ENDPOINT/project-processor:$CIRCLE_TAG .
- mkdir -p ~/docker; docker save $EXTERNAL_REGISTRY_ENDPOINT/project-processor:$CIRCLE_TAG > ~/docker/image-production.tar
- gcloud docker push $EXTERNAL_REGISTRY_ENDPOINT/project-processor:$CIRCLE_TAG