forked from controlplaneio/kubesec
-
Notifications
You must be signed in to change notification settings - Fork 0
/
cloudbuild.yaml
36 lines (35 loc) · 1.03 KB
/
cloudbuild.yaml
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
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/kubesec:${SHORT_SHA}', '.']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- |
set -euxo pipefail
docker build -t gcr.io/$PROJECT_ID/kubesec:${SHORT_SHA} .
if [[ "${BRANCH_NAME}" == "master" ]]; then
docker push gcr.io/${PROJECT_ID}/kubesec:${SHORT_SHA}
fi
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'bash'
args:
- '-c'
- |
set -euxo pipefail
if [[ "${BRANCH_NAME}" == "master" ]]; then
gcloud beta run deploy kubesec \
--image gcr.io/${PROJECT_ID}/kubesec:${SHORT_SHA} \
--platform managed \
--region us-central1
fi
# TODO(ajm): `make test-remote` on branch
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args:
- '-c'
- |
set -euxo pipefail
if [[ "${BRANCH_NAME}" == "master" ]]; then
make test-remote
fi