diff --git a/Makefile b/Makefile index 0bdcc770c..dafe079af 100644 --- a/Makefile +++ b/Makefile @@ -71,7 +71,7 @@ ENVSUBST_VER := v1.4.2 ENVSUBST_BIN := envsubst ENVSUBST := $(TOOLS_BIN_DIR)/$(ENVSUBST_BIN) -GOLANGCI_LINT_VER := v1.55.2 +GOLANGCI_LINT_VER := v1.56.2 GOLANGCI_LINT_BIN := golangci-lint GOLANGCI_LINT := $(TOOLS_BIN_DIR)/$(GOLANGCI_LINT_BIN)-$(GOLANGCI_LINT_VER) @@ -199,7 +199,7 @@ test-junit: $(SETUP_ENVTEST) $(GOTESTSUM) ## Run tests with verbose setting and exit $$(cat $(ARTIFACTS)/junit.exitcode) .PHONY: test-e2e -test-e2e: ## Run the end-to-end tests +test-e2e: $(KUSTOMIZE) ## Run the end-to-end tests $(MAKE) test-e2e-run LOCAL_GINKGO_ARGS ?= @@ -214,7 +214,7 @@ test-e2e-local: ## Run e2e tests CONFORMANCE_E2E_ARGS ?= -kubetest.config-file=$(KUBETEST_CONF_PATH) CONFORMANCE_E2E_ARGS += $(E2E_ARGS) .PHONY: test-conformance -test-conformance: ## Run conformance test on workload cluster. +test-conformance: $(KUSTOMIZE) ## Run conformance test on workload cluster. $(MAKE) test-e2e-run GINKGO_FOCUS="Conformance Tests" E2E_ARGS='$(CONFORMANCE_E2E_ARGS)' GINKGO_ARGS='$(LOCAL_GINKGO_ARGS)' ## -------------------------------------- diff --git a/hack/ensure-kustomize.sh b/hack/ensure-kustomize.sh deleted file mode 100644 index 509676211..000000000 --- a/hack/ensure-kustomize.sh +++ /dev/null @@ -1,54 +0,0 @@ -#!/usr/bin/env bash - -# Copyright 2019 The Kubernetes Authors. -# -# Licensed under the Apache License, Version 2.0 (the "License"); -# you may not use this file except in compliance with the License. -# You may obtain a copy of the License at -# -# http://www.apache.org/licenses/LICENSE-2.0 -# -# Unless required by applicable law or agreed to in writing, software -# distributed under the License is distributed on an "AS IS" BASIS, -# 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 -o errexit -set -o nounset -set -o pipefail - -GOPATH_BIN="$(go env GOPATH)/bin/" -MINIMUM_KUSTOMIZE_VERSION=3.1.0 - -# Ensure the kustomize tool exists and is a viable version, or installs it -verify_kustomize_version() { - - # If kustomize is not available on the path, get it - if ! [ -x "$(command -v kustomize)" ]; then - if [[ "${OSTYPE}" == "linux"* ]]; then - echo 'kustomize not found, installing' - if ! [ -d "${GOPATH_BIN}" ]; then - mkdir -p "${GOPATH_BIN}" - fi - curl -sLo "${GOPATH_BIN}/kustomize" https://github.com/kubernetes-sigs/kustomize/releases/download/v${MINIMUM_KUSTOMIZE_VERSION}/kustomize_${MINIMUM_KUSTOMIZE_VERSION}_linux_amd64 - chmod +x "${GOPATH_BIN}/kustomize" - else - echo "Missing required binary in path: kustomize" - return 2 - fi - fi - - local kustomize_version - kustomize_version=$(kustomize version) - if [[ "${MINIMUM_KUSTOMIZE_VERSION}" != $(echo -e "${MINIMUM_KUSTOMIZE_VERSION}\n${kustomize_version}" | sort -s -t. -k 1,1 -k 2,2n -k 3,3n | head -n1) ]]; then - cat <