@@ -94,6 +94,7 @@ cosaPod(memory: "${cosa_memory_request_mb}Mi", kvm: false,
94
94
def azure_testing_resource_group = pipecfg.clouds?.azure?.test_resource_group
95
95
def azure_testing_storage_account = pipecfg.clouds?.azure?.test_storage_account
96
96
def azure_testing_storage_container = pipecfg.clouds?.azure?.test_storage_container
97
+ def azure_testing_gallery = pipecfg.clouds?.azure?.test_gallery
97
98
98
99
stage('Upload/Create Image') {
99
100
// Create the image in Azure
@@ -129,23 +130,79 @@ cosaPod(memory: "${cosa_memory_request_mb}Mi", kvm: false,
129
130
""")
130
131
}
131
132
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
+
132
159
// Since we don't have permanent images uploaded to Azure we'll
133
160
// skip the upgrade test.
134
161
try {
135
162
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
+ }
145
196
} finally {
146
- parallel "Delete Image ": {
147
- // Delete the image in Azure
197
+ parallel "Delete Images ": {
198
+ // Delete the images in Azure
148
199
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
149
206
ore azure delete-image --log-level=INFO \
150
207
--azure-credentials \${AZURE_KOLA_TESTS_CONFIG} \
151
208
--azure-location $region \
0 commit comments