summaryrefslogtreecommitdiffstats
path: root/jjb/functest/functest-ci-jobs.yml
diff options
context:
space:
mode:
Diffstat (limited to 'jjb/functest/functest-ci-jobs.yml')
-rw-r--r--jjb/functest/functest-ci-jobs.yml29
1 files changed, 18 insertions, 11 deletions
diff --git a/jjb/functest/functest-ci-jobs.yml b/jjb/functest/functest-ci-jobs.yml
index 3c993c6a3..ee6e7d6b7 100644
--- a/jjb/functest/functest-ci-jobs.yml
+++ b/jjb/functest/functest-ci-jobs.yml
@@ -73,7 +73,7 @@
wrappers:
- build-name:
- name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME SDN: $SDN_CONTROLLER Scenario: $DEPLOY_SCENARIO'
+ name: '$BUILD_NUMBER Suite: $FUNCTEST_SUITE_NAME Scenario: $DEPLOY_SCENARIO'
parameters:
- project-parameter:
@@ -129,13 +129,18 @@
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
########################
- trigger:
name: 'functest-master'
triggers:
- - pollscm: "H 9 * * *"
+ - pollscm:
+ cron: "H 9 * * *"
########################
# builder macros
########################
@@ -183,6 +188,7 @@
- shell: |
#!/bin/bash
set +e
+ [[ $CI_DEBUG == true ]] && redirect="/dev/stdout" || redirect="/dev/null"
# labconfig is used only for joid
labconfig=""
if [[ ${INSTALLER_TYPE} == 'apex' ]]; then
@@ -200,15 +206,17 @@
# replace the default one by the customized one provided by jenkins config
fi
echo "Functest: Start Docker and prepare environment"
- envs="INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}"
+ envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} \
+ -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"
+ res_volume="-v ${dir_result}:/home/opnfv/functest/results"
- docker pull opnfv/functest:latest_stable
- cmd="sudo docker run --privileged=true -id -e $envs ${labconfig} ${sshkey} ${res_volume} opnfv/functest:latest_stable /bin/bash"
+ 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}
docker ps -a
@@ -236,21 +244,20 @@
name: functest-store-results
builders:
- shell:
- !include-raw res-build.sh
+ !include-raw: res-build.sh
- builder:
name: functest-cleanup
builders:
- shell: |
#!/bin/bash
+ [[ $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
- docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm
+ docker ps -a | grep opnfv/functest | awk '{print $1}' | xargs docker rm -f >$redirect
fi
# Remove existing images if exist
@@ -260,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
+ docker rmi opnfv/functest:$tag >$redirect
done
fi