diff --git a/Dockerfile.e2e-test b/Dockerfile.e2e-test index 8faffefe26..2f730a432c 100644 --- a/Dockerfile.e2e-test +++ b/Dockerfile.e2e-test @@ -14,8 +14,10 @@ FROM debian:9 -COPY cmd/e2e-test/run.sh /run.sh ADD bin/ARG_ARCH/ARG_BIN /ARG_BIN -RUN apt-get update && apt-get update && apt-get install curl -y + +COPY cmd/e2e-test/run.sh /run.sh +RUN apt-get update && apt-get install -y curl python +RUN curl https://dl.google.com/dl/cloudsdk/channels/rapid/downloads/google-cloud-sdk-206.0.0-linux-x86_64.tar.gz | tar -zxf - ENTRYPOINT ["/run.sh"] diff --git a/cmd/e2e-test/run.sh b/cmd/e2e-test/run.sh index f773f1d379..c2fcfefc64 100755 --- a/cmd/e2e-test/run.sh +++ b/cmd/e2e-test/run.sh @@ -17,6 +17,7 @@ # run.sh manages the settings required for running containerized in a # Kubernetes cluster. echo '--- BEGIN ---' + for ATTEMPT in $(seq 60); do PROJECT=$(curl -H'Metadata-Flavor:Google' metadata.google.internal/computeMetadata/v1/project/project-id 2>/dev/null) if [[ -n "$PROJECT" ]]; then @@ -44,11 +45,12 @@ echo ${CMD} "$@" 2>&1 echo +GCLOUD=/google-cloud-sdk/bin/gcloud RESOURCES="forwarding-rules target-http-proxies target-https-proxies url-maps backend-services" for RES in ${RESOURCES}; do echo ============================================================================== echo "GCP RESOURCE: ${RES}" - gcloud compute ${RES} list --project ${PROJECT} --format yaml + ${GCLOUD} compute ${RES} list --quiet --project ${PROJECT} --format yaml 2>&1 done echo ==============================================================================