Skip to content

Commit

Permalink
Merge branch 'master' into issue418-deduplicated-list-of-jdks-to-build
Browse files Browse the repository at this point in the history
  • Loading branch information
lemeurherve authored Jun 10, 2024
2 parents 6ae0b02 + bad0642 commit 882a8ac
Showing 1 changed file with 9 additions and 12 deletions.
21 changes: 9 additions & 12 deletions build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@ $Repository = 'ssh-agent'
$Organisation = 'jenkins'
$ImageType = 'windows-ltsc2019'

$baseDockerCmd = 'docker-compose --file=build-windows.yaml'
$baseDockerBuildCmd = '{0} build --parallel --pull' -f $baseDockerCmd

if(![String]::IsNullOrWhiteSpace($env:TESTS_DEBUG)) {
$ImageType = $env:IMAGE_TYPE
$TestsDebug = $env:TESTS_DEBUG
}
$env:TESTS_DEBUG = $TestsDebug

Expand Down Expand Up @@ -84,10 +81,10 @@ function Test-Image {
$ImageNameAndJavaVersion
)

$items = $ImageNameAndJavaVersion.Split("|")
$items = $ImageNameAndJavaVersion.Split('|')
$imageName = $items[0]
$javaVersion = $items[1]
$imageNameItems = $imageName.Split(":")
$imageNameItems = $imageName.Split(':')
$imageTag = $imageNameItems[1]

Write-Host "= TEST: Testing ${ImageName} image"
Expand Down Expand Up @@ -119,15 +116,15 @@ function Test-Image {
$baseDockerCmd = 'docker-compose --file=build-windows.yaml'
$baseDockerBuildCmd = '{0} build --parallel --pull' -f $baseDockerCmd

Write-Host "= PREPARE: List of $Organisation/$env:DOCKERHUB_REPO images and tags to be processed:"
Write-Host "= PREPARE: List of images and tags to be processed:"
Invoke-Expression "$baseDockerCmd config"

Write-Host '= BUILD: Building all images...'
switch ($DryRun) {
$true { Write-Host "(dry-run) $baseDockerBuildCmd" }
$false { Invoke-Expression $baseDockerBuildCmd }
}
Write-Host '= BUILD: Finished building all images.'
switch ($DryRun) {
$true { Write-Host "(dry-run) $baseDockerBuildCmd" }
$false { Invoke-Expression $baseDockerBuildCmd }
}
Write-Host '= BUILD: Finished building all images.'

if($lastExitCode -ne 0) {
exit $lastExitCode
Expand Down

0 comments on commit 882a8ac

Please sign in to comment.