From fbceeb1770b4d9b37563860a30ce72ac765b2991 Mon Sep 17 00:00:00 2001 From: jregan Date: Thu, 14 May 2020 19:18:25 -0700 Subject: [PATCH] Fix verify-kustomize target in Makefile --- Makefile | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) diff --git a/Makefile b/Makefile index 17da4497a..d9f9e182d 100644 --- a/Makefile +++ b/Makefile @@ -14,8 +14,11 @@ all: verify-kustomize verify-kustomize: \ lint-kustomize \ test-unit-kustomize-all \ - test-examples-kustomize-against-HEAD \ - test-examples-kustomize-against-latest + test-examples-kustomize-against-HEAD +# TODO: restore test-examples-kustomize-against-3.5.5 \ +# once it works. Likely have to fix and release 3.6 +# test-examples-kustomize-against-3.5.4 no longer works because +# the examples tests features not in 3.5.4 # The following target referenced by a file in # https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kustomize @@ -233,17 +236,32 @@ test-examples-kustomize-against-HEAD: $(MYGOBIN)/kustomize $(MYGOBIN)/mdrip ./hack/testExamplesAgainstKustomize.sh HEAD .PHONY: -test-examples-kustomize-against-latest: $(MYGOBIN)/mdrip +test-examples-kustomize-against-3.5.4: $(MYGOBIN)/mdrip ( \ set -e; \ + tag=v3.5.4; \ /bin/rm -f $(MYGOBIN)/kustomize; \ - echo "Installing kustomize from latest."; \ - GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3@v3.5.4; \ - ./hack/testExamplesAgainstKustomize.sh latest; \ + echo "Installing kustomize $$tag."; \ + GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3@$${tag}; \ + ./hack/testExamplesAgainstKustomize.sh $$tag; \ echo "Reinstalling kustomize from HEAD."; \ cd kustomize; go install .; \ ) +.PHONY: +test-examples-kustomize-against-3.5.5: $(MYGOBIN)/mdrip + ( \ + set -e; \ + tag=v3.5.5; \ + /bin/rm -f $(MYGOBIN)/kustomize; \ + echo "Installing kustomize $$tag."; \ + GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3@$${tag}; \ + ./hack/testExamplesAgainstKustomize.sh $$tag; \ + echo "Reinstalling kustomize from HEAD."; \ + cd kustomize; go install .; \ + ) + + # linux only. # This is for testing an example plugin that # uses kubeval for validation.