From a2b3950ac21d9af6faaf74a71a3bbf762bbdf5f4 Mon Sep 17 00:00:00 2001 From: Jeremi Piotrowski Date: Thu, 26 Aug 2021 19:12:47 +0200 Subject: [PATCH] jenkins: add support for running tests on Azure Gen2 VMs This requires passing the --azure-hyper-v-generation=V2 argument to kola. The vhd/image is the same as for azure gen1 vms, the azure_gen2 specifier is only for jenkins usage. Signed-off-by: Jeremi Piotrowski --- jenkins/formats-amd64-usr.txt | 1 + jenkins/kola/azure.sh | 1 + jenkins/vms.sh | 9 +++++++++ 3 files changed, 11 insertions(+) diff --git a/jenkins/formats-amd64-usr.txt b/jenkins/formats-amd64-usr.txt index 4f965a48e9..2f3f7cb14c 100644 --- a/jenkins/formats-amd64-usr.txt +++ b/jenkins/formats-amd64-usr.txt @@ -2,6 +2,7 @@ ami ami_vmdk ami_vmdk_pro azure +azure_gen2 azure_pro gce gce_pro diff --git a/jenkins/kola/azure.sh b/jenkins/kola/azure.sh index 8a9a3f0702..d97475047e 100755 --- a/jenkins/kola/azure.sh +++ b/jenkins/kola/azure.sh @@ -43,5 +43,6 @@ timeout --signal=SIGQUIT 20h bin/kola run \ --tapfile="${JOB_NAME##*/}.tap" \ --torcx-manifest=torcx_manifest.json \ ${AZURE_MACHINE_SIZE_OPT} \ + ${AZURE_HYPER_V_GENERATION:+--azure-hyper-v-generation=${AZURE_HYPER_V_GENERATION}} \ ${KOLA_TESTS} set +o noglob diff --git a/jenkins/vms.sh b/jenkins/vms.sh index 98efcbdb4d..eee3d719bf 100755 --- a/jenkins/vms.sh +++ b/jenkins/vms.sh @@ -85,6 +85,15 @@ if [[ "${FORMATS}" = "" ]] then FORMATS="${FORMAT}" fi + +if [[ "${FORMATS}" == *"azure_gen2"* ]] ; then + # azure_gen2 shares an image with azure + if [[ " ${FORMATS} " != *" azure "* ]]; then + FORMATS+=" azure" + fi + FORMATS=${FORMATS/azure_gen2/} +fi + for FORMAT in ${FORMATS}; do # If the format variable ends with _pro it's a Flatcar Pro image and it should # be uploaded to the private bucket.