Debian Codegraph @

ansible_collections/community/docker/tests/utils/shippable/linux-community.sh

raw
1 #!/usr/bin/env bash
2 # Copyright (c) Ansible Project
3 # GNU General Public License v3.0+ (see LICENSES/GPL-3.0-or-later.txt or https://www.gnu.org/licenses/gpl-3.0.txt)
4 # SPDX-License-Identifier: GPL-3.0-or-later
5
6 set -o pipefail -eux
7
8 declare -a args
9 IFS='/:' read -ra args <<< "$1"
10
11 image="${args[1]}"
12 python="${args[2]}"
13
14 if [ "${#args[@]}" -gt 3 ]; then
15 target="azp/${args[3]}/"
16 else
17 target="azp/"
18 fi
19
20 if [[ "${python}" =~ -pypi-latest$ ]]; then
21 python="${python/-pypi-latest}"
22 echo 'force_docker_sdk_for_python_pypi: true' >> tests/integration/integration_config.yml
23 fi
24 if [[ "${python}" =~ -dev-latest$ ]]; then
25 python="${python/-dev-latest}"
26 echo 'force_docker_sdk_for_python_dev: true' >> tests/integration/integration_config.yml
27 fi
28
29 # shellcheck disable=SC2086
30 ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
31 --docker "quay.io/ansible-community/test-image:${image}" --python "${python}"