Skip to content

Commit

Permalink
Merge pull request #361 from bowei/fix-missing-gcloud
Browse files Browse the repository at this point in the history
Fix missing gcloud command in e2e script
  • Loading branch information
bowei authored Jun 23, 2018
2 parents c1a9af3 + 6ace832 commit 230c102
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 4 additions & 2 deletions Dockerfile.e2e-test
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
4 changes: 3 additions & 1 deletion cmd/e2e-test/run.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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 ==============================================================================
Expand Down

0 comments on commit 230c102

Please sign in to comment.