Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
189a4bc
fix
zachary-bailey Oct 12, 2026
2a52b49
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 13, 2026
d02bf9d
fix
zachary-bailey Oct 13, 2026
6aa4672
fix
zachary-bailey Oct 13, 2026
14c98ea
fix
zachary-bailey Oct 13, 2026
953ae9b
fix
zachary-bailey Oct 13, 2026
791bbd6
fix
zachary-bailey Oct 13, 2026
407a2c0
fix
zachary-bailey Oct 13, 2026
6fd45d2
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 14, 2026
bc41288
fix
zachary-bailey Oct 14, 2026
154eec9
fix
zachary-bailey Oct 14, 2026
496ab05
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 14, 2026
3adf3cf
fix
zachary-bailey Oct 14, 2026
a78abbf
fix
zachary-bailey Oct 15, 2026
1f988a6
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 15, 2026
7d345ad
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 15, 2026
2440c4a
fix
zachary-bailey Oct 15, 2026
bb35c1d
fix
zachary-bailey Oct 15, 2026
58e210e
fix
zachary-bailey Oct 15, 2026
eff563c
fix
zachary-bailey Oct 15, 2026
719102b
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 16, 2026
9bff3e9
fix
zachary-bailey Oct 16, 2026
0124652
fix
zachary-bailey Oct 16, 2026
6ea2a1f
fi
zachary-bailey Oct 16, 2026
0dfbed1
fix
zachary-bailey Oct 16, 2026
216aa1f
fix
zachary-bailey Oct 16, 2026
bac5fe6
fix
zachary-bailey Oct 16, 2026
bc0d616
fix
zachary-bailey Oct 16, 2026
e5e40fc
fix
zachary-bailey Oct 16, 2026
6495b27
fix
zachary-bailey Oct 16, 2026
1a3b41e
fix
zachary-bailey Oct 16, 2026
23af06b
fix
zachary-bailey Oct 16, 2026
2dfea8a
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 16, 2026
45eb810
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 19, 2026
e5ea516
fix
zachary-bailey Oct 19, 2026
c7b573a
fix
zachary-bailey Oct 19, 2026
125f5d6
fix
zachary-bailey Oct 19, 2026
e438963
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 19, 2026
04aed81
fix
zachary-bailey Oct 19, 2026
a11a137
fix
zachary-bailey Oct 20, 2026
2ed3a50
Merge branch 'main' into zb/CVMABE2E
zachary-bailey Oct 20, 2026
2e6f36b
fix
zachary-bailey Oct 20, 2026
c85aeba
fix
zachary-bailey Oct 20, 2026
d579e3f
fix
zachary-bailey Oct 20, 2026
e2a9e8a
fix
zachary-bailey Oct 20, 2026
e0fd2a2
fix
zachary-bailey Oct 20, 2026
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .pipelines/e2e.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: $(Date:yyyyMMdd)$(Rev:.r)
variables:
TAGS_TO_SKIP: "os=windows,gpu=true"
TAGS_TO_SKIP: "os=windows,gpu=true,cvm=true"
SKIP_E2E_TESTS: false
E2E_FAILED_TESTS_RETRY_COUNT: 0
schedules:
Expand Down
136 changes: 96 additions & 40 deletions .pipelines/templates/.builder-release-template.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -318,46 +318,6 @@ steps:
RESOURCE_GROUP_NAME: $(AZURE_RESOURCE_GROUP_NAME)
DRY_RUN: $(DRY_RUN)

- bash: |
set -euo pipefail

metadata_dir="$(Build.ArtifactStagingDirectory)/e2e-vhd-metadata"
metadata_file="${metadata_dir}/${VHD_ARTIFACT_NAME}.json"
mkdir -p "$metadata_dir"

if [ -z "${MANAGED_SIG_ID}" ]; then
echo "##vso[task.logissue type=error]Packer did not return a managed SIG image version ID" >&2
exit 1
fi

regions="$(jq -nc \
--arg buildLocation "${PACKER_BUILD_LOCATION}" \
--arg replications "${REPLICATIONS:-}" \
'([$buildLocation] + ($replications | split(",") | map(split("=")[0] | gsub("^\\s+|\\s+$"; "")) | map(select(length > 0)))) | unique')"

