From cace4d02c1933b6e71a694a54b0692901a40d4ef Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 19 Mar 2024 13:23:20 +0100 Subject: [PATCH] Jenkins, GHA: use Ubuntu 22.04 agents Signed-off-by: Sebastiaan van Stijn --- .github/workflows/ci.yml | 2 +- Jenkinsfile | 21 ++++++++++++++------- 2 files changed, 15 insertions(+), 8 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 9ef7e269cb..3d89c51380 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ on: jobs: build: - runs-on: ubuntu-20.04 + runs-on: ubuntu-22.04 strategy: fail-fast: false matrix: diff --git a/Jenkinsfile b/Jenkinsfile index b8e7751f19..0c0b849167 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -21,7 +21,7 @@ def pkgs = [ ] def genBuildStep(LinkedHashMap pkg, String arch) { - def nodeLabel = "linux&&${arch}" + def nodeLabel = "ubuntu-2204 && linux && ${arch}" def platform = "" def branch = env.CHANGE_TARGET ?: env.BRANCH_NAME @@ -29,9 +29,16 @@ def genBuildStep(LinkedHashMap pkg, String arch) { // Running armhf builds on EC2 requires --platform parameter // Otherwise it accidentally pulls armel images which then breaks the verify step platform = "--platform=linux/${arch}" - nodeLabel = "${nodeLabel}&&ubuntu" - } else { - nodeLabel = "${nodeLabel}&&ubuntu-2004" + + if ("${pkg.target}" == "raspbian-buster" || "${pkg.target}" == "raspbian-bullseye" || "${pkg.target}" == "raspbian-bookworm") { + // Use ubuntu 20.04 nodes for raspbian, as those do a "setarch linux32", + // and we currently don't have equivalent nodes for ubuntu 22.04 with + // that option set. + nodeLabel = "ubuntu-2004 && linux && aarch64" + } else { + // Use arm64 nodes for other armhf distros. + nodeLabel = "ubuntu-2204 && linux && aarch64" + } } return { -> wrappedNode(label: nodeLabel, cleanWorkspace: true) { @@ -58,7 +65,7 @@ def genBuildStep(LinkedHashMap pkg, String arch) { def build_package_steps = [ 'static-linux': { -> - wrappedNode(label: 'ubuntu-2004 && x86_64', cleanWorkspace: true) { + wrappedNode(label: 'ubuntu-2204 && x86_64', cleanWorkspace: true) { stage("static-linux") { // This is just a "dummy" stage to make the distro/arch visible // in Jenkins' BlueOcean view, which truncates names.... @@ -79,7 +86,7 @@ def build_package_steps = [ } }, 'cross-mac': { -> - wrappedNode(label: 'ubuntu-2004 && x86_64', cleanWorkspace: true) { + wrappedNode(label: 'ubuntu-2204 && x86_64', cleanWorkspace: true) { stage("cross-mac") { // This is just a "dummy" stage to make the distro/arch visible // in Jenkins' BlueOcean view, which truncates names.... @@ -100,7 +107,7 @@ def build_package_steps = [ } }, 'cross-win': { -> - wrappedNode(label: 'ubuntu-2004 && x86_64', cleanWorkspace: true) { + wrappedNode(label: 'ubuntu-2204 && x86_64', cleanWorkspace: true) { stage("cross-win") { // This is just a "dummy" stage to make the distro/arch visible // in Jenkins' BlueOcean view, which truncates names....