From 121bf455eacc33055bf5d5c1aece15021dfe9bb0 Mon Sep 17 00:00:00 2001 From: Maurice Faber Date: Tue, 13 Jul 2021 13:02:16 +0200 Subject: [PATCH] fix: regression in commands not decrypting --- .cspell.json | 1 + bin/otomi | 16 ++++++++-------- 2 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.cspell.json b/.cspell.json index e939809f51..e4642aa5e1 100644 --- a/.cspell.json +++ b/.cspell.json @@ -20,6 +20,7 @@ "gotmpl", "groupsname", "gzrs", + "Hashicorp", "htpasswd", "ingressgateway", "istioctl", diff --git a/bin/otomi b/bin/otomi index 2af81b360d..abe609401e 100755 --- a/bin/otomi +++ b/bin/otomi @@ -261,7 +261,7 @@ function execute() { evaluate_secrets check_kube_context=1 set -o pipefail - drun "$exec hf diff --skip-deps $SKIP_CLEANUP" | grep -Ev $helmfile_output_hide + drun "$exec crypt && hf diff --skip-deps $SKIP_CLEANUP" | grep -Ev $helmfile_output_hide ;; destroy) evaluate_secrets @@ -269,13 +269,13 @@ function execute() { if [ -z "$FILE_OPT" ] && [ -z "$LABEL_OPT" ]; then drun "bin/destroy.sh $original_params" | grep -Ev $helmfile_output_hide else - drun "$exec hf destroy" | grep -Ev $helmfile_output_hide + drun "$exec crypt && hf destroy" | grep -Ev $helmfile_output_hide fi ;; encrypt) check_sops_file evaluate_secrets - drun ". bin/common.sh $original_params && crypt enc" "$@" + drun "$exec crypt enc" "$@" ;; gen-drone) evaluate_secrets @@ -289,12 +289,12 @@ function execute() { evaluate_secrets check_kube_context=1 set -o pipefail - drun "$exec hf $*" | grep -Ev $helmfile_output_hide + drun "$exec crypt && hf $*" | grep -Ev $helmfile_output_hide ;; lint) evaluate_secrets set -o pipefail - drun "$exec hf lint --skip-deps" + drun "$exec crypt && hf lint --skip-deps" ;; pull) is_repo @@ -312,18 +312,18 @@ function execute() { score-templates) evaluate_secrets check_env_dir - drun "$exec hf_template | kube-score score --ignore-test -" + drun "$exec crypt && hf_template | kube-score score --ignore-test -" ;; sync) evaluate_secrets check_kube_context=1 set -o pipefail - drun "$exec hf sync --skip-deps $SKIP_CLEANUP" | grep -Ev $helmfile_output_hide + drun "$exec crypt && hf sync --skip-deps $SKIP_CLEANUP" | grep -Ev $helmfile_output_hide ;; template) evaluate_secrets check_env_dir - drun ". bin/common.sh $original_params && QUIET=1 crypt && hf_template" + drun "$exec QUIET=1 crypt && hf_template" ;; test) evaluate_secrets