Merge pull request #25173 from ixdy/gcloud-grep-awk-cut

Automatic merge from submit-queue

Use --format='value(name)' with gcloud instead of grep/awk/cut

Fixing our fragile parsing of `gcloud` is getting old (#24746, #25159, maybe others?).

Instead, let's just get the proper output out of `gcloud` in the first place.
This commit is contained in:
k8s-merge-robot
2016-05-15 07:46:28 -07:00
4 changed files with 27 additions and 48 deletions

View File

@@ -34,10 +34,7 @@ function fetch_output_tars() {
}
function fetch_server_version_tars() {
local -r msg=$(gcloud ${CMD_GROUP:-} container get-server-config --project=${PROJECT} --zone=${ZONE} | grep defaultClusterVersion)
# msg will look like "defaultClusterVersion: 1.0.1". Strip
# everything up to, including ": "
local -r build_version="v${msg##*: }"
local -r build_version="v$(gcloud ${CMD_GROUP:-} container get-server-config --project=${PROJECT} --zone=${ZONE} --format='value(defaultClusterVersion)')"
fetch_tars_from_gcs "release" "${build_version}"
unpack_binaries
}