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

feat: add helm docs install

Signed-off-by: Henrik Gerdes <hegerdes@outlook.de>
This commit is contained in:
Henrik Gerdes
2025-01-31 22:33:08 +01:00
parent 34236773e4
commit 49d905e089
32 changed files with 78 additions and 0 deletions

View File

@@ -86,6 +86,7 @@ snippets:
- !reference [.snippets, talosctl-install]
- !reference [.snippets, vault-install]
- !reference [.snippets, helm-install]
- !reference [.snippets, helm-docs-install]
- !reference [.snippets, packer-install]
- !reference [.snippets, kind-install]
- !reference [.snippets, minikube-install]

View File

@@ -240,6 +240,30 @@
tar -xzf /tmp/helm.tar.gz -C /usr/local/bin/ --strip-components=1 --exclude={LICENSE,README.md}
fi
helm version
helm-docs-install:
- |
# Check if helm-docs is installed
if ! command -v helm-docs > /dev/null; then
echo "Installing helm-docs"
echo "You can set the desired version via HELM_DOCS_VERSION. Default is latest"
if [ "$(uname -m)" = "x86_64" ]; then
ARCH=x86_64
elif [ "$(uname -m)" = "aarch64" ]; then
ARCH=arm64
else
echo "Unknown system arch. Default to amd64"
fi
HELM_DOCS_DEFAULT_VERSION=$(curl -sL https://api.github.com/repos/norwoodj/helm-docs/releases/latest | jq -r .tag_name)
HELM_DOCS_VERSION=${HELM_DOCS_VERSION-$HELM_DOCS_DEFAULT_VERSION}
# Fix version beginning with "v"
if echo "${HELM_DOCS_VERSION}" | grep -q "v"; then
HELM_DOCS_VERSION="${HELM_DOCS_VERSION:1}"
fi
curl -sL --fail --output helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_${ARCH-amd64}.tar.gz
tar -xzvf helm-docs.tar.gz -C /usr/local/bin --exclude={LICENSE,README.md,CHANGELOG.md}
rm helm-docs.tar.gz
fi
helm-docs --version
kind-install:
- |
# Check if kind is installed

View File

@@ -33,6 +33,7 @@ Currently supported snippets are:
* vault-install
* argocd-cli-install
* helm-install
* helm-docs-install
* kubeseal-install
* kubeconform-install
* kind-install

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Installing core tools
if command -v apk > /dev/null; then
apk add --no-cache curl jq unzip tar gzip gcompat > /dev/null

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if argo-cli is installed
if ! command -v argo > /dev/null; then
echo "Installing argo-cli"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if aws cli is installed
if ! command -v aws > /dev/null; then
echo "Installing aws-cli"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if azcopy is installed
if ! command -v azcopy > /dev/null; then
echo "Installing azcopy"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if az cli is installed
if ! command -v az > /dev/null; then
if command -v apt-get > /dev/null; then

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if cosign is installed
if ! command -v cosign > /dev/null; then
echo "Installing cosign!"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Installing core tools
if command -v apt-get > /dev/null; then
if [ ! -z ${HTTP_PROXY+x} ]; then

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if git is installed
if ! command -v git > /dev/null; then
echo "Installing git"

View File

@@ -0,0 +1,24 @@
#!/bin/bash
# Check if helm-docs is installed
if ! command -v helm-docs > /dev/null; then
echo "Installing helm-docs"
echo "You can set the desired version via HELM_DOCS_VERSION. Default is latest"
if [ "$(uname -m)" = "x86_64" ]; then
ARCH=x86_64
elif [ "$(uname -m)" = "aarch64" ]; then
ARCH=arm64
else
echo "Unknown system arch. Default to amd64"
fi
HELM_DOCS_DEFAULT_VERSION=$(curl -sL https://api.github.com/repos/norwoodj/helm-docs/releases/latest | jq -r .tag_name)
HELM_DOCS_VERSION=${HELM_DOCS_VERSION-$HELM_DOCS_DEFAULT_VERSION}
# Fix version beginning with "v"
if echo "${HELM_DOCS_VERSION}" | grep -q "v"; then
HELM_DOCS_VERSION="${HELM_DOCS_VERSION:1}"
fi
curl -sL --fail --output helm-docs.tar.gz https://github.com/norwoodj/helm-docs/releases/download/v${HELM_DOCS_VERSION}/helm-docs_${HELM_DOCS_VERSION}_Linux_${ARCH-amd64}.tar.gz
tar -xzvf helm-docs.tar.gz -C /usr/local/bin --exclude={LICENSE,README.md,CHANGELOG.md}
rm helm-docs.tar.gz
fi
helm-docs --version

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if helm is installed
if ! command -v helm > /dev/null; then
echo "Installing helm"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if jq is installed
if ! command -v jq > /dev/null; then
echo "Installing jq"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if kind is installed
if ! command -v kind > /dev/null; then
echo "Installing kind"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if kubeconform is installed
if ! command -v kubeconform > /dev/null; then
echo "Installing kubeconform"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if kubecontext should be configured
if [ "$CI_KUBERNETES_ACTIVE" = "true" ] || [ ! -z ${GL_K8S_AGENT_ID+x} ] || [ ! -z ${GL_K8S_PROXY_URL+x} ] ; then
if [ "$CI_SERVER_HOST" == "gitlab.com" ]; then

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if kubectl is installed
if ! command -v kubectl > /dev/null; then
echo "Installing kubectl"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if kubeseal is installed
if ! command -v kubeseal > /dev/null; then
echo "Installing kubeseal"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if minikube is installed
if ! command -v minikube > /dev/null; then
echo "Installing minikube"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if minio mc is installed
if ! command -v mc > /dev/null; then
echo "Installing minio mc"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if openssl is installed
if ! command -v openssl > /dev/null; then
echo "Installing openssl"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if opentofu is installed
if ! command -v tofu > /dev/null; then
echo "Installing opentofu!"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if packer is installed
if ! command -v packer > /dev/null; then
echo "Installing packer"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if skopeo is installed
if ! command -v skopeo > /dev/null; then
echo "Installing skopeo"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Setting up SSH
eval $(ssh-agent -s) > /dev/null
echo "$SSH_PRIVATE_KEY" | base64 --decode | tr -d '\r' | ssh-add - > /dev/null

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if tailscale is installed
if ! command -v tailscale > /dev/null; then
echo "Installing tailscale"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if talosctl is installed
if ! command -v talosctl > /dev/null; then
echo "Installing talosctl"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if terraform is installed
if ! command -v terraform > /dev/null; then
echo "Installing terraform!"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if tflint is installed
if ! command -v tflint > /dev/null; then
echo "Installing tflint"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if vault is installed
if ! command -v vault > /dev/null; then
echo "Installing vault"

View File

@@ -1,4 +1,5 @@
#!/bin/bash
# Check if yq is installed
if ! command -v yq > /dev/null; then
echo "Installing yq (by Mike Farah)"