Update test of examples against new releases.

This commit is contained in:
jregan
2020-12-10 12:31:14 -08:00
parent 826b5d9792
commit 97e4353755
2 changed files with 28 additions and 14 deletions

View File

@@ -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}."