Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 6 additions & 9 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,8 @@ def agentSelector(String imageType, retryCounter) {
platform = 'windows-2019'
break

// nanoserver-ltsc2022 and windowservercore-ltsc2022
case ~/.*2022/:
platform = 'windows-2022'
break

// nanoserver-ltsc2025 and windowservercore-ltsc2025
case ~/.*2025/:
// All other Windows images
case ~/(nanoserver|windowsservercore).*/:
platform = 'windows-2025'
break

Expand Down Expand Up @@ -60,9 +55,11 @@ def parallelStages = [failFast: false]
node(resolvedAgentLabel) {
timeout(time: 60, unit: 'MINUTES') {
checkout scm
if (imageType == "linux") {
stage('Prepare Docker') {
stage('Prepare Docker') {
if (isUnix()) {
sh 'make docker-init'
} else {
powershell '& ./build.ps1 docker-init'
}
}
// This function is defined in the jenkins-infra/pipeline-library
Expand Down
13 changes: 13 additions & 0 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -122,6 +122,15 @@ function Test-Image {
return $failed
}

function Get-DockerInfo() {
docker info

# Additional system information
Get-ComputerInfo | Select-Object OsName, OsBuildNumber, WindowsVersion
Get-CimInstance -ClassName Win32_Processor | Out-String
Get-WindowsFeature Containers | Out-String
}

function Initialize-DockerComposeFile {
param (
[String] $AgentType,
Expand Down Expand Up @@ -173,6 +182,10 @@ Test-CommandExists 'docker-compose'
Test-CommandExists 'docker buildx'
Test-CommandExists 'yq'

if($target -eq 'docker-init') {
Get-DockerInfo
}

foreach($agentType in $AgentTypes) {
$dockerComposeFile = 'build-windows_{0}_{1}.yaml' -f $AgentType, $ImageType
$baseDockerCmd = 'docker-compose --file={0}' -f $dockerComposeFile
Expand Down