summaryrefslogtreecommitdiffstats
path: root/jjb/apex
diff options
context:
space:
mode:
authorTim Rozet <trozet@redhat.com>2016-05-26 21:05:57 -0400
committerTim Rozet <trozet@redhat.com>2016-05-26 21:05:57 -0400
commit6668fa4f4c1b660dc130775b3a3d8c38d6646e8d (patch)
treeaaa38550dda460a7094547cb4dc070a75a546d1d /jjb/apex
parent56e0013634afa6424eac9e2819faae0ad6eead39 (diff)
Apex: fixes env vars that cannot be exported due to sudo
Change-Id: I2d27170c3797b1191dd39c3c9f6741a343acf70d Signed-off-by: Tim Rozet <trozet@redhat.com>
Diffstat (limited to 'jjb/apex')
-rwxr-xr-xjjb/apex/apex-deploy.sh24
1 files changed, 14 insertions, 10 deletions
diff --git a/jjb/apex/apex-deploy.sh b/jjb/apex/apex-deploy.sh
index a5a4e8454..4706d45a8 100755
--- a/jjb/apex/apex-deploy.sh
+++ b/jjb/apex/apex-deploy.sh
@@ -71,9 +71,9 @@ if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
DEPLOY_SETTINGS_DIR="${WORKSPACE}/config/deploy"
NETWORK_SETTINGS_DIR="${WORKSPACE}/config/network"
DEPLOY_CMD="$(pwd)/deploy.sh"
- export RESOURCES="${WORKSPACE}/build/images/"
- export CONFIG="${WORKSPACE}/build"
- export LIB="${WORKSPACE}/lib"
+ RESOURCES="${WORKSPACE}/build/images/"
+ CONFIG="${WORKSPACE}/build"
+ LIB="${WORKSPACE}/lib"
# Make sure python34 deps are installed
for dep_pkg in epel-release python34 python34-PyYAML python34-setuptools; do
if ! rpm -q ${dep_pkg} > /dev/null; then
@@ -114,16 +114,20 @@ else
DEPLOY_CMD=opnfv-deploy
DEPLOY_SETTINGS_DIR="/etc/opnfv-apex/"
NETWORK_SETTINGS_DIR="/etc/opnfv-apex/"
- export RESOURCES="/var/opt/opnfv/images"
- export CONFIG="/var/opt/opnfv"
+ RESOURCES="/var/opt/opnfv/images"
+ CONFIG="/var/opt/opnfv"
+ LIB="/var/opt/opnfv/lib"
fi
+# set env vars to deploy cmd
+DEPLOY_CMD="CONFIG=${CONFIG} RESOURCES=${RESOURCES} LIB=${LIB} ${DEPLOY_CMD}"
+
if [ "$OPNFV_CLEAN" == 'yes' ]; then
- if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
- sudo ./clean.sh
- else
- sudo opnfv-clean
- fi
+ if [[ "$BUILD_DIRECTORY" == *verify* ]]; then
+ sudo CONFIG=${CONFIG} LIB=${LIB} ./clean.sh
+ else
+ sudo CONFIG=${CONFIG} LIB=${LIB} opnfv-clean
+ fi
fi
echo "Deploy Scenario set to ${DEPLOY_SCENARIO}"