Files
feedc0de 9933f9904a
Validate, publish and deploy Gramps Web / validate (push) Failing after 29m16s
Validate, publish and deploy Gramps Web / publish (push) Skipped
Validate, publish and deploy Gramps Web / deploy (push) Skipped
Introduce helm chart and CI and CD
2026-09-06 11:26:19 +02:00

28 lines
914 B
Bash
Executable File

#!/usr/bin/env bash
set -euo pipefail
export HELM_DRIVER=${HELM_DRIVER:-configmap}
registry=${CHART_REGISTRY:-oci://registry.brunner.ninja/feedc0de/charts}
version=${CHART_VERSION:?Set CHART_VERSION to the published chart version}
namespace=${NAMESPACE:-gramps}
release=${RELEASE:-gramps}
project_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd)
helm_args=(
upgrade --install "${release}" "${registry}/gramps-web"
--version "${version}"
--namespace "${namespace}" --create-namespace
--values "${project_dir}/values-arschrock.yaml"
--take-ownership --wait --timeout 20m
)
# Never auto-uninstall resources during the initial ownership transfer. Once
# the parent release exists, normal upgrades may safely roll back to it.
if helm status "${release}" --namespace "${namespace}" 2>/dev/null \
| grep -q '^STATUS: deployed$'; then
helm_args+=(--rollback-on-failure)
fi
helm "${helm_args[@]}"