From dd24d9408ec93fa5c51eca02a2c8ce51404f5f67 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 12 Jan 2026 09:32:26 +0100 Subject: [PATCH 1/4] chore(windows): test a build from a Windows 2025 agent --- Jenkinsfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 79ca1e9e06..c4b162216f 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -47,11 +47,11 @@ stage('Build') { withEnv(envVars) { echo '= bake target: linux' - def windowsImageTypes = ['windowsservercore-ltsc2022'] + def windowsImageTypes = ['windowsservercore-ltsc2022', 'windowsservercore-ltsc2025'] for (anImageType in windowsImageTypes) { def imageType = anImageType builds[imageType] = { - nodeWithTimeout('windows-2022') { + nodeWithTimeout('windows-2025') { stage('Checkout') { checkout scm } From 15fe2427f2dee79a2d7c44e4748e29c19ba0c546 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 12 Jan 2026 10:03:21 +0100 Subject: [PATCH 2/4] comment out Linux images --- Jenkinsfile | 50 +++++++++++++++++++++++++------------------------- 1 file changed, 25 insertions(+), 25 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index c4b162216f..18e6017de1 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -119,14 +119,14 @@ stage('Build') { // This list can be updated with the following command: // make show | jq -r '.target | keys[]' | sort def images = [ - 'alpine_jdk21', - 'alpine_jdk25', - 'debian_jdk21', - 'debian_jdk25', - 'debian-slim_jdk21', - 'debian-slim_jdk25', - 'rhel_jdk21', - 'rhel_jdk25', + // 'alpine_jdk21', + // 'alpine_jdk25', + // 'debian_jdk21', + // 'debian_jdk25', + // 'debian-slim_jdk21', + // 'debian-slim_jdk25', + // 'rhel_jdk21', + // 'rhel_jdk25', ] for (i in images) { def imageToBuild = i @@ -167,23 +167,23 @@ stage('Build') { } } } - // Building every other architectures than amd64 on agents with the corresponding labels if available - architecturesAndCiJioAgentLabels.findAll { arch, _ -> arch != 'amd64' }.each { architecture, labels -> - builds[architecture] = { - nodeWithTimeout(labels) { - stage('Checkout') { - deleteDir() - checkout scm - } - // sanity check that proves all images build on declared platforms not already built in other stages - stage("Multi arch build - ${architecture}") { - infra.withDockerCredentials { - sh "make docker-init listarch-${architecture} buildarch-${architecture}" - } - } - } - } - } + // // Building every other architectures than amd64 on agents with the corresponding labels if available + // architecturesAndCiJioAgentLabels.findAll { arch, _ -> arch != 'amd64' }.each { architecture, labels -> + // builds[architecture] = { + // nodeWithTimeout(labels) { + // stage('Checkout') { + // deleteDir() + // checkout scm + // } + // // sanity check that proves all images build on declared platforms not already built in other stages + // stage("Multi arch build - ${architecture}") { + // infra.withDockerCredentials { + // sh "make docker-init listarch-${architecture} buildarch-${architecture}" + // } + // } + // } + // } + // } } else { // Only publish when a tag triggered the build if (env.TAG_NAME) { From ee21b5107f564e62fb1f498ba9af81f691ffdcb4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 12 Jan 2026 10:04:14 +0100 Subject: [PATCH 3/4] docker info --- Jenkinsfile | 1 + 1 file changed, 1 insertion(+) diff --git a/Jenkinsfile b/Jenkinsfile index 18e6017de1..20b799a348 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -63,6 +63,7 @@ stage('Build') { */ stage("Build ${imageType}") { infra.withDockerCredentials { + powershell 'docker info' powershell './make.ps1 build' } } From ac3ad28d41a3ead0a67a13670dc5f2e09257fe45 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 12 Jan 2026 12:48:49 +0100 Subject: [PATCH 4/4] Add docker-init like in https://github.com/jenkinsci/docker-ssh-agent/pull/581 (which doesn't fail on wsc2022 image builds from wsc2025 agent) --- Jenkinsfile | 6 +++++- make.ps1 | 24 ++++++++++++++++++++++++ 2 files changed, 29 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 20b799a348..3a53e770d2 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -57,13 +57,17 @@ stage('Build') { } withEnv(["IMAGE_TYPE=${imageType}"]) { + stage('Prepare Docker') { + infra.withDockerCredentials { + powershell './make.ps1 -Target docker-init' + } + } if (!infra.isTrusted()) { /* Outside of the trusted.ci environment, we're building and testing * the Dockerfile in this repository, but not publishing to docker hub */ stage("Build ${imageType}") { infra.withDockerCredentials { - powershell 'docker info' powershell './make.ps1 build' } } diff --git a/make.ps1 b/make.ps1 index 81620eabc8..2896f63c7a 100644 --- a/make.ps1 +++ b/make.ps1 @@ -62,6 +62,30 @@ $env:COMMIT_SHA=$(git rev-parse HEAD) $baseDockerCmd = 'docker-compose --file=build-windows.yaml' $baseDockerBuildCmd = '{0} build --parallel --pull' -f $baseDockerCmd +function Initialize-Docker() { + # Cf https://github.com/jenkins-infra/jenkins-infra/blob/production/modules/profile/templates/jenkinscontroller/casc/clouds-ec2.yaml.erb + $dockerDaemonConfigPath = 'C:\ProgramData\Docker\config\daemon.json' + if (Test-Path $dockerDaemonConfigPath) { + $dockerDaemonConfig = Get-Content -Path $dockerDaemonConfigPath -Raw | ConvertFrom-Json + Write-Host "${dockerDaemonConfigPath} file content:" + $dockerDaemonConfig | ConvertTo-Json + # Remove docker daemon config setting "data-root" to Z:\docker (NVMe mount) to avoid hitting moby/moby#48093 + Remove-Item -Path $dockerDaemonConfigPath + Restart-Service docker + } + Get-ComputerInfo | Select-Object OsName, OsBuildNumber, WindowsVersion + Get-WindowsFeature Containers | Out-String + Invoke-Expression 'docker info' + Get-CimInstance -ClassName Win32_Processor + Get-ChildItem env: | Select-Object Name, Value +} + +if($target -eq 'docker-init') { + Write-Host '= Initialize-Docker then exit' + Initialize-Docker + exit 0 +} + Write-Host "= PREPARE: List of $Organisation/$Repository images and tags to be processed:" Invoke-Expression "$baseDockerCmd config"