jq -n \
--arg imageName "${SIG_IMAGE_NAME}" \
--arg resourceId "${MANAGED_SIG_ID}" \
--arg version "${CAPTURED_SIG_VERSION}" \
--argjson regions "$regions" \
'{($imageName): {resourceId: $resourceId, version: $version, regions: $regions}}' > "$metadata_file"
condition: succeeded()
displayName: Create E2E VHD metadata
env:
VHD_ARTIFACT_NAME: ${{ parameters.artifactName }}
SIG_IMAGE_NAME: $(SIG_IMAGE_NAME)
CAPTURED_SIG_VERSION: $(CAPTURED_SIG_VERSION)
MANAGED_SIG_ID: $(MANAGED_SIG_ID)
PACKER_BUILD_LOCATION: $(PACKER_BUILD_LOCATION)
REPLICATIONS: $(REPLICATIONS)

- task: PublishPipelineArtifact@0
condition: succeeded()
displayName: Publish E2E VHD metadata
inputs:
artifactName: 'e2e-vhd-metadata-${{ parameters.artifactName }}-stage$(System.StageAttempt)-job$(System.JobAttempt)'
targetPath: '$(Build.ArtifactStagingDirectory)/e2e-vhd-metadata/${{ parameters.artifactName }}.json'

- task: AzureCLI@2
inputs:
azureSubscription: $(VHD_ARM_SERVICE_CONNECTION)
Expand All @@ -377,15 +337,23 @@ steps:
env:
SUBSCRIPTION_ID: $(SUBSCRIPTION_ID)
LOCATION: $(PACKER_BUILD_LOCATION)
PACKER_BUILD_LOCATION: $(PACKER_BUILD_LOCATION)
SIG_GALLERY_RESOURCE_GROUP_NAME: $(AZURE_RESOURCE_GROUP_NAME)
AZURE_RESOURCE_GROUP_NAME: $(AZURE_RESOURCE_GROUP_NAME)
SIG_GALLERY_NAME: $(SIG_GALLERY_NAME)
SIG_IMAGE_NAME: $(SIG_IMAGE_NAME)
SKU_NAME: $(SKU_NAME)
OS_SKU: $(OS_SKU)
STORAGE_ACCOUNT_BLOB_URL: $(CLASSIC_BLOB)
STORAGE_ACCOUNT_BLOB_URL_STAGING: $(CLASSIC_BLOB_STAGING)
VHD_NAME: $(VHD_NAME)
IMAGE_BUILDER_IDENTITY_ID: $(AZURE_MSI_RESOURCE_STRING)
BUILD_RUN_NUMBER: $(Build.BuildNumber)
BUILD_BUILDID: $(Build.BuildId)
BUILD_DEFINITION_NAME: $(Build.DefinitionName)
BUILD_NUMBER: $(Build.BuildNumber)
BRANCH: $(Build.SourceBranch)
IMG_SKU: $(IMG_SKU)
CAPTURED_SIG_VERSION: $(CAPTURED_SIG_VERSION)
HYPERV_GENERATION: $(HYPERV_GENERATION)
FEATURE_FLAGS: $(FEATURE_FLAGS)
Expand Down Expand Up @@ -509,6 +477,94 @@ steps:
)
displayName: Copy to Immutable Storage Container

- task: AzureCLI@2
inputs:
azureSubscription: $(VHD_ARM_SERVICE_CONNECTION)
scriptType: bash
scriptLocation: inlineScript
inlineScript: |
set -euo pipefail

metadata_file="${BUILD_ARTIFACTSTAGINGDIRECTORY:?}/e2e-vhd-metadata/${VHD_ARTIFACT_NAME}.json"

if [ -z "${MANAGED_SIG_ID:-}" ]; then
echo "##vso[task.logissue type=error]Packer did not return a managed SIG image version ID" >&2
exit 1
fi

regions="$(jq -nc \
--arg buildLocation "${PACKER_BUILD_LOCATION:?}" \
--arg replications "${REPLICATIONS:-}" \
'([$buildLocation] + ($replications | split(",") | map(split("=")[0] | gsub("^\\s+|\\s+$"; "")) | map(select(length > 0)))) | unique')"

