mirror of
https://github.com/multica-ai/multica.git
synced 2026-07-28 05:46:58 +02:00
34 lines
843 B
Bash
34 lines
843 B
Bash
#!/usr/bin/env bash
|
|
set -euo pipefail
|
|
|
|
ROOT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)"
|
|
CHART_DIR="$ROOT_DIR/deploy/helm/multica"
|
|
|
|
require_rendered_value() {
|
|
local rendered=$1
|
|
local expected=$2
|
|
|
|
if ! grep -Fq "$expected" <<<"$rendered"; then
|
|
echo "Missing expected Helm-rendered config value:"
|
|
echo " $expected"
|
|
exit 1
|
|
fi
|
|
}
|
|
|
|
helm lint "$CHART_DIR"
|
|
|
|
default_config="$(
|
|
helm template multica "$CHART_DIR" \
|
|
--show-only templates/configmap.yaml
|
|
)"
|
|
require_rendered_value "$default_config" 'MULTICA_VCS_INTEGRATION_ENABLED: "true"'
|
|
|
|
disabled_config="$(
|
|
helm template multica "$CHART_DIR" \
|
|
--show-only templates/configmap.yaml \
|
|
--set backend.config.vcsIntegrationEnabled=false
|
|
)"
|
|
require_rendered_value "$disabled_config" 'MULTICA_VCS_INTEGRATION_ENABLED: "false"'
|
|
|
|
echo "helm config rendering ok"
|