From 3a6874c574a88952fd38906229a93934bdac6964 Mon Sep 17 00:00:00 2001 From: Konstantin Grachev Date: Wed, 1 Mar 2023 15:44:04 +0300 Subject: [PATCH] feat: dynamically add chart dependencies --- script.sh | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/script.sh b/script.sh index b370596..16471a4 100755 --- a/script.sh +++ b/script.sh @@ -1,6 +1,6 @@ #!/bin/sh -helm lint . +helm lint --strict . export HELM_REPO_USERNAME="$PLUGIN_USERNAME" export HELM_REPO_PASSWORD="$PLUGIN_PASSWORD" @@ -23,8 +23,7 @@ new_version=$(semver bump "$bump" "$previousVersion") yq -i '.version = "'"$new_version"'"' Chart.yaml -# TODO add dependencies dynamically -helm repo add bitnami https://charts.bitnami.com/bitnami - +eval "$(yq -o=j -I=0 '.dependencies[]' Chart.yaml | yq '"helm repo add " + .name + " " + .repository' -)" helm dependency build + helm cm-push . "$repo"