mirror of
https://github.com/ansible-collections/community.general.git
synced 2025-04-30 06:11:26 -07:00
Add keep on failure option to integration.sh. (#17711)
This commit is contained in:
parent
97a1b7ded1
commit
ada2432165
1 changed files with 7 additions and 0 deletions
|
@ -34,6 +34,7 @@ fi
|
||||||
|
|
||||||
container_id=
|
container_id=
|
||||||
httptester_id=
|
httptester_id=
|
||||||
|
tests_completed=
|
||||||
|
|
||||||
function show_environment
|
function show_environment
|
||||||
{
|
{
|
||||||
|
@ -51,6 +52,10 @@ function cleanup
|
||||||
rm -rf "${controller_shared_dir}"
|
rm -rf "${controller_shared_dir}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${keep_containers}" == "onfailure" ] && [ "${tests_completed}" != "" ]; then
|
||||||
|
keep_containers=
|
||||||
|
fi
|
||||||
|
|
||||||
if [ "${keep_containers}" == "" ]; then
|
if [ "${keep_containers}" == "" ]; then
|
||||||
if [ "${container_id}" ]; then
|
if [ "${container_id}" ]; then
|
||||||
docker rm -f "${container_id}"
|
docker rm -f "${container_id}"
|
||||||
|
@ -111,3 +116,5 @@ docker exec "${container_id}" mkdir -p "${test_shared_dir}/shippable/testresults
|
||||||
docker exec "${container_id}" /bin/sh -c "cd '${test_ansible_dir}' && . hacking/env-setup && cd test/integration && \
|
docker exec "${container_id}" /bin/sh -c "cd '${test_ansible_dir}' && . hacking/env-setup && cd test/integration && \
|
||||||
JUNIT_OUTPUT_DIR='${test_shared_dir}/shippable/testresults' ANSIBLE_CALLBACK_WHITELIST=junit \
|
JUNIT_OUTPUT_DIR='${test_shared_dir}/shippable/testresults' ANSIBLE_CALLBACK_WHITELIST=junit \
|
||||||
HTTPTESTER=1 TEST_FLAGS='${test_flags}' LC_ALL=en_US.utf-8 make ${test_target}"
|
HTTPTESTER=1 TEST_FLAGS='${test_flags}' LC_ALL=en_US.utf-8 make ${test_target}"
|
||||||
|
|
||||||
|
tests_completed=1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue