Skip to content

Commit

Permalink
Do not prompt for user feedback (#1043)
Browse files Browse the repository at this point in the history
* Do not prompt for feedback
* Rename script to self-describe
  • Loading branch information
stephen-soltesz authored Jan 4, 2022
1 parent 18195fc commit 8a7deb0
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
2 changes: 1 addition & 1 deletion cloudbuild.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -144,5 +144,5 @@ steps:
- name: gcr.io/google.com/cloudsdktool/cloud-sdk
id: "Delete non-serving appengine versions"
args: [
'bash', '-c', './delete-appengine.sh'
'bash', '-c', './delete-appengine-services.sh'
]
13 changes: 8 additions & 5 deletions delete-appengine.sh → delete-appengine-services.sh
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
#!/bin/bash
#
# delete-appengine.sh deletes all service versions after the 9 most recently
# deployed versions with zero traffic split. This script is meant to run as a
# late step of the cloudbuild deployment. Running this regularly will keep the
# number of versions around 10 per service (for rollbacks) and below 210
# globally (the hard limit imposed by AppEngine).
# delete-appengine-services.sh deletes all service versions after the 9 most
# recently deployed versions with zero traffic split. This script is meant to
# run as a late step of the cloudbuild deployment. Running this regularly will
# keep the number of versions around 10 per service (for rollbacks) and below
# 210 globally (the hard limit imposed by AppEngine).

# Example: Below is example output from `gcloud app versions list`. The
# 'TRAFFIC_SPLIT' determines whether any traffic is directed to this service.
Expand Down Expand Up @@ -32,6 +32,9 @@
# default 20210420t174553 0.00 2021-04-20T13:46:37-04:00 SERVING
# default 20210409t180654 0.00 2021-04-09T14:07:38-04:00 SERVING

# Do not prompt user for feedback.
gcloud config set core/disable_prompts true

# Delete service versions after the most recent 9 with a zero traffic split.
# NOTE: any service version with a non-zero traffic split is never deleted.
gcloud --project=${PROJECT_ID} \
Expand Down

0 comments on commit 8a7deb0

Please sign in to comment.