Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces a new Cloud Build configuration file for the production deployment of the bonadocs-api service.
- Adds steps to build a Docker image, push it to the registry, and deploy it to Cloud Run.
- Specifies logging options via CLOUD_LOGGING_ONLY.
Comment on lines
+5
to
+10
| 'build', '-t', 'europe-west1-docker.pkg.dev/$PROJECT_ID/bonadocs-api/bonadocs-api:latest', '--build-arg', 'NPM_TOKEN=${_NPM_TOKEN}', '--build-arg', 'PORT=${_PORT}', '.' | ||
| ] | ||
|
|
||
| # Step 2: Push the image to Google Container Registry | ||
| - name: 'gcr.io/cloud-builders/docker' | ||
| args: ['push', 'europe-west1-docker.pkg.dev/$PROJECT_ID/bonadocs-api/bonadocs-api:latest'] |
There was a problem hiding this comment.
Consider using dynamic image tagging (e.g., based on commit hash or version number) instead of 'latest' to improve traceability and avoid potential issues with image caching in production deployments.
Suggested change
| 'build', '-t', 'europe-west1-docker.pkg.dev/$PROJECT_ID/bonadocs-api/bonadocs-api:latest', '--build-arg', 'NPM_TOKEN=${_NPM_TOKEN}', '--build-arg', 'PORT=${_PORT}', '.' | |
| ] | |
| # Step 2: Push the image to Google Container Registry | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ['push', 'europe-west1-docker.pkg.dev/$PROJECT_ID/bonadocs-api/bonadocs-api:latest'] | |
| 'build', '-t', 'europe-west1-docker.pkg.dev/$PROJECT_ID/bonadocs-api/bonadocs-api:${SHORT_SHA}', '--build-arg', 'NPM_TOKEN=${_NPM_TOKEN}', '--build-arg', 'PORT=${_PORT}', '.' | |
| ] | |
| # Step 2: Push the image to Google Container Registry | |
| - name: 'gcr.io/cloud-builders/docker' | |
| args: ['push', 'europe-west1-docker.pkg.dev/$PROJECT_ID/bonadocs-api/bonadocs-api:${SHORT_SHA}'] |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.