-
Notifications
You must be signed in to change notification settings - Fork 91
/
cloudbuild.yaml
57 lines (50 loc) · 1.44 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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args:
- kms
- decrypt
- --ciphertext-file=./script/encrypt_bucket_path
- --plaintext-file=/root/config/bucket_path
- --location=global
- --keyring=allan
- --key=cloud-build
volumes:
- name: 'config'
path: /root/config
- name: 'gcr.io/cloud-builders/gsutil'
entrypoint: '/bin/bash'
args: ['./script/cloudbuild.sh', 'download_config']
volumes:
- name: 'config'
path: /root/config
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: 'rm'
args: ['./cloudbuild.yaml']
- name: 'gcr.io/cloud-builders/go:debian'
entrypoint: 'go'
args: ['mod', 'vendor']
env:
- 'GO111MODULE=on'
- 'PROJECT_ROOT=hit-counter'
- name: 'gcr.io/cloud-builders/go:debian'
entrypoint: '/bin/bash'
args: ['./script/cloudbuild.sh', 'test']
env:
- 'GO111MODULE=on'
- 'PROJECT_ROOT=hit-counter'
secretEnv: ['SENTRY_DSN']
- name: 'gcr.io/cloud-builders/gcloud'
entrypoint: '/bin/bash'
args: ['./script/cloudbuild.sh', 'deploy']
env:
- 'GO111MODULE=on'
- 'PROJECT_ROOT=hit-counter'
timeout: 2000s
volumes:
- name: 'config'
path: /root/config
timeout: 2500s
secrets:
- kmsKeyName: projects/allan-212102/locations/global/keyRings/allan/cryptoKeys/cloud-build
secretEnv:
SENTRY_DSN: CiQA7jhEYh6qOP8btVMd+e9mDKJ0iEaAsHeduNgegvblBubK9hESYwDsYGtfYgHO2+1eP8qGJcvIkiuO4kM2IPORYfg1gYeDVpEf3xiJYatvG05xewSMhcYRzgYQGTCrNN7E5zXQpkR3UGgFtzJqDzWBTOw6cmy2kPlyiZ4kdF3pVXz1+FP5jgnOfg==