Skip to content

Commit

Permalink
feat: automatically update the traffic to the latest revision (#22)
Browse files Browse the repository at this point in the history
Signed-off-by: Otieno Calvine <nyarangaotieno@gmail.com>
  • Loading branch information
NYARAS committed Jul 29, 2021
1 parent e25d235 commit 9d4e456
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,20 @@ steps:
'--timeout', '59m59s'
]

# Automatically update the traffic to the latest revision
# This will update the latest revision to serve 100% traffic
- name: 'gcr.io/cloud-builders/gcloud'
args: [
'beta',
'run',
'update-traffic',
"${_SERVICE_NAME}",
'--to-latest',
'--region', 'europe-west1',
'--platform', 'managed',
'--allow-unauthenticated',
]

images:
- 'eu.gcr.io/$PROJECT_ID/${_SERVICE_NAME}:$COMMIT_SHA'

Expand Down

0 comments on commit 9d4e456

Please sign in to comment.