-
Notifications
You must be signed in to change notification settings - Fork 0
/
redeploy.yaml
24 lines (24 loc) · 1.6 KB
/
redeploy.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
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/<project-id>/flask_test:latest_flask_test', '-f', './flask_app/Dockerfile.dev', './flask_app']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/<project-id>/flask_test:latest_flask_test']
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c', 'docker run -e USERNAME=${_MY_SECRET_USERNAME} -e PASSWORD=${_MY_SECRET_PASSWORD} -e HOST=${_HOST} -e DBNAME=${_DBNAME} -e USER=${_USER} -e PASS=${_PASS} gcr.io/cibc-esg-company-maps/flask_test:latest_flask_test']
- name: 'gcr.io/cloud-builders/npm'
args: ['--prefix', './react_app', 'install']
- name: 'gcr.io/cloud-builders/npm'
args: ['--prefix', './react_app', 'test', 'a', '--', '--coverage']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/<project-id>/flask:latest_flask', './flask_app']
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/<project-id>/nginx:latest_nginx', '--build-arg', 'REACT_APP_NGINXPROXY=${_NGINXPROXY}', './react_app']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/<project-id>/flask:latest_flask']
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'gcr.io/<project-id>/nginx:latest_nginx']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'instances', 'update-container', 'web-server', '--zone=us-central1-a', '--container-image', 'gcr.io/<project-id>/nginx:latest_nginx']
- name: 'gcr.io/cloud-builders/gcloud'
args: ['compute', 'instances', 'update-container', 'application-server', '--zone=us-central1-a', '--container-image', 'gcr.io/<project-id>/flask:latest_flask']