Skip to content

Commit

Permalink
Address Seb's feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
sonamkindy committed Oct 19, 2023
1 parent b273f76 commit 1c7ffb8
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions lib/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -1294,34 +1294,34 @@ function set_secret_build_args() {
# 'nothing' if 'variable' is not set. Because 'nothing' is not defined it evaluates to "" when 'variable'
# is not set. So [[ "" ]] is what is actually evaluated when 'variable' is not set.

if [[ ${SECRET_DB_USE_JUMPBOX+nothing} ]]; then
if [ -n "${SECRET_DB_USE_JUMPBOX}" ]; then
_SECRET_BUILD_ARGS+=("-DSECRET_DB_USE_JUMPBOX=$SECRET_DB_USE_JUMPBOX")
fi

if [[ ${SECRET_DB_JUMP_BOX_HOST+nothing} ]]; then
if [ -n "${SECRET_DB_JUMP_BOX_HOST}" ]; then
_SECRET_BUILD_ARGS+=("-DSECRET_DB_JUMP_BOX_HOST=$SECRET_DB_JUMP_BOX_HOST")
fi

if [[ ${SECRET_DB_JUMP_BOX_USER+nothing} ]]; then
if [ -n "${SECRET_DB_JUMP_BOX_USER}" ]; then
_SECRET_BUILD_ARGS+=("-DSECRET_DB_JUMP_BOX_USER=$SECRET_DB_JUMP_BOX_USER")
fi

if [[ ${SECRET_DB_JUMP_BOX_PRIVATE_KEY+nothing} ]]; then
if [ -n "${SECRET_DB_JUMP_BOX_PRIVATE_KEY}" ]; then
if [[ ! -f "$SECRET_DB_JUMP_BOX_PRIVATE_KEY" ]]; then
die "Jumpbox private key not found."
fi
_SECRET_BUILD_ARGS+=("-DSECRET_DB_JUMP_BOX_PRIVATE_KEY=$SECRET_DB_JUMP_BOX_PRIVATE_KEY")
fi

if [[ ${SECRET_DB_AWS_ENDPOINT+nothing} ]]; then
if [ -n "${SECRET_DB_AWS_ENDPOINT}" ]; then
_SECRET_BUILD_ARGS+=("-DSECRET_DB_AWS_ENDPOINT=$SECRET_DB_AWS_ENDPOINT")
fi

if [[ ${SECRET_DB_AWS_PROFILE+nothing} ]]; then
if [ -n "${SECRET_DB_AWS_PROFILE}" ]; then
_SECRET_BUILD_ARGS+=("-DSECRET_DB_AWS_PROFILE=$SECRET_DB_AWS_PROFILE")
fi

if [[ ${SECRET_DB_AWS_REGION+nothing} ]]; then
if [ -n "${SECRET_DB_AWS_REGION}" ]; then
_SECRET_BUILD_ARGS+=("-DSECRET_DB_AWS_REGION=$SECRET_DB_AWS_REGION")
fi
}

0 comments on commit 1c7ffb8

Please sign in to comment.