Debian Codegraph @

ansible_collections/community/docker/tests/utils/shippable/fedora.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 platform="${args[0]}"
12 version="${args[1]}"
13 pyver=default
14
15 # check for explicit python version like [email protected]
16 declare -a splitversion
17 IFS='@' read -ra splitversion <<< "$version"
18
19 if [ "${#splitversion[@]}" -gt 1 ]; then
20 version="${splitversion[0]}"
21 pyver="${splitversion[1]}"
22 fi
23
24 if [ "${#args[@]}" -gt 2 ]; then
25 target="azp/${args[2]}/"
26 else
27 target="azp/"
28 fi
29
30 if [[ "${version}" =~ -pypi-latest$ ]]; then
31 version="${version/-pypi-latest}"
32 echo 'force_docker_sdk_for_python_pypi: true' >> tests/integration/integration_config.yml
33 fi
34 if [[ "${version}" =~ -dev-latest$ ]]; then
35 version="${version/-dev-latest}"
36 echo 'force_docker_sdk_for_python_dev: true' >> tests/integration/integration_config.yml
37 fi
38
39 stage="${S:-prod}"
40 provider="${P:-default}"
41
42 if [ "${platform}" == "rhel" ] && [[ "${version}" =~ ^8\. ]]; then
43 echo "pynacl >= 1.4.0, < 1.5.0; python_version == '3.6'" >> tests/utils/constraints.txt
44 fi
45
46 # shellcheck disable=SC2086
47 ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
48 --python "${pyver}" --remote "${platform}/${version}" --remote-terminate always --remote-stage "${stage}" --remote-provider "${provider}"