Skip to content

Commit

Permalink
feat: enable Cloud Run deploys
Browse files Browse the repository at this point in the history
  • Loading branch information
ngurenyaga committed Jul 12, 2021
1 parent 6d7012f commit 023f78f
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
steps:
# build the container image
- name: "gcr.io/cloud-builders/docker"
args:
[
Expand All @@ -7,5 +8,24 @@ steps:
"europe-west1-docker.pkg.dev/$PROJECT_ID/sghi/mle:$COMMIT_SHA",
".",
]

# Push the container image to Container Registry
- name: "gcr.io/cloud-builders/docker"
args:
["push", "europe-west1-docker.pkg.dev/$PROJECT_ID/sghi/mle:$COMMIT_SHA"]

# Deploy an image from Container Registry to Cloud Run
- name: 'gcr.io/cloud-builders/gcloud'
args: [
'run',
'deploy',
'mle',
'--image', 'europe-west1-docker.pkg.dev/$PROJECT_ID/sghi/mle:$COMMIT_SHA',
'--region', 'europe-west1',
'--platform', 'managed',
'--allow-unauthenticated',
'--update-env-vars', 'SENTRY_ENVIRONMENT=prod,COMPRESS_ENABLED=true,DJANGO_DEBUG=false'
]

images:
- "europe-west1-docker.pkg.dev/$PROJECT_ID/sghi/mle:$COMMIT_SHA"

0 comments on commit 023f78f

Please sign in to comment.