summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-01-14 13:48:44 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-01-14 13:48:44 +0000
commite1fb68f66fa673b1db8dc36d9790b1a0cd2b3b21 (patch)
tree2b35266315e0fc0a3784e1e87506393870903ee9
parent493b6518449b2044572313000f0ecdf7290dd375 (diff)
parent08566e25be4e1441504cda4d51abc5b813a2c2f0 (diff)
Merge "test: add CI_DEBUG parameter"
-rw-r--r--jjb/functest/functest-ci-jobs.yml19
-rw-r--r--jjb/yardstick/yardstick-ci-jobs.yml16
2 files changed, 24 insertions, 11 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 3a2114f3f..1d43e987d 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -129,6 +129,10 @@
name: PUSH_RESULTS_TO_DB
default: "true"
description: "Push the results of all the tests to the resultDB"
+ - string:
+ name: CI_DEBUG
+ default: 'false'
+ description: "Show debut output information"
########################
# trigger macros
########################
@@ -184,6 +188,8 @@
- shell: |
#!/bin/bash
set +e
+ [[ $CI_DEBUG == true ]] && redirect="" || redirect=">/dev/null"
+
# labconfig is used only for joid
labconfig=""
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
@@ -202,14 +208,15 @@
fi
echo "Functest: Start Docker and prepare environment"
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
- -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO}"
+ -e NODE_NAME=${NODE_NAME} -e DEPLOY_SCENARIO=${DEPLOY_SCENARIO} \
+ -e CI_DEBUG=${CI_DEBUG}"
dir_result="${HOME}/opnfv/functest/reports"
mkdir -p ${dir_result}
rm -rf ${dir_result}/*
res_volume="-v ${dir_result}:/home/opnfv/functest/results"
- docker pull opnfv/functest:latest_stable
+ docker pull opnfv/functest:latest_stable $redirect
cmd="sudo docker run --privileged=true -id ${envs} ${labconfig} ${sshkey} ${res_volume} opnfv/functest:latest_stable /bin/bash"
echo "Functest: Running docker run command: ${cmd}"
${cmd}
@@ -245,14 +252,14 @@
builders:
- shell: |
#!/bin/bash
+ [[ $CI_DEBUG == true ]] && redirect="" || redirect=">/dev/null"
echo "Cleaning up docker containers/images..."
-
# Remove previous running containers if exist
if [[ ! -z $(docker ps -a | grep opnfv/functest) ]]; then
echo "Removing existing opnfv/functest containers..."
- docker ps | grep opnfv/functest | awk '{print $1}' | xargs docker stop
- docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm
+ docker ps | grep opnfv/functest | awk '{print $1}' | xargs docker stop $redirect
+ docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm $redirect
fi
# Remove existing images if exist
@@ -262,6 +269,6 @@
image_tags=($(docker images | grep opnfv/functest | awk '{print $2}'))
for tag in "${image_tags[@]}"; do
echo "Removing docker image opnfv/functest:$tag..."
- docker rmi opnfv/functest:$tag
+ docker rmi opnfv/functest:$tag $redirect
done
fi
diff --git a/jjb/yardstick/yardstick-ci-jobs.yml b/jjb/yardstick/yardstick-ci-jobs.yml
index 354ae0678..0678ef0ef 100644
--- a/jjb/yardstick/yardstick-ci-jobs.yml
+++ b/jjb/yardstick/yardstick-ci-jobs.yml
@@ -88,6 +88,10 @@
name: YARDSTICK_SUITE_NAME
default: opnfv_${{NODE_NAME}}_{loop}.yaml
description: 'Path to test suite'
+ - string:
+ name: CI_DEBUG
+ default: 'false'
+ description: "Show debut output information"
scm:
- git-scm:
@@ -113,6 +117,8 @@
- shell: |
#!/bin/bash
set -e
+ [[ $CI_DEBUG == true ]] && redirect="" || redirect=">/dev/null"
+
# labconfig is used only for joid
labconfig=""
sshkey=""
@@ -135,7 +141,7 @@
envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME} -e EXTERNAL_NETWORK=${EXTERNAL_NETWORK} -e YARDSTICK_BRANCH=${GIT_BRANCH##origin/}"
# Pull the latest image
- docker pull opnfv/yardstick
+ docker pull opnfv/yardstick $redirect
# Run docker
cmd="sudo docker run ${opts} ${envs} ${labconfig} ${sshkey} opnfv/yardstick run_tests.sh ${YARDSTICK_DB_BACKEND} ${YARDSTICK_SUITE_NAME}"
@@ -155,14 +161,14 @@
builders:
- shell: |
#!/bin/bash
+ [[ $CI_DEBUG == true ]] && redirect="" || redirect=">/dev/null"
echo "Cleaning up docker containers/images..."
-
# Remove previous running containers if exist
if [[ ! -z $(docker ps -a | grep opnfv/yardstick) ]]; then
echo "Removing existing opnfv/yardstick containers..."
- docker ps | grep opnfv/yardstick | awk '{print $1}' | xargs docker stop
- docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm
+ docker ps | grep opnfv/yardstick | awk '{print $1}' | xargs docker stop $redirect
+ docker ps -a | grep opnfv/yardstick | awk '{print $1}' | xargs docker rm $redirect
fi
# Remove existing images if exist
@@ -172,7 +178,7 @@
image_tags=($(docker images | grep opnfv/yardstick | awk '{print $2}'))
for tag in "${image_tags[@]}"; do
echo "Removing docker image opnfv/yardstick:$tag..."
- docker rmi opnfv/yardstick:$tag
+ docker rmi opnfv/yardstick:$tag $redirect
done
fi
########################