Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: make linux e2e tests run for the VHD they are built for. #5456

Open
wants to merge 18 commits into
base: dev
Choose a base branch
from
Open
188 changes: 73 additions & 115 deletions .pipelines/.vsts-vhd-builder-release-windows.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -3,57 +3,60 @@ trigger: none
pr:
branches:
include:
- master
- dev
- master
- dev
paths:
include:
- .pipelines/.vsts-vhd-builder-release-windows.yaml
- .pipelines/templates/.builder-release-template-windows.yaml
- packer.mk
- vhdbuilder/packer/packer-plugin.pkr.hcl
- vhdbuilder/packer/*.ps1
- vhdbuilder/packer/test/*.ps1
- vhdbuilder/packer/test/run-test.sh
- vhdbuilder/packer/backfill-cleanup.sh
- vhdbuilder/packer/cleanup.sh
- vhdbuilder/packer/convert-sig-to-classic-storage-account-blob.sh
- vhdbuilder/packer/generate-vhd-publishing-info.sh
- vhdbuilder/packer/init-variables.sh
- vhdbuilder/packer/windows-image.env
- vhdbuilder/packer/windows-vhd-builder-sig.json
- .pipelines/.vsts-vhd-builder-release-windows.yaml
- .pipelines/templates/.build-and-test-all-windows-vhds-template.yaml
- .pipelines/templates/.build-and-test-windows-vhd-template.yaml
- .pipelines/templates/.builder-release-template-windows.yaml
- .pipelines/templates/.e2e-template.yaml
- packer.mk
- vhdbuilder/packer/packer-plugin.pkr.hcl
- vhdbuilder/packer/*.ps1
- vhdbuilder/packer/test/*.ps1
- vhdbuilder/packer/test/run-test.sh
- vhdbuilder/packer/backfill-cleanup.sh
- vhdbuilder/packer/cleanup.sh
- vhdbuilder/packer/convert-sig-to-classic-storage-account-blob.sh
- vhdbuilder/packer/generate-vhd-publishing-info.sh
- vhdbuilder/packer/init-variables.sh
- vhdbuilder/packer/windows-image.env
- vhdbuilder/packer/windows-vhd-builder-sig.json

pool:
name: $(AZURE_POOL_NAME)

parameters:
- name: build2019containerd
displayName: Build 2019 containerd
type: boolean
default: True
- name: build2022containerd
displayName: Build 2022 containerd
type: boolean
default: True
- name: build2022containerdgen2
displayName: Build 2022 containerd Gen 2
type: boolean
default: True
- name: build23H2
displayName: Build 23H2
type: boolean
default: True
- name: build23H2gen2
displayName: Build 23H2 Gen 2
type: boolean
default: True
- name: dryrun
displayName: Dry run
type: boolean
default: False
- name: vhddebug
displayName: VHD Debug
type: boolean
default: False
- name: build2019containerd
displayName: Build 2019 containerd
type: boolean
default: True
- name: build2022containerd
displayName: Build 2022 containerd
type: boolean
default: True
- name: build2022containerdgen2
displayName: Build 2022 containerd Gen 2
type: boolean
default: True
- name: build23H2
displayName: Build 23H2
type: boolean
default: True
- name: build23H2gen2
displayName: Build 23H2 Gen 2
type: boolean
default: True
- name: dryrun
displayName: Dry run
type: boolean
default: False
- name: vhddebug
displayName: VHD Debug
type: boolean
default: False

variables:
VHD_BUILD_ID: $(Build.BuildId)
Expand All @@ -64,82 +67,37 @@ variables:
# Use variable group "ab-windows-ms-tenant" and link it to the pipeline "[TEST All VHDs] AKS Windows VHD Build - Msft Tenant"

stages:
- template: ./templates/.build-and-test-windows-vhd-template.yaml
- template: ./templates/.build-and-test-all-windows-vhds-template.yaml
parameters:
stageName: win_2019_v1
artifactName: 2019-containerd
imageName: windows-2019-containerd
windowsSku: 2019-containerd
hyperVGeneration: V1
build: ${{ parameters.build2019containerd }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}

- template: ./templates/.build-and-test-windows-vhd-template.yaml
parameters:
stageName: win_2022_v1
artifactName: 2022-containerd
imageName: windows-2022-containerd
windowsSku: 2022-containerd
hyperVGeneration: V1
build: ${{ parameters.build2022containerd }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}

- template: ./templates/.build-and-test-windows-vhd-template.yaml
parameters:
stageName: win_2022_v2
artifactName: 2022-containerd-gen2
imageName: windows-2022-containerd-gen2
windowsSku: 2022-containerd-gen2
hyperVGeneration: V2
build: ${{ parameters.build2022containerdgen2 }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}

- template: ./templates/.build-and-test-windows-vhd-template.yaml
parameters:
stageName: win_23H2_v1
artifactName: 23H2
imageName: windows-23H2
windowsSku: 23H2
hyperVGeneration: V1
build: ${{ parameters.build23H2 }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}

- template: ./templates/.build-and-test-windows-vhd-template.yaml
parameters:
stageName: win_23H2_v2
artifactName: 23H2-gen2
imageName: windows-23H2-gen2
windowsSku: 23H2-gen2
hyperVGeneration: V2
build: ${{ parameters.build23H2gen2 }}
vhddebug: ${{ parameters.vhddebug }}
dryrun: ${{ parameters.dryrun }}
build2019containerd: ${{ parameters.build2019containerd }}
build2022containerd: ${{ parameters.build2022containerd }}
build2022containerdgen2: ${{ parameters.build2022containerdgen2 }}
build23H2: ${{ parameters.build23H2 }}
build23H2gen2: ${{ parameters.build23H2gen2 }}

- stage: backfill_cleanup_outdated_resources
dependsOn: []
condition: always()
jobs:
- job: build
timeoutInMinutes: 180
steps:
- bash: |
m="windowsVhdMode"
echo "Set build mode to $m" && \
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e SUBSCRIPTION_ID="${AZURE_BUILD_SUBSCRIPTION_ID}" \
-e PROD_SUBSCRIPTION_ID=${AZURE_PROD_SUBSCRIPTION_ID} \
-e AZURE_RESOURCE_GROUP_NAME=${AZURE_BUILD_RESOURCE_GROUP_NAME} \
-e MODE=$m \
-e DRY_RUN=${DRY_RUN} \
-e SIG_GALLERY_NAME=${SIG_GALLERY_NAME} \
-e OS_TYPE="Windows" \
${AZURE_CONTAINER_IMAGE} make -f packer.mk backfill-cleanup
enabled: false
displayName: Backfill Clean Up Older Resources
condition: eq(variables.ENABLE_BACKFILL_CLEANUP, 'True')
- job: build
timeoutInMinutes: 180
steps:
- bash: |
m="windowsVhdMode"
echo "Set build mode to $m" && \
docker run --rm \
-v ${PWD}:/go/src/github.com/Azure/AgentBaker \
-w /go/src/github.com/Azure/AgentBaker \
-e SUBSCRIPTION_ID="${AZURE_BUILD_SUBSCRIPTION_ID}" \
-e PROD_SUBSCRIPTION_ID=${AZURE_PROD_SUBSCRIPTION_ID} \
-e AZURE_RESOURCE_GROUP_NAME=${AZURE_BUILD_RESOURCE_GROUP_NAME} \
-e MODE=$m \
-e DRY_RUN=${DRY_RUN} \
-e SIG_GALLERY_NAME=${SIG_GALLERY_NAME} \
-e OS_TYPE="Windows" \
${AZURE_CONTAINER_IMAGE} make -f packer.mk backfill-cleanup
enabled: false
displayName: Backfill Clean Up Older Resources
condition: eq(variables.ENABLE_BACKFILL_CLEANUP, 'True')
Loading