Commit 712331d4 authored by Pierre Smeyers's avatar Pierre Smeyers
Browse files

fix: unset vault variables for semrel

Fixes #54
parent 5bb40fc9
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -790,6 +790,12 @@ stages:
    log_info "Commit signing setup complete."
  }

  function clear_vault_env() {
    # unset service container env when Vault variant is enabled (SemRel censors them all due to 'SECRET' in the name)
    # shellcheck disable=SC2046
    unset $(env | awk -F '=' '/^VAULT_SECRETS_PROVIDER_/{print $1}' | xargs)
  }

  unscope_variables
  eval_all_secrets

@@ -809,6 +815,7 @@ stages:
    - cd "${SEMREL_CONFIG_DIR}"
    - prepare_semantic_release
    - install_semantic_release_plugins
    - clear_vault_env
  variables:
    # download cache
    XDG_CACHE_HOME: "$CI_PROJECT_DIR/.cache"