Skip to content

Commit

Permalink
feat: send traffic to latest revision
Browse files Browse the repository at this point in the history
If the traffic is ever sent to one of the previous revisions in the Cloud Run interface, deployment doesn't automatically send traffic to latest. This line makes sure that the traffic is sent to latest irrespective of any previous changes. Soon I'd like to make this optional.
  • Loading branch information
stefda committed Feb 27, 2021
1 parent 66c894e commit d57a805
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,11 @@ gcloud auth configure-docker

docker push "$INPUT_IMAGE"

gcloud beta run deploy "$INPUT_SERVICE" \
gcloud run deploy "$INPUT_SERVICE" \
--image "$INPUT_IMAGE" \
--region "$INPUT_REGION" \
--platform managed \
--allow-unauthenticated \
${ENV_FLAG}

gcloud run services update-traffic "$INPUT_SERVICE" --to-latest

0 comments on commit d57a805

Please sign in to comment.