mirror of https://github.com/ansible/ansible.git
You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
41 lines
1.0 KiB
Bash
41 lines
1.0 KiB
Bash
#!/usr/bin/env bash
|
|
|
|
set -o pipefail -eux
|
|
|
|
declare -a args
|
|
IFS='/:' read -ra args <<< "$1"
|
|
|
|
platform="${args[0]}"
|
|
version="${args[1]}"
|
|
|
|
if [ "${#args[@]}" -gt 2 ]; then
|
|
target="shippable/${platform}/group${args[2]}/"
|
|
else
|
|
target="shippable/${platform}/"
|
|
fi
|
|
|
|
stage="${S:-prod}"
|
|
provider="${P:-default}"
|
|
|
|
# python versions to test in order
|
|
# all versions run full tests
|
|
python_versions=(
|
|
2.7
|
|
3.6
|
|
)
|
|
|
|
for python_version in "${python_versions[@]}"; do
|
|
# terminate remote instances on the final python version tested
|
|
if [ "${python_version}" = "${python_versions[-1]}" ]; then
|
|
terminate="always"
|
|
else
|
|
terminate="never"
|
|
fi
|
|
|
|
# shellcheck disable=SC2086
|
|
ansible-test network-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
|
|
--platform "${platform}/${version}" \
|
|
--docker default --python "${python_version}" \
|
|
--remote-terminate "${terminate}" --remote-stage "${stage}" --remote-provider "${provider}"
|
|
done
|