Convert deprecated gcloud --regexp flag into --filter

This commit is contained in:
Jeff Grafton 2017-09-07 14:39:38 -07:00
parent 7e5d2df299
commit b310b328d1

View File

@ -1833,7 +1833,8 @@ function set-replica-name() {
#
# $1: project
function get-template() {
gcloud compute instance-templates list -r "${NODE_INSTANCE_PREFIX}-template(-(${KUBE_RELEASE_VERSION_DASHED_REGEX}|${KUBE_CI_VERSION_DASHED_REGEX}))?" \
gcloud compute instance-templates list \
--filter="name ~ '${NODE_INSTANCE_PREFIX}-template(-(${KUBE_RELEASE_VERSION_DASHED_REGEX}|${KUBE_CI_VERSION_DASHED_REGEX}))?'" \
--project="${1}" --format='value(name)'
}