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

Commit

Permalink
Add linux-image-azure-fde.
Browse files Browse the repository at this point in the history
  • Loading branch information
LiliDeng committed Jun 30, 2021
1 parent 46afd31 commit 9236f33
Show file tree
Hide file tree
Showing 2 changed files with 74 additions and 14 deletions.
80 changes: 66 additions & 14 deletions linux_pipeline/Jenkinsfile_ubuntu_azure_kernel_validation
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ properties ([
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\nlinux-image-azure-lts-18.04\nesm\nlinux-azure-fips\nlinux-image-azure-lts-20.04\n',
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 Down Expand Up @@ -232,6 +232,9 @@ if (env.KernelType == "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 @@ -333,6 +336,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 @@ -506,20 +522,54 @@ 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}" == "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_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}"
)
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 @@ -565,6 +615,8 @@ node ("meta_slave") {
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
8 changes: 8 additions & 0 deletions scripts/ubuntu_azure_kernel/ubuntu_azure_kernel_watcher.sh
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,8 @@ function Search_New_Kernel() {
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
Expand Down Expand Up @@ -114,11 +116,14 @@ for release in ${RELEASES[@]}; do
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
Expand All @@ -131,4 +136,7 @@ for release in ${RELEASES[@]}; do

# 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

0 comments on commit 9236f33

Please sign in to comment.