metadata="$(jq -nc \
--arg imageName "${SIG_IMAGE_NAME:?}" \
--arg resourceId "${MANAGED_SIG_ID}" \
--arg version "${CAPTURED_SIG_VERSION:?}" \
--argjson regions "${regions}" \
'{($imageName): {resourceId: $resourceId, version: $version, regions: $regions}}')"

prefetch_settings="${GENERATE_PUBLISHING_INFO:-False}:${RUN_PREFETCH_OPTIMIZATION:-False}:${PREFETCH_COMPATIBLE:-False}"
case "${prefetch_settings,,}:${OS_SKU,,}:${FEATURE_FLAGS,,}" in
true:true:true:ubuntu:*cvm*|true:true:true:azurelinux:*cvm*)
# Preserve the capture entry; query the generalized version in the same gallery.
gallery_id="${MANAGED_SIG_ID%/images/*}"
generalized_id="${gallery_id}/images/${SKU_NAME:?}/versions/${CAPTURED_SIG_VERSION}"
echo "Reading generalized CVM image ${SKU_NAME}/${CAPTURED_SIG_VERSION} for E2E metadata"
if ! generalized_version="$(
az sig image-version show --ids "${generalized_id}" --expand ReplicationStatus \
--output json --only-show-errors
)"; then
echo "##vso[task.logissue type=warning]Unable to read generalized CVM image ${generalized_id}; omitting it from E2E metadata" >&2
elif ! generalized_entry="$(jq -ce --arg expectedId "${generalized_id}" --arg version "${CAPTURED_SIG_VERSION}" --arg buildLocation "${PACKER_BUILD_LOCATION}" '
select((.id | type) == "string") |
select((.id | ascii_downcase) == ($expectedId | ascii_downcase)) |
select(.provisioningState == "Succeeded" and
any(.replicationStatus.summary[]?; .region == $buildLocation and .state == "Completed")) |
{
resourceId: .id,
version: $version,
regions: ([.replicationStatus.summary[]? |
select(.state == "Completed") | .region |
select(type == "string" and length > 0)] | unique)
} |
select(.regions | length > 0)
' <<<"${generalized_version}")"; then
echo "##vso[task.logissue type=warning]Generalized CVM image ${generalized_id} is not ready with confirmed replica regions; omitting it from E2E metadata" >&2
else
metadata="$(jq -c --arg imageName "${SKU_NAME}" --argjson entry "${generalized_entry}" \
'. + {($imageName): $entry}' <<<"${metadata}")"
echo "Added image ready for E2Es: ${SKU_NAME}/${CAPTURED_SIG_VERSION}, replicated regions: $(jq -r '.regions | join(", ")' <<<"${generalized_entry}")"
fi
;;
esac

mkdir -p "$(dirname "${metadata_file}")"
printf '%s\n' "${metadata}" >"${metadata_file}"
echo "Created E2E VHD metadata: ${metadata_file}"
condition: succeeded()
displayName: Create E2E VHD metadata
env:
GENERATE_PUBLISHING_INFO: $(GENERATE_PUBLISHING_INFO)
RUN_PREFETCH_OPTIMIZATION: $(RUN_PREFETCH_OPTIMIZATION)
PREFETCH_COMPATIBLE: $(PREFETCH_COMPATIBLE)
VHD_ARTIFACT_NAME: ${{ parameters.artifactName }}
SIG_IMAGE_NAME: $(SIG_IMAGE_NAME)
SKU_NAME: $(SKU_NAME)
OS_SKU: $(OS_SKU)
FEATURE_FLAGS: $(FEATURE_FLAGS)
CAPTURED_SIG_VERSION: $(CAPTURED_SIG_VERSION)
MANAGED_SIG_ID: $(MANAGED_SIG_ID)
PACKER_BUILD_LOCATION: $(PACKER_BUILD_LOCATION)
REPLICATIONS: $(REPLICATIONS)

- task: PublishPipelineArtifact@0
condition: succeeded()
displayName: Publish E2E VHD metadata
inputs:
artifactName: 'e2e-vhd-metadata-${{ parameters.artifactName }}-stage$(System.StageAttempt)-job$(System.JobAttempt)'
targetPath: '$(Build.ArtifactStagingDirectory)/e2e-vhd-metadata/${{ parameters.artifactName }}.json'

