Skip to content

Create cloudbuild.prod.yaml#32

Merged
staa99 merged 1 commit intomainfrom
develop
Jun 30, 2025
Merged

Create cloudbuild.prod.yaml#32
staa99 merged 1 commit intomainfrom
develop

Conversation

@staa99
Copy link
Copy Markdown
Contributor

@staa99 staa99 commented Jun 30, 2025

No description provided.

@staa99 staa99 requested a review from Copilot June 30, 2025 07:11
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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']
Copy link

Copilot AI Jun 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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}']

Copilot uses AI. Check for mistakes.
@staa99 staa99 merged commit d51ab46 into main Jun 30, 2025
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants