Skip to content
Snippets Groups Projects
Commit 06bfc362 authored by Shreyas Prabhu's avatar Shreyas Prabhu
Browse files

Add .gcloudignore file and update cloudbuild.yaml for Artifact Registry integration

parent 78a4044d
No related branches found
No related tags found
No related merge requests found
# Exclude node_modules
node_modules/
# Include dist directory
!dist/
\ No newline at end of file
...@@ -11,7 +11,11 @@ steps: ...@@ -11,7 +11,11 @@ steps:
# Build the container image # Build the container image
- name: 'gcr.io/cloud-builders/docker' - name: 'gcr.io/cloud-builders/docker'
args: ['build', '-t', 'gcr.io/$PROJECT_ID/cloud-build-app:$SHORT_SHA', '.'] args: ['build', '-t', 'asia-east1-docker.pkg.dev/$PROJECT_ID/$_AR_REPO_NAME/cloud-build-app:latest', '.']
# Push the container image to Artifact Registry
- name: 'gcr.io/cloud-builders/docker'
args: ['push', 'asia-east1-docker.pkg.dev/$PROJECT_ID/$_AR_REPO_NAME/cloud-build-app:latest']
# Deploy to Cloud Run # Deploy to Cloud Run
- name: 'gcr.io/google.com/cloudsdktool/cloud-sdk' - name: 'gcr.io/google.com/cloudsdktool/cloud-sdk'
...@@ -21,7 +25,7 @@ steps: ...@@ -21,7 +25,7 @@ steps:
- 'deploy' - 'deploy'
- 'cloud-build-app' - 'cloud-build-app'
- '--image' - '--image'
- 'gcr.io/$PROJECT_ID/cloud-build-app:$SHORT_SHA' - 'asia-east1-docker.pkg.dev/$PROJECT_ID/$_AR_REPO_NAME/cloud-build-app:latest'
- '--region' - '--region'
- 'asia-east1' - 'asia-east1'
- '--platform' - '--platform'
...@@ -29,7 +33,7 @@ steps: ...@@ -29,7 +33,7 @@ steps:
- '--allow-unauthenticated' - '--allow-unauthenticated'
images: images:
- 'gcr.io/$PROJECT_ID/cloud-build-app:$SHORT_SHA' - 'asia-east1-docker.pkg.dev/$PROJECT_ID/$_AR_REPO_NAME/cloud-build-app:latest'
options: options:
logging: CLOUD_LOGGING_ONLY logging: CLOUD_LOGGING_ONLY
\ No newline at end of file
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment