Debian Codegraph @

.azure-pipelines/commands/cloud.sh

raw symbols SCIP
1 #!/usr/bin/env bash
2
3 set -o pipefail -eux
4
5 declare -a args
6 IFS='/:' read -ra args <<< "$1"
7
8 cloud="${args[0]}"
9 python="${args[1]}"
10 group="${args[2]}"
11
12 target="shippable/${cloud}/group${group}/"
13
14 stage="${S:-prod}"
15
16 changed_all_target="shippable/${cloud}/smoketest/"
17
18 if ! ansible-test integration "${changed_all_target}" --list-targets > /dev/null 2>&1; then
19 # no smoketest tests are available for this cloud
20 changed_all_target="none"
21 fi
22
23 if [ "${group}" == "1" ]; then
24 # only run smoketest tests for group1
25 changed_all_mode="include"
26 else
27 # smoketest tests already covered by group1
28 changed_all_mode="exclude"
29 fi
30
31 # shellcheck disable=SC2086
32 ansible-test integration --color -v --retry-on-error "${target}" ${COVERAGE:+"$COVERAGE"} ${CHANGED:+"$CHANGED"} ${UNSTABLE:+"$UNSTABLE"} \
33 --remote-terminate always --remote-stage "${stage}" \
34 --docker --python "${python}" --changed-all-target "${changed_all_target}" --changed-all-mode "${changed_all_mode}"