deploy: add update-traffic command to frontend deploy
To match the private repo, added an additional step to the
public deploy script.
Trust: Jamal Carvalho
Run-TryBot: Jamal Carvalho
@@ -25,6 +25,10 @@ main() {
check_env $env
check_image $image
gcloud run deploy --quiet --region us-central1 $env-frontend --image $image
+ # If there was a rollback, `gcloud run deploy` will create a revision but
+ # not point traffic to it. The following command ensures that the new revision
+ # will get traffic.
+ gcloud run services update-traffic $env-frontend --to-latest
local tok=$(private/devtools/idtoken.sh $env)
local hdr="Authorization: Bearer $tok"
# Clear the redis cache
