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

feat: add talosctl install snippet

Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
This commit is contained in:
Henrik Gerdes
2024-09-08 12:56:07 +02:00
parent 6852c89941
commit 92296d9e83
3 changed files with 25 additions and 1 deletions

View File

@@ -6,6 +6,10 @@ stages:
- deploy
- release
default:
timeout: 15min
interruptible: true
include:
- local: .gitlab/ci/snippets.yml
- local: .gitlab/ci/rules.yml
@@ -62,6 +66,7 @@ snippets:
- !reference [.snippets, kubeseal-install]
- !reference [.snippets, kubeconform-install]
- !reference [.snippets, cosign-install]
- !reference [.snippets, talosctl-install]
- !reference [.snippets, helm-install]
- !reference [.snippets, kind-install]
- !reference [.snippets, terraform-install]

View File

@@ -265,10 +265,28 @@
else
echo "Unknown system arch. Default to amd64"
fi
curl -sL https://dl.min.io/client/mc/release/linux-${ARCH}/mc -o /usr/local/bin/mc
curl -sL https://dl.min.io/client/mc/release/linux-${ARCH-amd64}/mc -o /usr/local/bin/mc
chmod +x /usr/local/bin/mc
fi
mc --version
talosctl-install:
- |
# Check if talosctl is installed
if ! command -v talosctl > /dev/null; then
echo "Installing talosctl"
if [ "$(uname -m)" = "x86_64" ]; then
ARCH=amd64
elif [ "$(uname -m)" = "aarch64" ]; then
ARCH=arm64
else
echo "Unknown system arch. Default to amd64"
fi
TALOSCTL_DEFAULT_VERSION=$(curl -sL https://api.github.com/repos/siderolabs/talos/releases/latest | jq -r .tag_name)
TAILSCALE_VERSION=${TALOSCTL_VERSION-$TALOSCTL_DEFAULT_VERSION}
curl -sL https://github.com/siderolabs/talos/releases/download/v1.8.0-alpha.2/talosctl-linux-${ARCH-amd64} -o /usr/local/bin/talosctl
chmod +x /usr/local/bin/talosctl
fi
talosctl version --client
tailscale-install:
- |
# Check if tailscale is installed

View File

@@ -21,6 +21,7 @@ Currently sported snippets are:
* tflint-install
* kubectl-install
* cosign-install
* talosctl-install
* helm-install
* kubeseal-install
* kubeconform-install