summaryrefslogtreecommitdiffstats
path: root/jjb/fuel
diff options
context:
space:
mode:
authorAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-01 20:46:31 +0200
committerAlexandru Avadanii <Alexandru.Avadanii@enea.com>2017-09-02 22:46:36 +0200
commit9ff16eb5ae11ceb402ce7f66371e13073bc2cbd4 (patch)
treeade15fcc1fafa15c3af018aa3c87c1f7e56514ca /jjb/fuel
parent900feabe79816b597ec9d865d39f803641f15212 (diff)
fuel, armband: Drop armband-deploy.sh
Since armband-deploy.sh is merely a clone of fuel-deploy.sh, which we recently synced, drop armband-deploy.sh in favor of an universal fuel-deploy.sh, which will handle deploys for both projects. Change-Id: I653b4e67d9246951a284671e0cf559394661a1ad Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'jjb/fuel')
-rwxr-xr-xjjb/fuel/fuel-deploy.sh34
1 files changed, 21 insertions, 13 deletions
diff --git a/jjb/fuel/fuel-deploy.sh b/jjb/fuel/fuel-deploy.sh
index 7aa0b13ce..ddaebc94a 100755
--- a/jjb/fuel/fuel-deploy.sh
+++ b/jjb/fuel/fuel-deploy.sh
@@ -39,17 +39,28 @@ BRIDGE=${BRIDGE:-pxebr}
LAB_NAME=${NODE_NAME/-*}
# shellcheck disable=SC2153
POD_NAME=${NODE_NAME/*-}
-# Fuel requires deploy script to be ran with sudo
-SUDO=sudo
-
-if [[ "${NODE_NAME}" =~ "virtual" ]]; then
- POD_NAME="virtual_kvm"
-fi
+# Armband might override LAB_CONFIG_URL, all others use the default
+LAB_CONFIG_URL=${LAB_CONFIG_URL:-'ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab'}
-# we currently support ericsson, intel, lf and zte labs
-if [[ ! "${LAB_NAME}" =~ (ericsson|intel|lf|zte) ]]; then
- echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!"
- exit 1
+# Fuel requires deploy script to be ran with sudo, Armband does not
+SUDO=sudo
+if [ "${PROJECT}" = 'fuel' ]; then
+ # Fuel does not use any POD-specific configuration for virtual deploys
+ if [[ "${NODE_NAME}" =~ "virtual" ]]; then
+ POD_NAME="virtual_kvm"
+ fi
+ # Fuel currently supports ericsson, intel, lf and zte labs
+ if [[ ! "${LAB_NAME}" =~ (ericsson|intel|lf|zte) ]]; then
+ echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!"
+ exit 1
+ fi
+else
+ SUDO=
+ # Armband currently supports arm, enea labs
+ if [[ ! "${LAB_NAME}" =~ (arm|enea) ]]; then
+ echo "Unsupported/unidentified lab ${LAB_NAME}. Cannot continue!"
+ exit 1
+ fi
fi
echo "Using configuration for ${LAB_NAME}"
@@ -58,9 +69,6 @@ echo "Using configuration for ${LAB_NAME}"
mkdir -p "${TMPDIR}"
chmod a+x "${HOME}" "${TMPDIR}"
-# TODO: move lab-config URL to Jenkins param
-LAB_CONFIG_URL='ssh://jenkins-ericsson@gerrit.opnfv.org:29418/securedlab'
-
cd "${WORKSPACE}" || exit 1
if [[ "${LAB_CONFIG_URL}" =~ ^(git|ssh):// ]]; then
echo "Cloning securedlab repo ${BRANCH}"