2017-05-03 00:24:05 +00:00
|
|
|
#!/bin/bash -eux
|
|
|
|
|
|
|
|
set -o pipefail
|
|
|
|
|
|
|
|
declare -a args
|
2017-10-03 19:43:46 +00:00
|
|
|
IFS='/:' read -ra args <<< "$1"
|
2017-05-03 00:24:05 +00:00
|
|
|
|
2018-07-24 03:46:22 +00:00
|
|
|
cloud="${args[0]}"
|
|
|
|
python="${args[1]}"
|
|
|
|
group="${args[2]}"
|
|
|
|
|
|
|
|
target="shippable/${cloud}/group${group}/"
|
2017-05-03 00:24:05 +00:00
|
|
|
|
2018-03-10 00:17:29 +00:00
|
|
|
stage="${S:-prod}"
|
|
|
|
|
2018-10-02 19:26:14 +00:00
|
|
|
changed_all_target="shippable/${cloud}/smoketest/"
|
|
|
|
|
2018-07-24 03:46:22 +00:00
|
|
|
if [ "${group}" == "1" ]; then
|
|
|
|
# only run smoketest tests for group1
|
2018-10-02 19:26:14 +00:00
|
|
|
changed_all_mode="include"
|
2018-07-24 03:46:22 +00:00
|
|
|
|
|
|
|
if ! ansible-test integration "${changed_all_target}" --list-targets > /dev/null 2>&1; then
|
|
|
|
# no smoketest tests are available for this cloud
|
|
|
|
changed_all_target="none"
|
|
|
|
fi
|
|
|
|
else
|
|
|
|
# smoketest tests already covered by group1
|
2018-10-02 19:26:14 +00:00
|
|
|
changed_all_mode="exclude"
|
2018-07-24 03:46:22 +00:00
|
|
|
fi
|
|
|
|
|
2017-05-13 17:08:42 +00:00
|
|
|
# shellcheck disable=SC2086
|
2018-04-12 23:15:28 +00:00
|
|
|
ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
|
2018-03-10 00:17:29 +00:00
|
|
|
--remote-terminate always --remote-stage "${stage}" \
|
2018-10-02 19:26:14 +00:00
|
|
|
--docker --python "${python}" --changed-all-target "${changed_all_target}" --changed-all-mode "${changed_all_mode}"
|