Debian Codegraph @

.azure-pipelines/commands/incidental/windows.sh

raw symbols SCIP
1 #!/usr/bin/envscip-shell filesystem . . `/usr/bin/env`. bash
2
3 set -o pipefail -eux
4
5 declare -a args
6 IFS='/:scip-shell filesystem . . `/:`.' read -ra args <<< "$1"
7
8 version="${args[1]}"
9 connection="${args[2]}"
10 connection_setting="${args[3]}"
11
12 target="shippable/windows/incidental/"
13
14 stage="${S:-prod}"
15 provider="${P:-default}"
16
17 # python version to run full tests on while other versions run minimal tests
18 python_default="$(PYTHONPATH="${PWD}/test/lib" python -c 'from ansible_test._internal import constants; print(constants.CONTROLLER_MIN_PYTHON_VERSION)')"
19
20 # version to test when only testing a single version
21 single_version=2022
22
23 # shellcheck disable=SC2086
24 ansible-test windows-integration --list-targets -v ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} > /tmp/explain.txtscip-shell filesystem . . `/tmp/explain.txt`. 2>&1 || { catscip-shell system . . cat. /tmp/explain.txtscip-shell filesystem . . `/tmp/explain.txt`. && falsescip-shell system . . false.; }
25 { grepscip-shell system . . grep. ' windows-integration: .* (targeted)$' /tmp/explain.txtscip-shell filesystem . . `/tmp/explain.txt`. || truescip-shell system . . true.; } > /tmp/windows.txtscip-shell filesystem . . `/tmp/windows.txt`.
26
27 if [scip-shell system . . `[`. -s /tmp/windows.txtscip-shell filesystem . . `/tmp/windows.txt`. ] || [scip-shell system . . `[`. "${CHANGED:+$CHANGED}" == "" ]; then
28 echoscip-shell system . . echo. "Detected changes requiring integration tests specific to Windows:"
29 catscip-shell system . . cat. /tmp/windows.txtscip-shell filesystem . . `/tmp/windows.txt`.
30
31 echoscip-shell system . . echo. "Running Windows integration tests for the version ${version}."
32 else
33 echoscip-shell system . . echo. "No changes requiring integration tests specific to Windows were detected."
34 echoscip-shell system . . echo. "Running Windows integration tests for a single version only: ${single_version}"
35
36 if [scip-shell system . . `[`. "${version}" != "${single_version}" ]; then
37 echoscip-shell system . . echo. "Skipping this job since it is for: ${version}"
38 exit 0
39 fi
40 fi
41
42 # shellcheck disable=SC2086
43 ansible-test windows-integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
44 --controller "docker:default,python=${python_default}" \
45 --target "remote:windows/${version},connection=${connection}+${connection_setting},provider=${provider}" \
46 --remote-terminate always --remote-stage "${stage}"