2020-10-07 13:49:40 +05:00
|
|
|
#!/bin/bash -e
|
2019-12-13 09:48:00 -05:00
|
|
|
################################################################################
|
|
|
|
|
## File: kind.sh
|
|
|
|
|
## Desc: Installs kind
|
|
|
|
|
################################################################################
|
|
|
|
|
|
|
|
|
|
# Install KIND
|
2020-05-28 19:30:28 +03:00
|
|
|
URL=$(curl -s https://api.github.com/repos/kubernetes-sigs/kind/releases/latest | jq -r '.assets[].browser_download_url | select(contains("kind-linux-amd64"))')
|
|
|
|
|
curl -L -o /usr/local/bin/kind $URL
|
2019-12-13 09:48:00 -05:00
|
|
|
chmod +x /usr/local/bin/kind
|
|
|
|
|
|
|
|
|
|
# Run tests to determine that the software installed as expected
|
|
|
|
|
echo "Testing to make sure that script performed as expected, and basic scenarios work"
|
|
|
|
|
if ! command -v kind; then
|
|
|
|
|
echo "Kind was not installed or found on PATH"
|
|
|
|
|
exit 1
|
|
|
|
|
fi
|