- task: DownloadPipelineArtifact@2
displayName: Download Build Performance Program
condition: and(succeeded(), eq(variables.ENVIRONMENT, 'tme'))
Expand Down
42 changes: 42 additions & 0 deletions e2e/config/vhd.go
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,14 @@ var (
)

var (
VHDUbuntu2004CVMGen2Containerd = &Image{
Name: "2004gen2CVMcontainerd",
OS: OSUbuntu,
Arch: "amd64",
Distro: datamodel.AKSUbuntuContainerd2004CVMGen2,
Gallery: &Config.GalleryLinux,
}

VHDUbuntu2204Gen2Arm64Containerd = &Image{
Name: "2204gen2arm64containerd",
OS: OSUbuntu,
Expand Down Expand Up @@ -115,6 +123,14 @@ var (
Gallery: &Config.GalleryLinux,
}

VHDAzureLinuxV3CVMGen2 = &Image{
Name: "V3gen2CVM",
OS: OSAzureLinux,
Arch: "amd64",
Distro: datamodel.AKSAzureLinuxV3CVMGen2,
Gallery: &Config.GalleryLinux,
}

// VHDAzureLinuxV3Gen2Kata is the AzureLinux V3 Gen2 VHD built with FEATURE_FLAGS=kata.
// The image definition name mirrors the SIG_IMAGE_NAME produced by the VHD builder for
// OS_VERSION=V3kata + HYPERV_GENERATION=V2 (SKU_NAME=V3katagen2, prefixed with "AzureLinux").
Expand Down Expand Up @@ -154,6 +170,14 @@ var (
Gallery: &Config.GalleryLinux,
}

VHDUbuntu2404CVMGen2Containerd = &Image{
Name: "2404gen2CVMcontainerd",
OS: OSUbuntu,
Arch: "amd64",
Distro: datamodel.AKSUbuntuContainerd2404CVMGen2,
Gallery: &Config.GalleryLinux,
}

VHDUbuntu2404ArmContainerd = &Image{
Name: "2404gen2arm64containerd",
OS: OSUbuntu,
Expand All @@ -170,6 +194,14 @@ var (
Gallery: &Config.GalleryLinux,
}

VHDUbuntu2604MinimalCVMGen2Containerd = &Image{
Name: "2604minimalgen2CVMcontainerd",
OS: OSUbuntu,
Arch: "amd64",
Distro: datamodel.AKSUbuntuMinimalContainerd2604CVMGen2,
Gallery: &Config.GalleryLinux,
}

VHDUbuntu2604MinimalArm64Gen2Containerd = &Image{
Name: "2604minimalgen2arm64containerd",
OS: OSUbuntu,
Expand Down Expand Up @@ -197,6 +229,16 @@ var (
OSDiskSizeGB: 60,
}

VHDACLCVMGen2 = &Image{
Name: "aclgen2CVM",
OS: OSACL,
Arch: "amd64",
Distro: datamodel.AKSACLCVMGen2,
Gallery: &Config.GalleryLinux,
Flatcar: true,
OSDiskSizeGB: 60,
}

VHDACLArm64Gen2TL = &Image{
Name: "aclgen2arm64TL",
OS: OSACL,
Expand Down
3 changes: 2 additions & 1 deletion e2e/runner/filter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ func restoreRunnerConfig(t *testing.T) {
}

func TestMatchFiltersPreservesTagPolicy(t *testing.T) {
tags := scenario.Tags{Name: "Ubuntu2204", OS: "linux", GPU: true}
tags := scenario.Tags{Name: "Ubuntu2204", OS: "linux", GPU: true, CVM: true}
for _, test := range []struct {
filter string
all bool
Expand All @@ -132,6 +132,7 @@ func TestMatchFiltersPreservesTagPolicy(t *testing.T) {
{filter: "Name=Ubuntu2204,GPU=false", all: true, match: false},
{filter: "Name=Ubuntu2204,GPU=false", all: false, match: true},
{filter: " os = LINUX , gpu = true ", all: true, match: true},
{filter: "CVM=true", all: true, match: true},
{filter: "", all: true, match: true},
} {
t.Run(test.filter, func(t *testing.T) {
Expand Down
Loading
Loading