mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-05-17 18:25:26 +00:00
Update test of examples against new releases.
This commit is contained in:
23
Makefile
23
Makefile
@@ -26,7 +26,8 @@ verify-kustomize: \
|
||||
lint-kustomize \
|
||||
test-unit-kustomize-all \
|
||||
test-examples-kustomize-against-HEAD \
|
||||
test-examples-kustomize-against-3.8.6
|
||||
test-examples-kustomize-against-3.9.0 \
|
||||
test-examples-kustomize-against-3.8.8
|
||||
|
||||
# The following target referenced by a file in
|
||||
# https://github.com/kubernetes/test-infra/tree/master/config/jobs/kubernetes-sigs/kustomize
|
||||
@@ -38,7 +39,8 @@ prow-presubmit-check: \
|
||||
test-unit-cmd-all \
|
||||
test-go-mod \
|
||||
test-examples-kustomize-against-HEAD \
|
||||
test-examples-kustomize-against-3.8.6
|
||||
test-examples-kustomize-against-3.9.0 \
|
||||
test-examples-kustomize-against-3.8.8
|
||||
|
||||
.PHONY: verify-kustomize-e2e
|
||||
verify-kustomize-e2e: test-examples-e2e-kustomize
|
||||
@@ -274,17 +276,12 @@ test-examples-kustomize-against-HEAD: $(MYGOBIN)/kustomize $(MYGOBIN)/mdrip
|
||||
./hack/testExamplesAgainstKustomize.sh HEAD
|
||||
|
||||
.PHONY:
|
||||
test-examples-kustomize-against-3.8.6: $(MYGOBIN)/mdrip
|
||||
( \
|
||||
set -e; \
|
||||
tag=v3.8.6; \
|
||||
/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 .; \
|
||||
)
|
||||
test-examples-kustomize-against-3.9.0: $(MYGOBIN)/mdrip
|
||||
./hack/testExamplesAgainstKustomize.sh v3.9.0
|
||||
|
||||
.PHONY:
|
||||
test-examples-kustomize-against-3.8.8: $(MYGOBIN)/mdrip
|
||||
./hack/testExamplesAgainstKustomize.sh v3.8.8
|
||||
|
||||
# linux only.
|
||||
# This is for testing an example plugin that
|
||||
|
||||
@@ -12,11 +12,22 @@ version=$1
|
||||
# All hack scripts should run from top level.
|
||||
. hack/shellHelpers.sh
|
||||
|
||||
echo "Installing kustomize ${version}"
|
||||
|
||||
# Always rebuild, never assume the installed verion is
|
||||
# the right one to test.
|
||||
rm -f $(go env GOPATH)/bin/kustomize
|
||||
if [ "$version" == "HEAD" ]; then
|
||||
(cd kustomize; go install .)
|
||||
else
|
||||
GO111MODULE=on go get sigs.k8s.io/kustomize/kustomize/v3@${version}
|
||||
fi
|
||||
|
||||
# TODO: change the label?
|
||||
# We test against the latest release, and HEAD, and presumably
|
||||
# any branch using this label, so it should probably get
|
||||
# a new value.
|
||||
mdrip --mode test --blockTimeOut 9m \
|
||||
mdrip --mode test --blockTimeOut 15m \
|
||||
--label testAgainstLatestRelease examples
|
||||
|
||||
# TODO: make work for non-linux
|
||||
@@ -28,4 +39,10 @@ if onLinuxAndNotOnRemoteCI; then
|
||||
mdrip --mode test --label helmtest examples/chart.md
|
||||
fi
|
||||
|
||||
# Force outside logic to rebuild kustomize rather than
|
||||
# rely on whatever this script just did. Tests should
|
||||
# be order independent.
|
||||
echo "Removing kustomize ${version}"
|
||||
rm $(go env GOPATH)/bin/kustomize
|
||||
|
||||
echo "Example tests passed against ${version}."
|
||||
|
||||
Reference in New Issue
Block a user