Skip to content

Commit

Permalink
perfdash: add deploy target to Makefile.
Browse files Browse the repository at this point in the history
Also make deploy.sh to use temp directory, which is removed by the script fully.
  • Loading branch information
oxddr committed Mar 3, 2020
1 parent ec638ce commit 4f5aa9b
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 deletions.
3 changes: 3 additions & 0 deletions perfdash/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -27,5 +27,8 @@ container: perfdash
push: container
gcloud docker -s $(REPO) -- push $(REPO)/perfdash:$(TAG)

deploy: container
./deploy.sh

clean:
rm -f perfdash
19 changes: 12 additions & 7 deletions perfdash/deploy.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,14 +14,19 @@
# See the License for the specific language governing permissions and
# limitations under the License.

set -euxo pipefail
set -euo pipefail
set -x

KUBECONFIG=$HOME/.kube/config-tmp-mungegithub-$(date +%F_%H_%M_%S)
tmp_kube=$(mktemp -d -t "kube-$(date +%F_%H-%M-%S)_XXXX")

KUBECONFIG="$tmp_kube/config"
export KUBECONFIG

gcloud container --verbosity=debug \
clusters get-credentials mungegithub --zone us-central1-b \
--project k8s-mungegithub
gcloud container clusters get-credentials \
mungegithub \
--zone us-central1-b \
--project k8s-mungegithub \
--verbosity=debug

kubectl apply -f "${GOPATH}"/src/k8s.io/perf-tests/perfdash/deployment.yaml
rm "${KUBECONFIG}"
kubectl apply -f "${GOPATH}/src/k8s.io/perf-tests/perfdash/deployment.yaml"
rm -rf "$tmp_kube"

0 comments on commit 4f5aa9b

Please sign in to comment.