Skip to content
This repository has been archived by the owner on Feb 15, 2024. It is now read-only.

testing #643

Open
wants to merge 6 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
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
126 changes: 103 additions & 23 deletions linux_pipeline/Jenkinsfile_ubuntu_azure_kernel_validation
Original file line number Diff line number Diff line change
Expand Up @@ -153,9 +153,9 @@ def sendSignOffMail(mailType,warningMessage) {
properties ([
overrideIndexTriggers(false),
parameters([
choice (name: 'Distro', choices: 'trusty\nxenial\nbionic\nfocal\ngroovy\nhirsute',
description: 'trusty - 14.04 validation <br> xenial - 16.04 validation <br> bionic - 18.04 validation <br> focal - 20.04 validation <br> groovy - 20.10 validation <br> hirsute - 21.04 validation '),
choice (name: 'KernelType', choices: 'linux-azure\nlinux-azure-edge',
choice (name: 'Distro', choices: 'trusty\nxenial\nbionic\nfocal\ngroovy\nhirsute\nimpish',
description: 'trusty - 14.04 validation <br> xenial - 16.04 validation <br> bionic - 18.04 validation <br> focal - 20.04 validation <br> groovy - 20.10 validation <br> hirsute - 21.04 validation <br> impish - 21.10 validation '),
choice (name: 'KernelType', choices: 'linux-azure\nlinux-azure-edge\nlinux-image-azure-lts-18.04\nesm\nlinux-azure-fips\nlinux-image-azure-lts-20.04\nlinux-image-azure-fde\n',
description: 'linux-azure - latest proposed linux-azure kernel validation <br> linux-azure-edge - latest proposed linux-azure-edge kernel validation'),
string(name: 'KernelVersion', defaultValue: "", description: 'The exact kernel version to be tested. Example: 5.0.0.1010.9. If left empty, the latest kernel version for the selected distro/kernel type will be used.'),
choice (name: 'ValidationAzure', choices: 'yes\nno',
Expand All @@ -174,13 +174,15 @@ def ARM_DISTRO_HASH = [trusty:'Canonical UbuntuServer 14.04.5-LTS latest',
bionic:'Canonical UbuntuServer 18.04-LTS latest',
focal:'canonical 0001-com-ubuntu-server-focal 20_04-lts latest',
groovy:'canonical 0001-com-ubuntu-server-groovy 20_10 latest',
hirsute:'Canonical 0001-com-ubuntu-server-hirsute 21_04 latest']
hirsute:'Canonical 0001-com-ubuntu-server-hirsute 21_04 latest',
impish:'canonical 0001-com-ubuntu-server-impish 21_10 latest']
def HYPERV_VHD_HASH = [trusty:'Ubuntu_14.04.5\\Ubuntu14.04.5-server.vhdx',
xenial:'ubuntu_16.04.5\\ubuntu_16.04.5.vhdx',
bionic:'ubuntu_18.04.1\\ubuntu_18.04.1_gen1_gen2.vhdx',
focal:'ubuntu_20.04\\ubuntu_20.04.vhdx',
groovy:'ubuntu_20.04\\ubuntu_20.04.vhdx',
hirsute:'ubuntu_20.04\\ubuntu_20.04.vhdx']
hirsute:'ubuntu_20.04\\ubuntu_20.04.vhdx',
impish:'ubuntu_20.04\\ubuntu_20.04.vhdx']

def HYPERV_VALIDATION_TESTS_HASH = [HV_P0:"-TestPriority 0 -ExcludeTests '^NVME,^SRIOV-*,^LIVE-MIGRATE*,ETHTOOL-OFFLOADING-SETTING,ETHTOOL-OFFLOADING-SETTING-3NICS,^LIS-DEPLOY*'",
HV_P1:"-TestPriority 1 -ExcludeTests '^PERF-*,^NVME-*,^SRIOV-*,^LIVE-MIGRATE*,DYNAMIC-MEMORY-HIGH-PRIORITY,^LIS-PREINSTALL*'",
Expand All @@ -203,9 +205,9 @@ def AZURE_PERFORMANCE_TESTS_HASH = [PERF_NTTTCP:"-TestNames 'PERF-NETWORK-TCP-TH
LATEST_VERSION_LOCATION="/home/lisa/latest_versions.sh"
LABEL_SRIOV = "sriov_mlnx"
LABEL_WS2016 = "ubuntu_azure_kernel_validation"
LISAV2_REMOTE = "https://github.com/lis/LISAv2.git"
LISAV2_BRANCH = "master"
AZURE_LOCATION_DEFAULT = ""
LISAV2_REMOTE = "https://github.com/LiliDeng/LISAv2.git"
LISAV2_BRANCH = "fix_issues"
AZURE_LOCATION_DEFAULT = "westus2"
AZURE_LOCATION_NVME = "westus2"
AZURE_LOCATION_PERF = "westus2"
AZURE_LOCATION_SGX = "uksouth"
Expand All @@ -218,9 +220,24 @@ def HYPERV_VHD = HYPERV_VHD_HASH.find{it.key == env.distro}.value
if (env.KernelType == "linux-azure") {
env.KERNEL_TYPE = "proposed-azure"
}
if (env.KernelType == "linux-azure-edge"){
if (env.KernelType == "linux-azure-edge") {
env.KERNEL_TYPE = "proposed-edge"
}
if (env.KernelType == "linux-image-azure-lts-18.04") {
env.KERNEL_TYPE = "linux-image-azure-lts-18.04"
}
if (env.KernelType == "esm") {
env.KERNEL_TYPE = "esm"
}
if (env.KernelType == "linux-azure-fips") {
env.KERNEL_TYPE = "linux-azure-fips"
}
if (env.KernelType == "linux-image-azure-lts-20.04") {
env.KERNEL_TYPE = "linux-image-azure-lts-20.04"
}
if (env.KernelType == "linux-image-azure-fde") {
env.KERNEL_TYPE = "linux-image-azure-fde"
}

env.START_DATE = new java.sql.Timestamp(new Date().getTime())
env.END_DATE = ""
Expand Down Expand Up @@ -283,6 +300,9 @@ if (env.ValidationAzure == 'yes') {
if ("${env.distro}" == "bionic") {
ARM_GEN2_DISTRO = "Canonical UbuntuServer 18_04-lts-gen2 latest"
}
if ("${env.distro}" == "impish") {
ARM_GEN2_DISTRO = "canonical 0001-com-ubuntu-server-impish 21_10-gen2 latest"
}
if ("${env.distro}" == "xenial") {
ARM_GEN2_DISTRO = "Canonical UbuntuServer 16_04-lts-gen2 latest"
}
Expand Down Expand Up @@ -322,6 +342,19 @@ if (env.ValidationAzure == 'yes') {
" -ExitWithZero -ForceCustom" +
" ${test_cmd}"
)
} else if (KERNEL_TYPE == "linux-image-azure-fde") {
echo "Run-LisaV2.ps1 -TestPlatform 'Azure' -ARMImageName '${ARM_GEN2_DISTRO}' -RGIdentifier '${AZURE_ID}' -TestLocation '${AZURE_LOCATION}' -CustomKernel '${KERNEL_TYPE}' ${test_cmd} -XMLSecretFile '${Azure_Secrets_File}'"
RunPowershellCommand(".\\Run-LisaV2.ps1" +
" -TestLocation '${AZURE_LOCATION}'" +
" -RGIdentifier '${AZURE_ID}'" +
" -TestPlatform 'Azure'" +
" -CustomKernel '${KERNEL_TYPE}'" +
" -ARMImageName '${ARM_GEN2_DISTRO}'" +
" -XMLSecretFile '${Azure_Secrets_File}'" +
" -EnableTelemetry" +
" -ExitWithZero -ForceCustom" +
" ${test_cmd}"
)
} else {
echo "Run-LisaV2.ps1 -TestPlatform 'Azure' -ARMImageName '${ARM_DISTRO}' -RGIdentifier '${AZURE_ID}' -TestLocation '${AZURE_LOCATION}' -CustomKernel '${KERNEL_TYPE}' ${test_cmd} -XMLSecretFile '${Azure_Secrets_File}'"
RunPowershellCommand(".\\Run-LisaV2.ps1" +
Expand Down Expand Up @@ -495,20 +528,57 @@ if (env.PerformanceAzure == "yes") {
} catch (exc) {
println exc
}
def ARM_GEN2_DISTRO = ""
script {
if ("${env.distro}" == "bionic") {
ARM_GEN2_DISTRO = "Canonical UbuntuServer 18_04-lts-gen2 latest"
}
if ("${env.distro}" == "impish") {
ARM_GEN2_DISTRO = "canonical 0001-com-ubuntu-server-impish 21_10-gen2 latest"
}
if ("${env.distro}" == "xenial") {
ARM_GEN2_DISTRO = "Canonical UbuntuServer 16_04-lts-gen2 latest"
}
if ("${env.distro}" == "focal") {
ARM_GEN2_DISTRO = "canonical 0001-com-ubuntu-server-focal 20_04-lts-gen2 latest"
}
if ("${env.distro}" == "groovy") {
ARM_GEN2_DISTRO = "canonical 0001-com-ubuntu-server-groovy 20_10-gen2 latest"
}
if ("${env.distro}" == "hirsute") {
ARM_GEN2_DISTRO = "canonical 0001-com-ubuntu-server-hirsute 21_04-gen2 latest"
}
}

echo "Run-LisaV2.ps1 -TestPlatform 'Azure' -ARMImageName '${ARM_DISTRO}' -RGIdentifier '${AZURE_ID}' -TestLocation '${AZURE_LOCATION_PERF}' -CustomKernel '${KERNEL_TYPE}' ${test_cmd} -XMLSecretFile '${Azure_Secrets_File}'"
RunPowershellCommand(".\\Run-LisaV2.ps1" +
" -TestLocation '${AZURE_LOCATION_PERF}'" +
" -RGIdentifier '${AZURE_ID}'" +
" -TestPlatform 'Azure'" +
" -CustomKernel '${KERNEL_TYPE}'" +
" -ARMImageName '${ARM_DISTRO}'" +
" -XMLSecretFile '${Azure_Secrets_File}'" +
" -EnableTelemetry" +
" -ExitWithZero -ForceCustom" +
" -ResultDBTestTag '${env.distro}_${env.KernelType}_${env.BUILD_NUMBER}'" +
" ${test_cmd}"
)
if (KERNEL_TYPE == "linux-image-azure-fde") {
echo "Run-LisaV2.ps1 -TestPlatform 'Azure' -ARMImageName '${ARM_GEN2_DISTRO}' -RGIdentifier '${AZURE_ID}' -TestLocation '${AZURE_LOCATION_DEFAULT}' -CustomKernel '${KERNEL_TYPE}' ${test_cmd} -XMLSecretFile '${Azure_Secrets_File}'"
RunPowershellCommand(".\\Run-LisaV2.ps1" +
" -TestLocation '${AZURE_LOCATION_DEFAULT}'" +
" -RGIdentifier '${AZURE_ID}'" +
" -TestPlatform 'Azure'" +
" -CustomKernel '${KERNEL_TYPE}'" +
" -ARMImageName '${ARM_GEN2_DISTRO}'" +
" -XMLSecretFile '${Azure_Secrets_File}'" +
" -EnableTelemetry" +
" -ExitWithZero -ForceCustom" +
" -ResultDBTestTag '${env.distro}_${env.KernelType}_${env.BUILD_NUMBER}'" +
" ${test_cmd}"
)
} else {
echo "Run-LisaV2.ps1 -TestPlatform 'Azure' -ARMImageName '${ARM_DISTRO}' -RGIdentifier '${AZURE_ID}' -TestLocation '${AZURE_LOCATION_DEFAULT}' -CustomKernel '${KERNEL_TYPE}' ${test_cmd} -XMLSecretFile '${Azure_Secrets_File}'"
RunPowershellCommand(".\\Run-LisaV2.ps1" +
" -TestLocation '${AZURE_LOCATION_DEFAULT}'" +
" -RGIdentifier '${AZURE_ID}'" +
" -TestPlatform 'Azure'" +
" -CustomKernel '${KERNEL_TYPE}'" +
" -ARMImageName '${ARM_DISTRO}'" +
" -XMLSecretFile '${Azure_Secrets_File}'" +
" -EnableTelemetry" +
" -ExitWithZero -ForceCustom" +
" -ResultDBTestTag '${env.distro}_${env.KernelType}_${env.BUILD_NUMBER}'" +
" ${test_cmd}"
)
}
archiveArtifacts artifacts: '*-TestLogs.zip', allowEmptyArchive: true
junit testResults: "Report\\*-junit.xml", allowEmptyResults: true

Expand Down Expand Up @@ -544,8 +614,18 @@ node ("meta_slave") {
echo "Send email with kernel validation results link"
if (env.KernelType == "linux-azure") {
version_identifier = "_azure"
} else {
} else if (env.KernelType == "linux-azure-edge") {
version_identifier = "_edge"
} else if (env.KernelType == "linux-image-azure-lts-18.04") {
version_identifier = "_azure_lts_1804"
} else if (env.KernelType == "esm") {
version_identifier = "_esm"
} else if (env.KernelType == "linux-azure-fips") {
version_identifier = "_azure_fips"
} else if (env.KernelType == "linux-image-azure-lts-20.04") {
version_identifier = "_azure_lts_2004"
} else if (env.KernelType == "linux-image-azure-fde") {
version_identifier = "_azure_fde"
}
def kernels_info = ""
try {
Expand Down
2 changes: 1 addition & 1 deletion linux_pipeline/Jenkinsfile_ubuntu_azure_kernel_watcher
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ node ("meta_slave") {
SEND_MAIL = "yes"
println "TRIGGERING the testing for ${distro} distro, ${kernel} kernel - ${latest_kernel_version}"
MESSAGE_LIST = MESSAGE_LIST + "<br>${distro} ${latest_kernel_version} ${kernel} kernel, "
build (job: "${env.PIPELINE_NAME}/master",
build (job: "${env.PIPELINE_NAME}/PR-624",
parameters: [
string(name: 'Distro', value: "${distro}"),
string(name: 'KernelType', value: "${kernel}"),
Expand Down
29 changes: 26 additions & 3 deletions scripts/ubuntu_azure_kernel/ubuntu_azure_kernel_watcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,15 @@ function Search_New_Kernel() {
old_kernel_version=$3
if [ ${kernel_type} == "linux-azure" ]; then
kernel_type_short="_azure"
else
elif [ ${kernel_type} == "linux-azure-edge" ]; then
kernel_type_short="_edge"
elif [ ${kernel_type} == "linux-image-azure-lts-18.04" ]; then
kernel_type_short="_azure_lts_1804"
elif [ ${kernel_type} == "linux-image-azure-lts-20.04" ]; then
kernel_type_short="_azure_lts_2004"
elif [ ${kernel_type} == "linux-image-azure-fde" ]; then
kernel_type_short="_azure_fde"
fi

latest_kernel=$(sudo apt-cache madison ${kernel_type} | grep ${release}-proposed | awk '{print $3}')
if [ ! -z $latest_kernel ]; then
echo "Latest $kernel_type Kernel for $release is $latest_kernel"
Expand Down Expand Up @@ -93,7 +98,7 @@ EOM
}

# Main
RELEASES=(trusty xenial bionic focal groovy hirsute)
RELEASES=(trusty xenial bionic focal groovy hirsute impish)
VERSION_HISTORY_LOCATION="/home/lisa/latest_versions.sh"
VERSION_TO_TEST_LOCATION="/home/lisa/version_to_test.sh"
. $VERSION_HISTORY_LOCATION
Expand All @@ -107,13 +112,31 @@ for release in ${RELEASES[@]}; do
azure_release="${!variable_name}"
variable_name="${release}_edge"
edge_release="${!variable_name}"
variable_name="${release}_azure_lts_1804"
azure_lts_1804_release="${!variable_name}"
variable_name="${release}_azure_lts_2004"
azure_lts_2004_release="${!variable_name}"
variable_name="${release}_azure_fde"
azure_fde_release="${!variable_name}"

latest_azure=$(sudo apt-cache madison linux-azure | grep ${release}-proposed | awk '{print $3}')
latest_edge=$(sudo apt-cache madison linux-azure-edge | grep ${release}-proposed | awk '{print $3}')
latest_azure_lts_1804=$(sudo apt-cache madison linux-image-azure-lts-18.04 | grep ${release}-proposed | awk '{print $3}')
latest_azure_lts_2004=$(sudo apt-cache madison linux-image-azure-lts-20.04 | grep ${release}-proposed | awk '{print $3}')
latest_azure_fde=$(sudo apt-cache madison linux-image-azure-fde | grep ${release}-proposed | awk '{print $3}')

# Check linux-azure proposed kernel for a new version
Search_New_Kernel $release "linux-azure" $azure_release

# Check linux-azure-edge proposed kernel for a new version
Search_New_Kernel $release "linux-azure-edge" $edge_release

# Check linux-image-azure-lts-18.04 proposed kernel for a new version
Search_New_Kernel $release "linux-image-azure-lts-18.04" $azure_lts_1804_release

# Check linux-image-azure-lts-20.04 proposed kernel for a new version
Search_New_Kernel $release "linux-image-azure-lts-20.04" $latest_azure_lts_2004

# Check linux-image-azure-fde proposed kernel for a new version
Search_New_Kernel $release "linux-image-azure-fde" $latest_azure_fde
done