From 914ecadbd3cd5e6492cecf399513b9c635bc1def Mon Sep 17 00:00:00 2001 From: Devin Buhl Date: Fri, 5 Apr 2024 15:32:40 -0400 Subject: [PATCH] fix(taskfile): add warnings if KUBECONFIG and SOPS Age are not the expected values Signed-off-by: Devin Buhl --- Taskfile.yaml | 18 +++++++++++++++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/Taskfile.yaml b/Taskfile.yaml index 168c426d..c504e74f 100644 --- a/Taskfile.yaml +++ b/Taskfile.yaml @@ -49,13 +49,11 @@ tasks: cmds: - cp -n {{.BOOTSTRAP_CONFIG_FILE | replace ".yaml" ".sample.yaml"}} {{.BOOTSTRAP_CONFIG_FILE}} - cmd: echo === Configuration file copied === - silent: true - cmd: echo Proceed with updating the configuration files... - silent: true - cmd: echo {{.BOOTSTRAP_CONFIG_FILE}} - silent: true status: - test -f "{{.BOOTSTRAP_CONFIG_FILE}}" + silent: true configure: desc: Configure repository from bootstrap vars @@ -79,3 +77,17 @@ tasks: internal: true cmds: - task: kubernetes:kubeconform + - cmd: echo === Done rendering and validating YAML === + - cmd: | + if [[ $KUBECONFIG != "{{.KUBECONFIG_FILE}}" ]]; then + echo WARNING: KUBECONFIG is not set to the expected value, this may cause conflicts. + fi + - cmd: | + if [[ $SOPS_AGE_KEY_FILE != "{{.AGE_FILE}}" ]]; then + echo WARNING: SOPS_AGE_KEY_FILE is not set to the expected value, this may cause conflicts. + fi + - cmd: | + if test -f ~/.config/sops/age/keys.txt; then + echo WARNING: SOPS Age key found in home directory, this may cause conflicts. + fi + silent: true