Debian Codegraph @

ansible_collections/community/docker/tests/utils/shippable/linux.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
13 if [ "${#args[@]}" -gt 2 ]; then
14 target="azp/${args[2]}/"
15 else
16 target="azp/"
17 fi
18
19 if [[ "${image}" =~ -pypi-latest$ ]]; then
20 image="${image/-pypi-latest}"
21 echo 'force_docker_sdk_for_python_pypi: true' >> tests/integration/integration_config.yml
22 fi
23 if [[ "${image}" =~ -dev-latest$ ]]; then
24 image="${image/-dev-latest}"
25 echo 'force_docker_sdk_for_python_dev: true' >> tests/integration/integration_config.yml
26 fi
27
28 # shellcheck disable=SC2086
29 ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
30 --docker "${image}"