Skip to content

Commit 2a50f10

Browse files
authored
Merge pull request #4 from geshan/cloud-build
Adds the cloudbuild yml file
2 parents ce710d2 + 197b22d commit 2a50f10

File tree

1 file changed

+17
-0
lines changed

1 file changed

+17
-0
lines changed

cloudbuild.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,17 @@
1+
steps:
2+
- name: gcr.io/cloud-builders/docker
3+
args: [
4+
'build',
5+
'-t', 'gcr.io/$PROJECT_ID/nodejs-postgres:${SHORT_SHA}',
6+
'-t', 'gcr.io/$PROJECT_ID/nodejs-postgres:${BRANCH_NAME}',
7+
'-t', 'gcr.io/$PROJECT_ID/nodejs-postgres:latest',
8+
'--build-arg', 'COMMIT_SHA=${SHORT_SHA}', '--build-arg', 'BRANCH_NAME=${BRANCH_NAME}', '.']
9+
10+
- name: 'gcr.io/cloud-builders/docker'
11+
args: ["push", "gcr.io/$PROJECT_ID/nodejs-postgres"]
12+
13+
- name: 'gcr.io/cloud-builders/docker'
14+
args: ["push", "-a", "gcr.io/$PROJECT_ID/nodejs-postgres"]
15+
16+
- name: 'gcr.io/cloud-builders/gcloud'
17+
args: ['run', 'deploy', 'nodejs-postgres', '--image', 'gcr.io/$PROJECT_ID/nodejs-postgres', '--region', 'us-central1', '--platform', 'managed', '--allow-unauthenticated']

0 commit comments

Comments
 (0)