Skip to content

Commit 15c3fe5

Browse files
authored
Merge pull request #1802 from giantswarm/dynamic-azure-test-target
Updated Azure CI tests to automatically detect targets
2 parents 5ffa75e + b2093ef commit 15c3fe5

File tree

2 files changed

+19
-21
lines changed

2 files changed

+19
-21
lines changed

images/capi/azure_targets.sh

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,4 @@
11
VHD_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 azurelinux-3 rhel-8 windows-2019-containerd windows-2022-containerd"
2-
VHD_CI_TARGETS="ubuntu-2204 ubuntu-2404 azurelinux-3 windows-2022-containerd"
32
SIG_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 azurelinux-3 rhel-8 windows-2019-containerd windows-2022-containerd windows-2025-containerd flatcar"
4-
SIG_CI_TARGETS="ubuntu-2204 ubuntu-2404 azurelinux-3 windows-2022-containerd windows-2025-containerd flatcar"
53
SIG_GEN2_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 azurelinux-3 flatcar"
6-
SIG_GEN2_CI_TARGETS="ubuntu-2204 ubuntu-2404 azurelinux-3 flatcar"
74
SIG_CVM_TARGETS="ubuntu-2004 ubuntu-2204 ubuntu-2404 windows-2019-containerd windows-2022-containerd"
8-
SIG_CVM_CI_TARGETS="ubuntu-2204 ubuntu-2404 windows-2022-containerd"

images/capi/scripts/ci-azure-e2e.sh

Lines changed: 19 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -31,23 +31,25 @@ cd "${CAPI_ROOT}" || exit 1
3131
export ARTIFACTS="${ARTIFACTS:-${PWD}/_artifacts}"
3232
mkdir -p "${ARTIFACTS}/azure-sigs" "${ARTIFACTS}/azure-vhds"
3333

34-
# Get list of Azure target names from common file
35-
source azure_targets.sh
36-
37-
# Convert single line entries into arrays
38-
IFS=' ' read -r -a VHD_CI_TARGETS <<< "${VHD_CI_TARGETS}"
39-
IFS=' ' read -r -a SIG_CI_TARGETS <<< "${SIG_CI_TARGETS}"
40-
IFS=' ' read -r -a SIG_GEN2_CI_TARGETS <<< "${SIG_GEN2_CI_TARGETS}"
41-
IFS=' ' read -r -a SIG_CVM_CI_TARGETS <<< "${SIG_CVM_CI_TARGETS}"
42-
43-
# Append the "gen2" targets to the original SIG list
44-
for element in "${SIG_GEN2_CI_TARGETS[@]}"
45-
do
46-
SIG_CI_TARGETS+=("${element}-gen2")
47-
done
48-
49-
# Append "-cvm" suffix to SIG CVM targets
50-
SIG_CVM_CI_TARGETS=("${SIG_CVM_CI_TARGETS[@]/%/-cvm}")
34+
# Dynamically gets all targets and filters out the following:
35+
# - Any RHEL targets (because of subscription requirements)
36+
VHD_CI_TARGETS=( $(make build-azure-vhds --recon -d | grep "Must remake" | \
37+
grep -v build-azure-vhds | grep -v deps- | \
38+
grep -v gen2 | grep -v cvm | \
39+
grep -E -v 'rhel' | \
40+
grep -E -o 'build-azure-vhd-[a-zA-Z0-9\-]+' | \
41+
sed -E 's/build-azure-vhd-([0-9a-z\-]*)/\1/' ) )
42+
SIG_CI_TARGETS=( $(make build-azure-sigs --recon -d | grep "Must remake" | \
43+
grep -v build-azure-sigs | grep -v deps- | \
44+
grep -v cvm | \
45+
grep -E -v 'rhel' | \
46+
grep -E -o 'build-azure-sig-[a-zA-Z0-9\-]+' | \
47+
sed -E 's/build-azure-sig-([0-9a-z\-]*)/\1/' ) )
48+
SIG_CVM_CI_TARGETS=( $(make build-azure-sigs --recon -d | grep "Must remake" | \
49+
grep cvm | \
50+
grep -E -v 'rhel' | \
51+
grep -E -o 'build-azure-sig-[a-zA-Z0-9\-]+' | \
52+
sed -E 's/build-azure-sig-([0-9a-z\-]*)/\1/' ) )
5153

5254
# shellcheck source=parse-prow-creds.sh
5355
source "packer/azure/scripts/parse-prow-creds.sh"

0 commit comments

Comments
 (0)