diff --git a/scripts/ci.sh b/scripts/ci.sh index 7fd7a6764e..1d7284dcf3 100755 --- a/scripts/ci.sh +++ b/scripts/ci.sh @@ -17,7 +17,9 @@ $pwd/kind load docker-image nirmata/kyvernopre:$hash pwd=$(pwd) cd $pwd/definitions echo "Installing kustomize" -curl -s "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" | bash -s 3.8.6 +latest=$(curl -sL https://api.github.com/repos/kubernetes-sigs/kustomize/git/refs/tags/kustomize | jq '.[-1].ref' | grep -Eo '\d+\.\d+\.\d+') +curl -sLO "https://raw.githubusercontent.com/kubernetes-sigs/kustomize/master/hack/install_kustomize.sh" +bash ./install_kustomize.sh $latest chmod a+x $pwd/definitions/kustomize echo "Kustomize image edit" $pwd/definitions/kustomize edit set image nirmata/kyverno:$hash