1
0
mirror of https://github.com/hegerdes/gitlab-actions.git synced 2025-10-06 05:36:52 +02:00
Files
gitlab-actions/scripts/generated/kind-install.sh
Henrik Gerdes 49d905e089 feat: add helm docs install
Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
2025-01-31 22:33:08 +01:00

19 lines
691 B
Bash
Executable File

#!/bin/bash
# Check if kind is installed
if ! command -v kind > /dev/null; then
echo "Installing kind"
echo "You can set the desired version via KIND_VERSION. Default is latest"
if [ "$(uname -m)" = "x86_64" ]; then
ARCH=amd64
elif [ "$(uname -m)" = "aarch64" ]; then
ARCH=arm64
else
echo "Unknown system arch. Default to amd64"
fi
KIND_DEFAULT_VERSION=$(curl -sL https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r .tag_name)
curl -sL --fail --output /usr/local/bin/kind https://github.com/kubernetes-sigs/kind/releases/download/${KIND_VERSION-$KIND_DEFAULT_VERSION}/kind-linux-${ARCH-amd64}
chmod +x /usr/local/bin/kind
fi
kind version