Skip to content

Commit

Permalink
use kube::util::find-binary to find kubectl
Browse files Browse the repository at this point in the history
To centralize binary selection in k/k. Also drop the e2e.test copying
which is no longer needed according to the comment.
  • Loading branch information
mikedanese committed Sep 11, 2020
1 parent b7a4262 commit 29e025d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions hack/ci/e2e-k8s.sh
@@ -1,4 +1,4 @@
#!/bin/sh
#!/bin/bash
# Copyright 2018 The Kubernetes Authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
Expand Down Expand Up @@ -71,12 +71,12 @@ build_with_bazel() {
bazel shutdown || true
pkill ^bazel || true

# ensure the e2e script will find our binaries ...
# https://github.com/kubernetes/kubernetes/issues/68306
# TODO: remove this, it was fixed in 1.13+
mkdir -p '_output/bin/'
cp 'bazel-bin/test/e2e/e2e.test' '_output/bin/'
PATH="$(dirname "$(find "${PWD}/bazel-bin/" -name kubectl -type f)"):${PATH}"
local kubectl_path
# This is run from k/k root, so shellcheck shouldn't expect to be able to
# follow hack/lib/util.sh.
# shellcheck disable=SC1091
kubectl_path="$(source hack/lib/util.sh; kube::util::find-binary '.test')"
PATH="$(dirname "${kubectl_path}"):${PATH}"
export PATH
}

Expand Down

0 comments on commit 29e025d

Please sign in to comment.