Skip to content

Commit fc89690

Browse files
committed
jobs/kola-azure: run kola tests on both managed and Gen2 Gallery Images
Expand the job to build Hyper-V Gen2 gallery images and run kola tests on both traditional managed images and new Gen2 gallery images[1]. The new NVMe test[2] is explicitly denylisted from managed image testing since since it requires Gen2 support. This will essentially allow all Azure kola tests to be validated on both kinds of images. A pipeline config variable, `test_gallery`, is introduced to the Azure section to specify the gallery used to create Gen2 images. [1]: coreos/coreos-assembler#4109 [2]: coreos/fedora-coreos-config#3519
1 parent 4f828f2 commit fc89690

File tree

2 files changed

+69
-11
lines changed

2 files changed

+69
-11
lines changed

config.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,7 @@ clouds:
9393
test_resource_group: fedora-coreos-testing
9494
test_storage_account: fedoracoreostesting
9595
test_storage_container: fedora-coreos-testing-image-blobs
96+
test_gallery: fedora-coreos-testing-gallery
9697
test_architectures: [x86_64]
9798
gcp:
9899
bucket: fedora-coreos-cloud-image-uploads/image-import

jobs/kola-azure.Jenkinsfile

Lines changed: 68 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,7 @@ cosaPod(memory: "${cosa_memory_request_mb}Mi", kvm: false,
9494
def azure_testing_resource_group = pipecfg.clouds?.azure?.test_resource_group
9595
def azure_testing_storage_account = pipecfg.clouds?.azure?.test_storage_account
9696
def azure_testing_storage_container = pipecfg.clouds?.azure?.test_storage_container
97+
def azure_testing_gallery = pipecfg.clouds?.azure?.test_gallery
9798

9899
stage('Upload/Create Image') {
99100
// Create the image in Azure
@@ -129,23 +130,79 @@ cosaPod(memory: "${cosa_memory_request_mb}Mi", kvm: false,
129130
""")
130131
}
131132

133+
stage('Upload/Create Gallery Image') {
134+
// use the existing blob to create the
135+
// Shared Image Gallery image in Azure
136+
// using Hyper-V Gen2 (V2)
137+
shwrap("""
138+
# First delete the gallery image
139+
ore azure delete-gallery-image --log-level=INFO \
140+
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
141+
--azure-location $region \
142+
--resource-group $azure_testing_resource_group \
143+
--gallery-name $azure_testing_gallery \
144+
--gallery-image-name $azure_image_name
145+
# Then create a fresh gallery image. Note that this will
146+
# create the testing gallery if it does not exist, but
147+
# it will be a no-op on gallery creation given the
148+
# gallery exists in the specified region.
149+
ore azure create-gallery-image --log-level=INFO
150+
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
151+
--azure-location $region \
152+
--resource-group $azure_testing_resource_group \
153+
--azure-hyper-v-generation "V2" \
154+
--gallery-image-name $azure_image_name \
155+
--source-image /subscriptions/${azure_subscription}/resourceGroups/${azure_testing_resource_group}/providers/Microsoft.Compute/images/${azure_image_name}
156+
""")
157+
}
158+
132159
// Since we don't have permanent images uploaded to Azure we'll
133160
// skip the upgrade test.
134161
try {
135162
def azure_subscription = shwrapCapture("jq -r .subscription \${AZURE_KOLA_TESTS_CONFIG}")
136-
kola(cosaDir: env.WORKSPACE, parallel: 10,
137-
build: params.VERSION, arch: params.ARCH,
138-
extraArgs: params.KOLA_TESTS,
139-
skipUpgrade: true,
140-
skipKolaTags: stream_info.skip_kola_tags,
141-
platformArgs: """-p=azure \
142-
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
143-
--azure-location $region \
144-
--azure-disk-uri /subscriptions/${azure_subscription}/resourceGroups/${azure_testing_resource_group}/providers/Microsoft.Compute/images/${azure_image_name}""")
163+
164+
// Run tests on the traditional managed image.
165+
// The NVMe test is explicitly denied because it requires
166+
// Hyper-V Gen2 Gallery images with NVMe support.
167+
stage('Managed Image Kola Tests') {
168+
kola(cosaDir: env.WORKSPACE, parallel: 10,
169+
build: params.VERSION, arch: params.ARCH,
170+
extraArgs: params.KOLA_TESTS,
171+
skipUpgrade: true,
172+
skipKolaTags: stream_info.skip_kola_tags,
173+
platformArgs: """-p=azure \
174+
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
175+
--azure-location $region \
176+
--azure-disk-uri /subscriptions/${azure_subscription}/resourceGroups/${azure_testing_resource_group}/providers/Microsoft.Compute/images/${azure_image_name} \
177+
--denylist-test ext.config.platforms.azure.nvme""")
178+
}
179+
180+
// run kola tests on Hyper-V Gen2 Gallery Images.
181+
// Gen2 images require a VM size that supports UEFI boot;
182+
// Standard_D2s_v3 is set here to override the default size.
183+
stage ('Gallery Image Kola Tests') {
184+
kola(cosaDir: env.WORKSPACE, parallel: 10,
185+
build: params.VERSION, arch: params.ARCH,
186+
extraArgs: params.KOLA_TESTS,
187+
skipUpgrade: true,
188+
skipKolaTags: stream_info.skip_kola_tags,
189+
platformArgs: """-p=azure \
190+
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
191+
--azure-location $region \
192+
--azure-size "Standard_D2s_v3" \
193+
--azure-hyper-v-generation "V2" \
194+
--azure-disk-uri /subscriptions/${azure_subscription}/resourceGroups/${azure_testing_resource_group}/providers/Microsoft.Compute/galleries/${azure_testing_gallery}/images/${azure_image_name}/versions/1.0.0""")
195+
}
145196
} finally {
146-
parallel "Delete Image": {
147-
// Delete the image in Azure
197+
parallel "Delete Images": {
198+
// Delete the images in Azure
148199
shwrap("""
200+
ore azure delete-gallery-image --log-level=INFO \
201+
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
202+
--azure-location $region \
203+
--resource-group $azure_testing_resource_group \
204+
--gallery-name $azure_testing_gallery \
205+
--gallery-image-name $azure_image_name
149206
ore azure delete-image --log-level=INFO \
150207
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
151208
--azure-location $region \

0 commit comments

Comments
 (0)