-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcloudbuild.yaml
More file actions
18 lines (17 loc) · 1.41 KB
/
cloudbuild.yaml
File metadata and controls
18 lines (17 loc) · 1.41 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
steps:
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'instances', 'add-metadata', '--metadata-from-file', 'startup-script=docker_prune_startup.sh', 'app', '--zone=us-central1-a']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'instances', 'add-metadata', '--metadata-from-file', 'startup-script=docker_prune_startup.sh', 'api', '--zone=us-central1-a']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/mapnificent-hack/react-app:latest_react', '--build-arg', 'REACT_APP_PORT=${_REACT_APP_PORT}', '--build-arg', 'REACT_APP_PLACES_API_KEY=${_REACT_APP_PLACES_API_KEY}', '--build-arg', 'NGINX_PROXY_IP=${_NGINX_PROXY_IP}', './src/app']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/mapnificent-hack/api:latest_api', '--build-arg', 'API_KEY=${_REACT_APP_PLACES_API_KEY}', './src/api/src']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/mapnificent-hack/react-app:latest_react']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/mapnificent-hack/api:latest_api']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'instances', 'update-container', 'app', '--zone=us-central1-a', '--container-image', 'gcr.io/mapnificent-hack/react-app:latest_react']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'instances', 'update-container', 'api', '--zone=us-central1-a', '--container-image', 'gcr.io/mapnificent-hack/api:latest_api']