Skip to content

Commit

Permalink
[Ops] Fix an error that might occur when VAULT_ADDR is not defined (#…
Browse files Browse the repository at this point in the history
…175223)

## Summary
In some scenarios, the VAULT_ADDR is not defined, or at least not at the
time when `util.sh` is loaded.

Follow up to #174915 - fixes:
https://buildkite.com/elastic/kibana-agent-packer-cache/builds/539#018d31d6-86bf-4f30-98fc-a82f42d16a4d
  • Loading branch information
delanni authored Jan 22, 2024
1 parent 33077ea commit d014a38
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion .buildkite/scripts/common/util.sh
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ download_artifact() {
}

# TODO: remove after https://github.com/elastic/kibana-operations/issues/15 is done
if [[ "$VAULT_ADDR" == *"secrets.elastic.co"* ]]; then
if [[ "${VAULT_ADDR:-}" == *"secrets.elastic.co"* ]]; then
VAULT_PATH_PREFIX="secret/kibana-issues/dev"
VAULT_KV_PREFIX="secret/kibana-issues/dev"
IS_LEGACY_VAULT_ADDR=true
Expand Down

0 comments on commit d014a38

Please sign in to comment.