1
0
mirror of https://github.com/hegerdes/gitlab-actions.git synced 2025-10-06 05:36:52 +02:00

feat: add argocd-cli & minikube install snippets

Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
This commit is contained in:
Henrik Gerdes
2024-09-27 20:30:53 +02:00
parent b554f57600
commit 699177adf3
3 changed files with 40 additions and 0 deletions

View File

@@ -72,6 +72,8 @@ snippets:
- !reference [.snippets, talosctl-install]
- !reference [.snippets, helm-install]
- !reference [.snippets, kind-install]
- !reference [.snippets, mimikube-install]
- !reference [.snippets, argocd-cli-install]
- !reference [.snippets, terraform-install]
- !reference [.snippets, tflint-install]
- !reference [.snippets, tailscale-install]

View File

@@ -192,6 +192,42 @@
chmod +x /usr/local/bin/kind
fi
kind version
mimikube-install:
- |
# Check if minikube is installed
if ! command -v minikube > /dev/null; then
echo "Installing minikube"
echo "You can set the desired version via MINIKUBE_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
MINIKUBE_DEFAULT_VERSION=$(curl -sL https://api.github.com/repos/kubernetes/minikube/releases/latest | jq -r .tag_name)
curl -sL --output /usr/local/bin/minikube https://github.com/kubernetes/minikube/releases/download/${MINIKUBE_VERSION-$MINIKUBE_DEFAULT_VERSION}/minikube-linux-${ARCH-amd64}
chmod +x /usr/local/bin/minikube
fi
minikube version
argocd-cli-install:
- |
# Check if argo-cli is installed
if ! command -v argo > /dev/null; then
echo "Installing argo-cli"
echo "You can set the desired version via ARGO_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
ARGO_DEFAULT_VERSION=$(curl -sL https://api.github.com/repos/argoproj/argo-cd/releases/latest | jq -r .tag_name)
curl -sL --output /usr/local/bin/argocd https://github.com/argoproj/argo-cd/releases/download/${ARGO_VERSION-$ARGO_DEFAULT_VERSION}/argocd-linux-${ARCH-amd64}
chmod +x /usr/local/bin/argocd
fi
argocd version --client
git-install:
- |
# Check if git is installed

View File

@@ -24,6 +24,8 @@ Currently sported snippets are:
* talosctl-install
* skopeo-install
* az-copy-install
* mimikube-install
* argocd-cli-install
* helm-install
* kubeseal-install
* kubeconform-install