summaryrefslogtreecommitdiffstats
path: root/jjb/fuel/fuel-deploy.sh
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-22 05:03:08 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2018-09-22 05:03:08 +0200
commitd7904fd52767f31d3d8b087bdedc94bd4b0cf3bf (patch)
tree4e51c8b23977f9f5df2b1256595e913a8e5dd72c /jjb/fuel/fuel-deploy.sh
parent521e7886bc8d734e0592035acbd562d59e811c65 (diff)
[fuel] verify: Rework condition for using sudo
With the rework of Fuel & Armband repos, the condition for using sudo got mixed up and alternated between on/off for armband's deploy/verify jobs. Rewrite it based on lab allocation instead of project. Change-Id: I428c585142017b170233858ec3160fdaf998db0c Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'jjb/fuel/fuel-deploy.sh')
-rwxr-xr-xjjb/fuel/fuel-deploy.sh23
1 files changed, 8 insertions, 15 deletions
diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh
index 1a5d6a448..aa7b3bbb6 100755
--- a/jjb/fuel/fuel-deploy.sh
+++ b/jjb/fuel/fuel-deploy.sh
@@ -19,25 +19,18 @@ LAB_NAME=${NODE_NAME/-*}
# shellcheck disable=SC2153
POD_NAME=${NODE_NAME/*-}
-# Fuel requires deploy script to be ran with sudo, Armband does not
-SUDO='sudo -E'
-if [ "${PROJECT}" = 'fuel' ]; then
- # Fuel currently supports ericsson, intel, lf and zte labs
- if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then
- echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!"
- exit 1
- fi
-else
- SUDO=
- # Armband currently supports arm, enea, unh labs
- if [[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]]; then
- echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!"
- exit 1
- fi
+# Fuel currently supports arm, enea, ericsson, intel, lf, unh and zte labs
+if [[ ! "${LAB_NAME}" =~ (arm|enea|ericsson|intel|lf|unh|zte) ]]; then
+ echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!"
+ exit 1
fi
echo "Using configuration for ${LAB_NAME}"
+# Certain labs do not require the deploy script to be ran with sudo
+SUDO='sudo -E'
+[[ ! "${LAB_NAME}" =~ (arm|enea|unh) ]] || SUDO=
+
# create TMPDIR if it doesn't exist, change permissions
mkdir -p "${TMPDIR}"
sudo chmod a+x "${HOME}" "${TMPDIR}"