build: Move Jenkins workers over to jammy

Fixes: #3862

Signed-off-by: Rob Bradford <robert.bradford@intel.com>
This commit is contained in:
Rob Bradford 2022-05-23 16:06:53 +01:00
parent 87c0791d53
commit f8f0b40e94
2 changed files with 7 additions and 16 deletions

10
Jenkinsfile vendored
View File

@ -56,7 +56,7 @@ pipeline{
stage ('Build') {
parallel {
stage ('Worker build') {
agent { node { label 'focal' } }
agent { node { label 'jammy' } }
when {
beforeAgent true
expression {
@ -132,7 +132,7 @@ pipeline{
}
}
stage ('Worker build (musl)') {
agent { node { label 'focal' } }
agent { node { label 'jammy' } }
when {
beforeAgent true
expression {
@ -249,7 +249,7 @@ pipeline{
}
}
stage ('Worker build - Windows guest') {
agent { node { label 'focal' } }
agent { node { label 'jammy' } }
when {
beforeAgent true
expression {
@ -295,7 +295,7 @@ pipeline{
}
}
stage ('Worker build - Live Migration') {
agent { node { label 'focal-small' } }
agent { node { label 'jammy-small' } }
when {
beforeAgent true
expression {
@ -400,7 +400,7 @@ def cancelPreviousBuilds() {
def installAzureCli() {
sh "sudo apt install -y ca-certificates curl apt-transport-https lsb-release gnupg"
sh "curl -sL https://packages.microsoft.com/keys/microsoft.asc | gpg --dearmor | sudo tee /etc/apt/trusted.gpg.d/microsoft.gpg > /dev/null"
sh "echo \"deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ focal main\" | sudo tee /etc/apt/sources.list.d/azure-cli.list"
sh "echo \"deb [arch=amd64] https://packages.microsoft.com/repos/azure-cli/ jammy main\" | sudo tee /etc/apt/sources.list.d/azure-cli.list"
sh "sudo apt update"
sh "sudo apt install -y azure-cli"
}

View File

@ -1,7 +1,7 @@
#!/bin/bash
set -x
sudo apt install -y libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf git make dpkg-dev libmnl-dev pkg-config
sudo apt install -y libncurses-dev gawk flex bison openssl libssl-dev dkms libelf-dev libudev-dev libpci-dev libiberty-dev autoconf git make dpkg-dev libmnl-dev pkg-config iproute2
sudo sed -i -- 's/# deb-src/deb-src/g' /etc/apt/sources.list
sudo apt update
apt-get source linux-image-unsigned-`uname -r`
@ -21,15 +21,6 @@ sudo modprobe vhost_vdpa
sudo modprobe vdpa_sim
sudo modprobe vdpa_sim_blk
sudo modprobe vdpa_sim_net
# After the Jenkins builder are moved to Ubuntu 22.04, manually building and
# installing iproute2/vdpa won't be required.
# Tracked by: https://github.com/cloud-hypervisor/cloud-hypervisor/issues/3862
git clone https://github.com/shemminger/iproute2.git
pushd iproute2
./configure
make -j
sudo make install
popd
# Create /dev/vhost-vdpa-0
sudo vdpa dev add name vdpa-blk1 mgmtdev vdpasim_blk
# Create /dev/vhost-vdpa-1
@ -39,4 +30,4 @@ sudo vdpa dev add name vdpa-net1 mgmtdev vdpasim_net
sudo chmod 660 /dev/vhost-vdpa-0
sudo chmod 660 /dev/vhost-vdpa-1
sudo chmod 660 /dev/vhost-vdpa-2
vdpa dev show -jp
vdpa dev show -jp