summaryrefslogtreecommitdiffstats
path: root/jjb/functest/functest-ci-jobs.yml
diff options
context:
space:
mode:
authorjose.lausuch <jose.lausuch@ericsson.com>2016-01-14 17:28:24 +0100
committerjose.lausuch <jose.lausuch@ericsson.com>2016-01-14 17:48:15 +0100
commitec22e929558fd2251c37b5b7cb77f63e4a4bd64a (patch)
tree0d58f8737225f16ba2b686c9c26f6404d4437ee9 /jjb/functest/functest-ci-jobs.yml
parentbc3bc54b4a554da78f68688ce1cec481f958b8e7 (diff)
test: fix output redirection if when CI_DEBUG
Change-Id: I200bd37d05110b4352439c799c61f18d32523ee6 Signed-off-by: jose.lausuch <jose.lausuch@ericsson.com>
Diffstat (limited to 'jjb/functest/functest-ci-jobs.yml')
-rw-r--r--jjb/functest/functest-ci-jobs.yml12
1 files changed, 5 insertions, 7 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 1d43e987d..ee6e7d6b7 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -188,8 +188,7 @@
- shell: |
#!/bin/bash
set +e
- [[ $CI_DEBUG == true ]] && redirect="" || redirect=">/dev/null"
-
+ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
# labconfig is used only for joid
labconfig=""
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
@@ -216,7 +215,7 @@
rm -rf ${dir_result}/*
res_volume="-v ${dir_result}:/home/opnfv/functest/results"
- docker pull opnfv/functest:latest_stable $redirect
+ 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}
@@ -252,14 +251,13 @@
builders:
- shell: |
#!/bin/bash
- [[ $CI_DEBUG == true ]] && redirect="" || redirect=">/dev/null"
+ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || 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 $redirect
- docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm $redirect
+ docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f >$redirect
fi
# Remove existing images if exist
@@ -269,6 +267,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 $redirect
+ docker rmi opnfv/functest:$tag >$redirect
done
fi