Skip to content

Commit 46e42a6

Browse files
authored
Merge pull request #11 from geshan/artifact-reg
Use artifact registry
2 parents cb59366 + 29955d5 commit 46e42a6

File tree

1 file changed

+8
-6
lines changed

1 file changed

+8
-6
lines changed

cloudbuild.yaml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,18 +2,20 @@ steps:
22
- name: gcr.io/cloud-builders/docker
33
args: [
44
'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',
5+
'-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres:${SHORT_SHA}',
6+
'-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres:${BRANCH_NAME}',
7+
'-t', 'us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres:latest',
88
'--build-arg', 'COMMIT_SHA=${SHORT_SHA}', '--build-arg', 'BRANCH_NAME=${BRANCH_NAME}', '.']
99

1010
- name: 'gcr.io/cloud-builders/docker'
11-
args: ["push", "gcr.io/$PROJECT_ID/nodejs-postgres"]
11+
args: ["push", "us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres"]
1212

1313
- name: 'gcr.io/cloud-builders/docker'
14-
args: ["push", "-a", "gcr.io/$PROJECT_ID/nodejs-postgres"]
14+
args: ["push", "-a", "us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres"]
1515

1616
- 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', '--cpu-boost']
17+
args: ['run', 'deploy', 'nodejs-postgres', '--image', 'us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres:$SHORT_SHA', '--region', 'us-central1', '--platform', 'managed', '--allow-unauthenticated', '--cpu-boost']
18+
images:
19+
- us-central1-docker.pkg.dev/$PROJECT_ID/nodejs-postgres/nodejs-postgres
1820
options:
1921
logging: CLOUD_LOGGING_ONLY

0 commit comments

Comments
 (0)