Skip to content

Commit 4503654

Browse files
Fixed Kustomize downloader (#628)
Fixed Kustomize downloader
1 parent c51a69c commit 4503654

File tree

2 files changed

+11
-1
lines changed

2 files changed

+11
-1
lines changed

.github/workflows/openshift-upgrade-test.yaml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,10 +39,15 @@ jobs:
3939
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.6/opm-linux.tar.gz -O opm.tar.gz -q
4040
tar xvf opm.tar.gz
4141
chmod +x opm && sudo mv opm /usr/local/bin/opm
42+
4243
wget https://mirror.openshift.com/pub/openshift-v4/x86_64/clients/ocp/latest-4.6/openshift-client-linux.tar.gz -O openshift.tar.gz -q
4344
tar xvf openshift.tar.gz
4445
chmod +x oc && sudo mv oc /usr/local/bin/oc
4546
47+
wget https://github.com/kubernetes-sigs/kustomize/releases/download/kustomize%2Fv4.5.7/kustomize_v4.5.7_linux_amd64.tar.gz -O kustomize.tar.gz -q
48+
tar xvf kustomize.tar.gz
49+
chmod +x kustomize && mkdir -p ./bin/ && mv kustomize ./bin/kustomize
50+
4651
opm version
4752
oc version
4853

Makefile

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,12 @@ controller-gen: ## Download controller-gen locally if necessary
145145
.PHONY: kustomize
146146
KUSTOMIZE = $(shell pwd)/bin/kustomize
147147
kustomize: ## Download kustomize locally if necessary
148-
$(call go-get-tool,$(KUSTOMIZE),sigs.k8s.io/kustomize/kustomize/[email protected])
148+
ifeq ("$(wildcard $(KUSTOMIZE))", "")
149+
rm -f ./kustomize
150+
wget "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" -O kinstall.sh
151+
chmod +x ./kinstall.sh && bash -c ./kinstall.sh && mv ./kustomize $(GOBIN)/kustomize
152+
rm -f ./kinstall.sh
153+
endif
149154

150155
# go-get-tool will 'go install' any package $2 and install it to $1.
151156
PROJECT_DIR := $(shell dirname $(abspath $(lastword $(MAKEFILE_LIST))))

0 commit comments

Comments
 (0)