From 64a42c7c726846f543c5c1138cde3d5a424c221e Mon Sep 17 00:00:00 2001 From: Victor Vrantchan Date: Mon, 10 Apr 2017 09:34:49 -0400 Subject: [PATCH] update circle-ci deployment dependencies (#1477) changes to the gcloud dependencies and circle ci image broke the deployment steps. disabled caching for now and updated how kubectl runs. --- circle.yml | 2 +- tools/ci/deploy-k8s-testing.sh | 13 +++++++------ tools/ci/setup-build-environment.sh | 1 + 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/circle.yml b/circle.yml index f60d96f327..f0c11b5034 100644 --- a/circle.yml +++ b/circle.yml @@ -21,7 +21,7 @@ dependencies: - "vendor" - "node_modules" - "~/deps" - - "/opt/google-cloud-sdk" + # - "/opt/google-cloud-sdk" override: # workaround for https://github.com/yarnpkg/yarn/issues/1981 diff --git a/tools/ci/deploy-k8s-testing.sh b/tools/ci/deploy-k8s-testing.sh index 4fac6201cc..b3457b4bb4 100755 --- a/tools/ci/deploy-k8s-testing.sh +++ b/tools/ci/deploy-k8s-testing.sh @@ -3,6 +3,7 @@ REVSHORT="$(git rev-parse --short HEAD)" exec_template="/home/ubuntu/deps/exec-template" slacktee="/home/ubuntu/deps/slacktee" +kubectl="/opt/google-cloud-sdk/bin/kubectl" start_cloudsql_proxy() { @@ -68,11 +69,11 @@ deploy_pr() { $exec_template -json="$jsn" -template=./tools/ci/k8s-templates/redis-pr-service.template > /tmp/redis-service.yml $exec_template -json="$jsn" -template=./tools/ci/k8s-templates/redis-pr-deployment.template > /tmp/redis-deployment.yml - kubectl apply -f /tmp/service.yml - kubectl apply -f /tmp/deployment.yml + sudo $kubectl apply -f /tmp/service.yml + sudo $kubectl apply -f /tmp/deployment.yml - kubectl apply -f /tmp/redis-service.yml - kubectl apply -f /tmp/redis-deployment.yml + sudo $kubectl apply -f /tmp/redis-service.yml + sudo $kubectl apply -f /tmp/redis-deployment.yml echo "Deployed PR ${CIRCLE_PR_NUMBER}, commit ${CIRCLE_SHA1}" | \ $slacktee \ @@ -91,8 +92,8 @@ deploy_branch() { $exec_template -json="$jsn" -template=./tools/ci/k8s-templates/branch-service.template > /tmp/service.yml $exec_template -json="$jsn" -template=./tools/ci/k8s-templates/branch-deployment.template > /tmp/deployment.yml - kubectl apply -f /tmp/deployment.yml - kubectl apply -f /tmp/service.yml + sudo $kubectl apply -f /tmp/deployment.yml + sudo $kubectl apply -f /tmp/service.yml echo "Deployed Branch ${branch}, commit ${CIRCLE_SHA1}" | \ $slacktee \ diff --git a/tools/ci/setup-build-environment.sh b/tools/ci/setup-build-environment.sh index 8a316e25d1..bbbeb1cae2 100755 --- a/tools/ci/setup-build-environment.sh +++ b/tools/ci/setup-build-environment.sh @@ -14,6 +14,7 @@ setup_gcloud() { sudo chown -R ubuntu:ubuntu /home/ubuntu/.kube } + setup_gcloud # configure slack notification webhooks