From 6a4a5fd1dbd83e6679de0f438506b2edc2b8b163 Mon Sep 17 00:00:00 2001 From: I308301 Date: Fri, 6 Dec 2019 14:40:20 +0530 Subject: [PATCH] Added binaries required by kubebuilder test setup --- .ci/test | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/.ci/test b/.ci/test index 7d1723dc1..9eba875d7 100755 --- a/.ci/test +++ b/.ci/test @@ -12,7 +12,7 @@ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. -set -e +set -ex # For the test step concourse will set the following environment variables: # SOURCE_PATH - path to component repository root directory. @@ -51,6 +51,20 @@ go get -u github.com/onsi/ginkgo/ginkgo ############################################################################### +# Install Kubebuilder test dependencies +OS=$(go env GOOS) +ARCH=$(go env GOARCH) + +# download kubebuilder and extract it to tmp +curl -sL https://go.kubebuilder.io/dl/2.2.0/${OS}/${ARCH} | tar -xz -C /tmp/ + +# move to a long-term location and put it on your path +# (you'll need to set the KUBEBUILDER_ASSETS env var if you put it somewhere else) +mv /tmp/kubebuilder_2.2.0_${OS}_${ARCH} /usr/local/kubebuilder +export PATH=$PATH:/usr/local/kubebuilder/bin + +############################################################################### + function test_with_coverage() { echo "[INFO] Test coverage is enabled." local output_dir=test/output