1
0
Fork 0
mirror of https://github.com/kubernetes-sigs/node-feature-discovery.git synced 2025-03-05 08:17:04 +00:00

scripts/test-infra: verify buildability of kustomize overlays

Not perfect and fool proof evidence but better than nothing.
This commit is contained in:
Markus Lehtonen 2021-08-24 17:01:24 +03:00
parent e16d4c9b20
commit 8132d17f89

View file

@ -1,11 +1,16 @@
#!/bin/bash -e
# Install deps
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.36.0
gobinpath="$(go env GOPATH)/bin"
curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b "$gobinpath" v1.36.0
export PATH=$PATH:$(go env GOPATH)/bin
curl -sfL https://raw.githubusercontent.com/helm/helm/master/scripts/get-helm-3 | bash -s -- --version v3.5.2
kubectl="$gobinpath/kubectl"
curl -L https://dl.k8s.io/release/v1.22.1/bin/linux/amd64/kubectl -o "$kubectl"
chmod 755 "$kubectl"
# Run verify steps
make gofmt-verify
make ci-lint
@ -23,3 +28,13 @@ if ! git diff --quiet; then
echo "Deployment templates are not up-to-date. Run 'make templates' to update"
exit 1
fi
# Check that the kustomize overlays are buildable
for d in `ls deployment/overlays/* -d`; do
if [ "`basename $d`" = "samples" ]; then
continue
fi
echo "Verifying $d"
kubectl kustomize $d > /dev/null
done