-
Notifications
You must be signed in to change notification settings - Fork 83
/
Copy pathcloudbuild.yaml
37 lines (28 loc) · 1.24 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
steps:
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'us-central1-docker.pkg.dev/<your_project_id>/gke-repo/quickstart-image', './app1' ]
id: 'Build Docker Image'
# images:
# - 'us-central1-docker.pkg.dev/<your_project_id>/gke-repo/quickstart-image'
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/<your_project_id>/gke-repo/quickstart-image' ]
id: 'Push Docker Image'
- name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'us-central1-docker.pkg.dev/<your_project_id>/gke-repo/flask-image', './app2' ]
id: 'Build Docker Image2'
# images:
# - 'us-central1-docker.pkg.dev/<your_project_id>/gke-repo/quickstart-image'
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'us-central1-docker.pkg.dev/<your_project_id>/gke-repo/flask-image' ]
id: 'Push Docker Image2'
- name: 'google/cloud-sdk:latest'
entrypoint: 'sh'
args:
- -xe
- -c
- |
gcloud deploy apply --file deploy/pipeline.yaml --region=us-central1
gcloud deploy apply --file deploy/dev.yaml --region=us-central1
gcloud deploy releases create 'app-release-${SHORT_SHA}' --delivery-pipeline=gke-cicd-pipeline --region=us-central1 --skaffold-file=skaffold.yaml
options:
logging: CLOUD_LOGGING_ONLY