Merge "Allow for arguments to DEVSTACK_GATE_SETTINGS."

This commit is contained in:
Jenkins 2017-09-05 17:11:59 +00:00 committed by Gerrit Code Review
commit b91005fc52
1 changed files with 8 additions and 1 deletions

View File

@ -633,8 +633,15 @@ fi executable=/bin/bash"
# should be sourced after the environment has been set up. This is useful for
# allowing projects to provide a script in their repo that sets some custom
# environment variables.
check_for_devstack_gate_settings() {
if [ -f $1 ] ; then
return 0
else
return 1
fi
}
if [ -n "${DEVSTACK_GATE_SETTINGS}" ] ; then
if [ -f "${DEVSTACK_GATE_SETTINGS}" ] ; then
if check_for_devstack_gate_settings ${DEVSTACK_GATE_SETTINGS} ; then
source ${DEVSTACK_GATE_SETTINGS}
else
echo "WARNING: DEVSTACK_GATE_SETTINGS file does not exist: '${DEVSTACK_GATE_SETTINGS}'"