New function assertVarsNotEmpty()
This commit is contained in:
parent
57483e78d4
commit
37d954e304
|
@ -80,6 +80,23 @@ fetchVarsFromVaultByFile() {
|
||||||
return 0
|
return 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
assertVarsNotEmpty() {
|
||||||
|
MISSING_VARS=""
|
||||||
|
|
||||||
|
for VAR in $@; do
|
||||||
|
if [ -z "${!VAR}" ]; then
|
||||||
|
MISSING_VARS+="$VAR "
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
|
||||||
|
if [ -n "$MISSING_VARS" ]; then
|
||||||
|
log "ERROR" "Mandatory variables not defined: $MISSING_VARS"
|
||||||
|
return 1
|
||||||
|
fi
|
||||||
|
|
||||||
|
return 0
|
||||||
|
}
|
||||||
|
|
||||||
##Setting Network properties
|
##Setting Network properties
|
||||||
export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');
|
export HOSTIP=$(MSYS_NO_PATHCONV=1 docker run --rm --add-host=host.docker.internal:host-gateway ubuntu cat /etc/hosts | grep 'host.docker.internal' | awk '{print $1}');
|
||||||
export HOST=$(hostname)
|
export HOST=$(hostname)
|
||||||
|
|
Loading…
Reference in New Issue