-
Notifications
You must be signed in to change notification settings - Fork 95
Expand file tree
/
Copy pathinstall-ci-tools
More file actions
executable file
·58 lines (47 loc) · 1.81 KB
/
Copy pathinstall-ci-tools
File metadata and controls
executable file
·58 lines (47 loc) · 1.81 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/bin/bash
set -e
KIND_VERSION="0.31.0" # https://github.com/kubernetes-sigs/kind/releases
HELM_VERSION="3.20.0" # https://github.com/helm/helm/releases
UV_VERSION="0.10.7" # https://github.com/astral-sh/uv/releases
# Determine the platform we are running on
OS=$(uname | tr '[:upper:]' '[:lower:]')
# Set up a bin location
mkdir -p /tmp/bin
PATH=/tmp/bin:$PATH
# Save our current directory so we can come back
CURRENT_DIR="${PWD}"
cd /tmp
echo "Installing Kubernetes in Docker (kind) version ${KIND_VERSION}..."
if [[ -f /tmp/bin/kind ]]; then
echo "Already installed in /tmp/bin. Skipping!"
else
curl -Lo ./kind "https://github.com/kubernetes-sigs/kind/releases/download/v${KIND_VERSION}/kind-${OS}-amd64" > /dev/null 2>&1
chmod +x ./kind
mv ./kind /tmp/bin/
fi
echo "Installing Helm version ${HELM_VERSION}..."
if [[ -f /tmp/bin/helm ]]; then
echo "Already installed in /tmp/bin. Skipping!"
else
wget "https://get.helm.sh/helm-v${HELM_VERSION}-${OS}-amd64.tar.gz" > /dev/null 2>&1
tar -zxvf "./helm-v${HELM_VERSION}-${OS}-amd64.tar.gz"
mv "${OS}-amd64/helm" /tmp/bin/
fi
# Add stable helm repo
helm repo add stable https://charts.helm.sh/stable
echo "Installing the latest, stable kubectl..."
if [[ -f /tmp/bin/kubectl ]]; then
echo "Already installed in /tmp/bin. Skipping!"
else
cd /tmp/bin
curl -LO "https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/${OS}/amd64/kubectl" > /dev/null 2>&1
chmod +x ./kubectl
fi
echo "Installing uv version ${UV_VERSION}..."
if [[ -f /tmp/bin/uv ]]; then
echo "Already installed in /tmp/bin. Skipping!"
else
curl --proto '=https' --tlsv1.2 -LsSf https://github.com/astral-sh/uv/releases/download/${UV_VERSION}/uv-installer.sh | sh
mv "$HOME/.local/bin/uv" /tmp/bin/
fi
cd "$CURRENT_DIR"