-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
27 lines (24 loc) · 803 Bytes
/
Copy pathcloudbuild.yaml
File metadata and controls
27 lines (24 loc) · 803 Bytes
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
steps:
- name: gcr.io/cloud-builders/go
id: go-build
args: ['build', '-a', '-o', 'service', '.']
env: ['PROJECT_ROOT=github.com/macuenca/webhookr-go', 'CGO_ENABLED=0', 'GOOS=linux']
- name: gcr.io/cloud-builders/docker
id: docker-build
args: ['build', '-t', 'us.gcr.io/$PROJECT_ID/webhookr-go-$BRANCH_NAME:$SHORT_SHA', '.']
env: ['PROJECT_ROOT=github.com/macuenca/webhookr-go']
- name: gcr.io/cloud-builders/docker
id: docker-push
args: ['push', 'us.gcr.io/$PROJECT_ID/webhookr-go-$BRANCH_NAME:$SHORT_SHA']
- name: gcr.io/cloud-builders/gcloud
id: gcloud-update-container
args: [
'compute',
'instances',
'update-container',
'webhookr-go',
'--zone',
'us-east1-c',
'--container-image',
'us.gcr.io/$PROJECT_ID/webhookr-go-$BRANCH_NAME:$SHORT_SHA'
]