1
0
Fork 0
mirror of https://github.com/kyverno/kyverno.git synced 2024-12-15 17:51:20 +00:00
kyverno/scripts/create-e2e-infrastruture.sh
XDRAGON2002 25f8d4498b
[Feature] Pin Dependencies by Hash (#5168)
* pin dependencies by hash

Signed-off-by: Anant Vijay <anantvijay3@gmail.com>

* pin scripts

Signed-off-by: Anant Vijay <anantvijay3@gmail.com>

Signed-off-by: Anant Vijay <anantvijay3@gmail.com>
Co-authored-by: shuting <shuting@nirmata.com>
Co-authored-by: Charles-Edouard Brétéché <charled.breteche@gmail.com>
2022-11-07 08:59:26 +00:00

27 lines
859 B
Bash
Executable file

#!/bin/sh
set -e
pwd=$(pwd)
hash=$(git describe --match "[0-9].[0-9]-dev*")
#
## Install Kind
curl -Lo "$pwd"/kind https://kind.sigs.k8s.io/dl/v0.11.0/kind-linux-amd64
chmod a+x "$pwd"/kind
## Create Kind Cluster
if [ -z "${KIND_IMAGE}" ]; then
"$pwd"/kind create cluster
else
"$pwd"/kind create cluster --image="${KIND_IMAGE}"
fi
"$pwd"/kind load docker-image ghcr.io/kyverno/kyverno:"$hash"
"$pwd"/kind load docker-image ghcr.io/kyverno/kyvernopre:"$hash"
pwd=$(pwd)
cd "$pwd"/config
echo "Installing kustomize"
curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/56d82a8378dfc8dc3b3b1085e5a6e67b82966bd7/hack/install_kustomize.sh" | bash # v4.5.7
kustomize edit set image ghcr.io/kyverno/kyverno:"$hash"
kustomize edit set image ghcr.io/kyverno/kyvernopre:"$hash"
kustomize build "$pwd"/config/ -o "$pwd"/config/install.yaml