Skip to content

Commit

Permalink
Jenkins, GHA: use Ubuntu 22.04 agents
Browse files Browse the repository at this point in the history
Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
  • Loading branch information
thaJeztah committed Mar 19, 2024
1 parent 6ce433e commit cace4d0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 8 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/ci.yml
Expand Up @@ -12,7 +12,7 @@ on:

jobs:
build:
runs-on: ubuntu-20.04
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
Expand Down
21 changes: 14 additions & 7 deletions Jenkinsfile
Expand Up @@ -21,17 +21,24 @@ 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

if (arch == 'armhf') {
// 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) {
Expand All @@ -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....
Expand All @@ -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....
Expand All @@ -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....
Expand Down

0 comments on commit cace4d0

Please sign in to comment.