Skip to content

Commit

Permalink
adding an cloud run example
Browse files Browse the repository at this point in the history
  • Loading branch information
panperla committed May 21, 2024
1 parent 69a1058 commit 8e4acf2
Showing 1 changed file with 25 additions and 0 deletions.
25 changes: 25 additions & 0 deletions examples/cloudrun/cloudbuild.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
steps:
- name: 'gcr.io/cloud-builders/docker'
entrypoint: 'bash'
args: ['-c','docker build --no-cache -t gcr.io/$PROJECT_ID/${_APP_NAME}:$SHORT_SHA .']
- name: 'gcr.io/cloud-builders/docker'
args: ['push','gcr.io/$PROJECT_ID/${_APP_NAME}:$SHORT_SHA']
- name: 'gcr.io/cloud-builders/gcloud'
args:
- 'beta'
- 'run'
- 'deploy'
- '${_APP_NAME}'
- '--image=gcr.io/$PROJECT_ID/${_APP_NAME}:$SHORT_SHA'
- '--set-env-vars=REAMAZE_EMAIL=$_REAMAZE_EMAIL,REAMAZE_BRAND=$_REAMAZE_BRAND,REAMAZE_CATEGORY=$_REAMAZE_CATEGORY'
- '--set-secrets=REAMAZE_API_TOKEN=${_REAMAZE_API_TOKEN_SECRET_NAME}'
- '--region=${_REGION}'
- '--platform=managed'
- '--allow-unauthenticated'
substitutions:
_APP_NAME: "yourendpointservicename"
_REAMAZE_EMAIL: "[email protected]"
_REAMAZE_API_TOKEN_SECRET_NAME: "reamaze_api_token:latest"
_REAMAZE_BRAND: "somebrand"
_REAMAZE_CATEGORY: "reamazecategory"
_REGION: "europe-west4"

0 comments on commit 8e4acf2

Please sign in to comment.