summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCédric Ollivier <cedric.ollivier@orange.com>2019-04-14 22:31:24 +0200
committerCédric Ollivier <cedric.ollivier@orange.com>2019-04-14 22:31:24 +0200
commit6cf4b53992d9b60ec8c67f82668abdd7a0afa115 (patch)
treeeb9be10d1aef35fae7068256008479835bbfb734
parent702035c04ad807206a1649edfb24b5cc9caac15d (diff)
Clean jjb/functest/functest-k8.sh
It removes lots of obsolete or useless logics. Change-Id: I64a85e813aab520de9d0d77e26a7c8becaa0950b Signed-off-by: Cédric Ollivier <cedric.ollivier@orange.com>
-rwxr-xr-xjjb/functest/functest-k8.sh31
1 files changed, 3 insertions, 28 deletions
diff --git a/jjb/functest/functest-k8.sh b/jjb/functest/functest-k8.sh
index 73e87d3ec..44f6d6ca6 100755
--- a/jjb/functest/functest-k8.sh
+++ b/jjb/functest/functest-k8.sh
@@ -7,43 +7,18 @@ set +o pipefail
[[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
FUNCTEST_DIR=/home/opnfv/functest
-rc_file=${HOME}/k8.creds
-sudo rm -rf $rc_file
-
-if [[ ${INSTALLER_TYPE} == 'compass' ]]; then
- admin_conf_file_vol="-v ${HOME}/admin.conf:/root/.kube/config"
- echo "export KUBERNETES_PROVIDER=local" >> $rc_file
- KUBE_MASTER_URL=$(cat ${HOME}/admin.conf|grep server| awk '{print $2}')
- echo "export KUBE_MASTER_URL=$KUBE_MASTER_URL" >> $rc_file
- KUBE_MASTER_IP=$(echo $KUBE_MASTER_URL|awk -F'https://|:[0-9]+' '$0=$2')
- echo "export KUBE_MASTER_IP=$KUBE_MASTER_IP" >> $rc_file
-elif [[ ${INSTALLER_TYPE} == 'joid' && ${BRANCH} == 'master' ]]; then
- admin_conf_file_vol="-v ${HOME}/joid_config/config:/root/.kube/config"
- rc_file=${HOME}/joid_config/k8config
-elif [[ ${INSTALLER_TYPE} == 'fuel' ]]; then
- admin_conf_file_vol="-v ${HOME}/admin.conf:/root/.kube/config"
- KUBE_MASTER_URL=$(awk '/server:/ {print $2}' ${HOME}/admin.conf | grep -Fv localhost)
- KUBE_MASTER_IP=$(echo $KUBE_MASTER_URL | grep -Po '(\d+\.){3}\d+')
- for k in KUBE_MASTER_URL KUBE_MASTER_IP; do
- echo "export $k=${!k}" >> $rc_file
- done
-else
- echo "Not supported by other installers yet"
- exit 1
-fi
-
-rc_file_vol="-v ${rc_file}:${FUNCTEST_DIR}/conf/env_file"
+admin_conf_file_vol="-v ${HOME}/admin.conf:/root/.kube/config"
dir_result="${HOME}/opnfv/functest/results/${BRANCH##*/}"
mkdir -p ${dir_result}
sudo rm -rf ${dir_result}/*
results_vol="-v ${dir_result}:${FUNCTEST_DIR}/results"
-volumes="${rc_file_vol} ${results_vol} ${admin_conf_file_vol}"
+volumes="${results_vol} ${admin_conf_file_vol}"
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} \
-e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
- -e BUILD_TAG=${BUILD_TAG} -e DEPLOY_TYPE=${DEPLOY_TYPE}"
+ -e BUILD_TAG=${BUILD_TAG}"
DOCKER_TAG=${DOCKER_TAG:-$([[ ${BRANCH##*/} == "master" ]] && echo "latest" || echo ${BRANCH##*/})}