diff options
author | Morgan Richomme <morgan.richomme@orange.com> | 2017-08-16 16:38:23 +0200 |
---|---|---|
committer | Morgan Richomme <morgan.richomme@orange.com> | 2017-08-22 14:44:44 +0200 |
commit | ea4e3656a812508809294b667b97b7b0b07736c9 (patch) | |
tree | 9a47fc2f591ea97e9ffd222ef54f35763bcd9f83 /docs/testing/user/configguide/ci.rst | |
parent | 2890159f9da2dd13f5db6f85ca039922205df836 (diff) |
Functest Doc: first update for Euphrates
- move part of the dev group to the testing document
- move reporting into user guide
- update logs
- introduce alpine
- introduce functest API
- split documents per chapter
Change-Id: I08268091ce50309e891a648333da2054e902bcea
Signed-off-by: Morgan Richomme <morgan.richomme@orange.com>
Diffstat (limited to 'docs/testing/user/configguide/ci.rst')
-rw-r--r-- | docs/testing/user/configguide/ci.rst | 50 |
1 files changed, 50 insertions, 0 deletions
diff --git a/docs/testing/user/configguide/ci.rst b/docs/testing/user/configguide/ci.rst new file mode 100644 index 000000000..384bc34e5 --- /dev/null +++ b/docs/testing/user/configguide/ci.rst @@ -0,0 +1,50 @@ +Integration in CI +================= +In CI we use the Docker image and execute the appropriate commands within the +container from Jenkins. + +Docker creation in set-functest-env builder `[3]`_:: + + envs="-e INSTALLER_TYPE=${INSTALLER_TYPE} -e INSTALLER_IP=${INSTALLER_IP} -e NODE_NAME=${NODE_NAME}" + [...] + docker pull opnfv/functest:$DOCKER_TAG >/dev/null + cmd="sudo docker run -id ${envs} ${volumes} ${custom_params} ${TESTCASE_OPTIONS} opnfv/functest:${DOCKER_TAG} /bin/bash" + echo "Functest: Running docker run command: ${cmd}" + ${cmd} >${redirect} + sleep 5 + container_id=$(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | awk '{print $1}' | head -1) + echo "Container ID=${container_id}" + if [ -z ${container_id} ]; then + echo "Cannot find opnfv/functest container ID ${container_id}. Please check if it is existing." + docker ps -a + exit 1 + fi + echo "Starting the container: docker start ${container_id}" + docker start ${container_id} + sleep 5 + docker ps >${redirect} + if [ $(docker ps | grep "opnfv/functest:${DOCKER_TAG}" | wc -l) == 0 ]; then + echo "The container opnfv/functest with ID=${container_id} has not been properly started. Exiting..." + exit 1 + fi + + cmd="python ${FUNCTEST_REPO_DIR}/functest/ci/prepare_env.py start" + echo "Executing command inside the docker: ${cmd}" + docker exec ${container_id} ${cmd} + + +Test execution in functest-all builder `[3]`_:: + + branch=${GIT_BRANCH##*/} + echo "Functest: run $FUNCTEST_SUITE_NAME on branch ${branch}" + cmd="functest testcase run $FUNCTEST_SUITE_NAME" + fi + container_id=$(docker ps -a | grep opnfv/functest | awk '{print $1}' | head -1) + docker exec $container_id $cmd + ret_value=$? + exit $ret_value + +Docker clean in functest-cleanup builder `[3]`_ calling docker rm and docker rmi + + +.. _`[3]`: https://git.opnfv.org/releng/tree/jjb/functest/functest-daily-jobs.yml |