From e4cfb91bd973bcce9a87ff44b1e8e18bef4d0ddb Mon Sep 17 00:00:00 2001 From: Daniel Wang Date: Fri, 29 Jul 2016 10:27:57 -0700 Subject: [PATCH] e2e-runner: Remove quotes from jq output Recent GCI e2e test failures suggest that the image name was double quoted when passed to gcloud. E.g., ``` 09:59:51 - Invalid value for field 'resource.disks[0].initializeParams.sourceImage': 'https://www.googleapis.com/compute/v1/projects/container-vm-image-staging/global/images/"gci-base-53-8530-36-0"'. The referenced image resource cannot be found. ``` The `-r`, or `--raw-output` option strips quotes from jq's output. With this change, the output looks like: ``` + export KUBE_GCE_MASTER_IMAGE=gci-base-54-8650-0-0 # Not quoted ``` --- hack/jenkins/e2e-runner.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/hack/jenkins/e2e-runner.sh b/hack/jenkins/e2e-runner.sh index a6c0c22cf3..739c6d1482 100755 --- a/hack/jenkins/e2e-runner.sh +++ b/hack/jenkins/e2e-runner.sh @@ -184,8 +184,8 @@ function dump_cluster_logs() { function setup_gci_vars() { local -r gci_staging_project=container-vm-image-staging local -r image_info="$(gcloud compute images describe-from-family ${JENKINS_GCI_IMAGE_FAMILY} --project=${gci_staging_project} --format=json)" - local -r image_description="$(echo ${image_info} | jq '.description')" - local -r image_name="$(echo ${image_info} | jq '.name')" + local -r image_description="$(echo ${image_info} | jq -r '.description')" + local -r image_name="$(echo ${image_info} | jq -r '.name')" if [[ "${JENKINS_USE_GCI_VERSION:-}" =~ ^[yY]$ ]]; then # GCI QA jobs use the builtin k8s version.