From 22f70299a6f0b88ffb547eb244588b82b16255b2 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Fri, 8 Mar 2024 11:15:39 +0100 Subject: [PATCH] Use a render_example prop in bundles.yml to decide if we render example --- ctctl | 2 +- ctctl.example.conf | 4 ---- 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/ctctl b/ctctl index d783ce8..8906462 100755 --- a/ctctl +++ b/ctctl @@ -664,7 +664,7 @@ ctctl_render_templates(){ # And now delete the merged config rm -f ${CTCTL_BUNDLE_CONFIG} - if [ -n "${CTCTL_RENDER_EXAMPLE}" -a "${CTCTL_RENDER_EXAMPLE}" = "true" ]; then + if [ "$(echo ${BUNDLE} | jq -r '.render_example // "false"')" = "true" ]; then echo "Rendering example job with bundle variables only" I=0 diff --git a/ctctl.example.conf b/ctctl.example.conf index ac82a46..9a72193 100644 --- a/ctctl.example.conf +++ b/ctctl.example.conf @@ -25,7 +25,3 @@ # LOKI_PWD_CMD="vault read -field pwd kv/admin/loki" # Regex of tasks to ignore with ctctl loki # LOKI_IGNORE_TASKS="connect-proxy-.+|tls-proxy|metrics-proxy|pgbouncer" - -# You can render a bundle in the example directory of the bundle itself -# using only the default variables -# CTCTL_RENDER_EXAMPLE=true