From 6b44cc41b82f94c07d8d60d30ff91a816db867d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 30 Jul 2023 19:03:14 +0200 Subject: [PATCH 01/27] fix: set JAVA_MAJOR_VERSION --- build-windows.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/build-windows.yaml b/build-windows.yaml index 85bf0a9c..0ec6ed1c 100644 --- a/build-windows.yaml +++ b/build-windows.yaml @@ -5,6 +5,7 @@ services: context: ./ dockerfile: ./windows/nanoserver/Dockerfile args: + JAVA_MAJOR_VERSION: 11 version: ${PARENT_IMAGE_VERSION} WINDOWS_VERSION_TAG: ${NANOSERVER_VERSION_TAG} jdk17-nanoserver: @@ -13,6 +14,7 @@ services: context: ./ dockerfile: ./windows/nanoserver/Dockerfile args: + JAVA_MAJOR_VERSION: 17 version: ${PARENT_IMAGE_VERSION} WINDOWS_VERSION_TAG: ${NANOSERVER_VERSION_TAG} jdk11-windowsservercore: @@ -21,6 +23,7 @@ services: context: ./ dockerfile: ./windows/windowsservercore/Dockerfile args: + JAVA_MAJOR_VERSION: 11 version: ${PARENT_IMAGE_VERSION} WINDOWS_VERSION_TAG: ${WINDOWS_VERSION_TAG} jdk17-windowsservercore: @@ -29,5 +32,6 @@ services: context: ./ dockerfile: ./windows/windowsservercore/Dockerfile args: + JAVA_MAJOR_VERSION: 17 version: ${PARENT_IMAGE_VERSION} WINDOWS_VERSION_TAG: ${WINDOWS_VERSION_TAG} From 3fe2ee53dbe9721ed0c1449afc8a426dc4a5dc0a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 30 Jul 2023 19:03:38 +0200 Subject: [PATCH 02/27] chore: output JAVA_MAJOR_VERSION in tests --- tests/inboundAgent.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/inboundAgent.Tests.ps1 b/tests/inboundAgent.Tests.ps1 index 7a47b59a..69ef0bbc 100644 --- a/tests/inboundAgent.Tests.ps1 +++ b/tests/inboundAgent.Tests.ps1 @@ -145,7 +145,7 @@ Describe "[$global:AGENT_IMAGE] custom build args" { } Describe "[$global:AGENT_IMAGE] passing JVM options (slow test)" { - It "shows the java version with --show-version" { + It "shows the java version ${global:JAVA_MAJOR_VERSION} with --show-version" { $exitCode, $stdout, $stderr = Run-Program 'docker' "network create --driver nat jnlp-network" # Launch the netcat utility, listening at port 5000 for 30 sec # bats will capture the output from netcat and compare the first line From 889f075fe8fc05aeeecfca178ae29d1933545d74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 30 Jul 2023 19:04:28 +0200 Subject: [PATCH 03/27] fix: no build number in tags --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 75014b9c..86e0fce7 100644 --- a/build.ps1 +++ b/build.ps1 @@ -84,7 +84,7 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { $windowsVersion = $items[2] $baseImage = "${windowsType}-${windowsVersion}" - $versionTag = "${ParentImageVersion}-${BuildNumber}-${image}" + $versionTag = "${ParentImageVersion}-${image}" $tags = @( $image, $versionTag ) if($jdkMajorVersion -eq "$defaultJdk") { $tags += $baseImage From 5d4f4a2df226ac22c2a5efcbc9ce21a138a7be74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 30 Jul 2023 19:05:29 +0200 Subject: [PATCH 04/27] chore: cleanup unused parameters --- Jenkinsfile | 2 +- build.ps1 | 26 +------------------------- 2 files changed, 2 insertions(+), 26 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 28da0f73..16303bf3 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,7 +76,7 @@ pipeline { docker buildx bake --push --file docker-bake.hcl linux ''' } else { - powershell "& ./build.ps1 -PushVersions -VersionTag $env:TAG_NAME publish" + powershell "& ./build.ps1 publish" } } } diff --git a/build.ps1 b/build.ps1 index 86e0fce7..6a39add0 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,9 +3,7 @@ Param( [Parameter(Position=1)] [String] $Target = "build", [String] $Build = '', - [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4', - [String] $BuildNumber = '1', - [switch] $PushVersions = $false + [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4' ) $ErrorActionPreference ='Stop' @@ -213,17 +211,6 @@ if($target -eq "publish") { if($lastExitCode -ne 0) { $publishFailed = 1 } - - if($PushVersions) { - $buildTag = "$ParentImageVersion-$BuildNumber-$tag" - if($tag -eq 'latest') { - $buildTag = "$ParentImageVersion-$BuildNumber" - } - Publish-Image "$Build" "${Organization}/${Repository}:${buildTag}" - if($lastExitCode -ne 0) { - $publishFailed = 1 - } - } } } else { foreach($b in $builds.Keys) { @@ -232,17 +219,6 @@ if($target -eq "publish") { if($lastExitCode -ne 0) { $publishFailed = 1 } - - if($PushVersions) { - $buildTag = "$ParentImageVersion-$BuildNumber-$tag" - if($tag -eq 'latest') { - $buildTag = "$ParentImageVersion-$BuildNumber" - } - Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" - if($lastExitCode -ne 0) { - $publishFailed = 1 - } - } } } } From 8195981b4a9c6922f9d19626fe84fdc2ec58652b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 30 Jul 2023 19:12:52 +0200 Subject: [PATCH 05/27] fix: no comma anymore --- updatecli/updatecli.d/docker-agent.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/updatecli/updatecli.d/docker-agent.yaml b/updatecli/updatecli.d/docker-agent.yaml index 5be71703..7be42be4 100644 --- a/updatecli/updatecli.d/docker-agent.yaml +++ b/updatecli/updatecli.d/docker-agent.yaml @@ -154,7 +154,7 @@ targets: matchpattern: >- \$ParentImageVersion(.*)=(.*), replacepattern: >- - $ParentImageVersion${1}= '{{ source "lastVersion" }}', + $ParentImageVersion${1}= '{{ source "lastVersion" }}' scmid: default actions: From fdcf9783f2c6d5f32942b27c68a0b26c08f0fd11 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:15:18 +0200 Subject: [PATCH 06/27] fix: use env:VERSION_TAG --- Jenkinsfile | 2 +- build.ps1 | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Jenkinsfile b/Jenkinsfile index 16303bf3..00d971b8 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,7 +76,7 @@ pipeline { docker buildx bake --push --file docker-bake.hcl linux ''' } else { - powershell "& ./build.ps1 publish" + powershell "& ./build.ps1 -VersionTag $env:TAG_NAME publish" } } } diff --git a/build.ps1 b/build.ps1 index 6a39add0..5420c50b 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,6 +3,7 @@ Param( [Parameter(Position=1)] [String] $Target = "build", [String] $Build = '', + [String] $VersionTag = 'NEXT_TAG_VERSION', [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4' ) @@ -82,8 +83,7 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { $windowsVersion = $items[2] $baseImage = "${windowsType}-${windowsVersion}" - $versionTag = "${ParentImageVersion}-${image}" - $tags = @( $image, $versionTag ) + $tags = @( $image, $VersionTag ) if($jdkMajorVersion -eq "$defaultJdk") { $tags += $baseImage } From 3dd9d34b37b506b4e0d73f0564bc177f7e4ccbfc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:23:46 +0200 Subject: [PATCH 07/27] chore: restore --- Jenkinsfile | 2 +- build.ps1 | 23 +++++++++++++++++++++++ 2 files changed, 24 insertions(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 00d971b8..28da0f73 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -76,7 +76,7 @@ pipeline { docker buildx bake --push --file docker-bake.hcl linux ''' } else { - powershell "& ./build.ps1 -VersionTag $env:TAG_NAME publish" + powershell "& ./build.ps1 -PushVersions -VersionTag $env:TAG_NAME publish" } } } diff --git a/build.ps1 b/build.ps1 index 5420c50b..99f2288e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -4,6 +4,7 @@ Param( [String] $Target = "build", [String] $Build = '', [String] $VersionTag = 'NEXT_TAG_VERSION', + [switch] $PushVersions = $false, [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4' ) @@ -212,6 +213,17 @@ if($target -eq "publish") { $publishFailed = 1 } } + + if($PushVersions) { + $buildTag = "$VersionTag-$tag" + if($tag -eq 'latest') { + $buildTag = "$VersionTag" + } + Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" + if($lastExitCode -ne 0) { + $publishFailed = 1 + } + } } else { foreach($b in $builds.Keys) { foreach($tag in $Builds[$b]['Tags']) { @@ -220,6 +232,17 @@ if($target -eq "publish") { $publishFailed = 1 } } + + if($PushVersions) { + $buildTag = "$VersionTag-$tag" + if($tag -eq 'latest') { + $buildTag = "$VersionTag" + } + Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" + if($lastExitCode -ne 0) { + $publishFailed = 1 + } + } } } From 279713ec28a40b8bff15186f9db3ed2b604d079c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:26:24 +0200 Subject: [PATCH 08/27] fix: concatenate VersionTag and image name for tags --- build.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 99f2288e..40a346ae 100644 --- a/build.ps1 +++ b/build.ps1 @@ -84,7 +84,8 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { $windowsVersion = $items[2] $baseImage = "${windowsType}-${windowsVersion}" - $tags = @( $image, $VersionTag ) + $versionTag = "${VersionTag}-${image}" + $tags = @( $image, $versionTag ) if($jdkMajorVersion -eq "$defaultJdk") { $tags += $baseImage } From 807426a3f8d9c35d1be3f247ea1e74f0d8152cd7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:32:35 +0200 Subject: [PATCH 09/27] chore: remove duplicated space --- tests/inboundAgent.Tests.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/inboundAgent.Tests.ps1 b/tests/inboundAgent.Tests.ps1 index 69ef0bbc..e0ba4780 100644 --- a/tests/inboundAgent.Tests.ps1 +++ b/tests/inboundAgent.Tests.ps1 @@ -145,7 +145,7 @@ Describe "[$global:AGENT_IMAGE] custom build args" { } Describe "[$global:AGENT_IMAGE] passing JVM options (slow test)" { - It "shows the java version ${global:JAVA_MAJOR_VERSION} with --show-version" { + It "shows the java version ${global:JAVA_MAJOR_VERSION} with --show-version" { $exitCode, $stdout, $stderr = Run-Program 'docker' "network create --driver nat jnlp-network" # Launch the netcat utility, listening at port 5000 for 30 sec # bats will capture the output from netcat and compare the first line From 751eaba49be9cb5e0024f04c586335353da79d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:39:29 +0200 Subject: [PATCH 10/27] fix(?): no collusion between versionTag and VersionTag (??) --- build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index 40a346ae..6c37f63a 100644 --- a/build.ps1 +++ b/build.ps1 @@ -84,8 +84,8 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { $windowsVersion = $items[2] $baseImage = "${windowsType}-${windowsVersion}" - $versionTag = "${VersionTag}-${image}" - $tags = @( $image, $versionTag ) + $completeVersionTag = "${VersionTag}-${image}" + $tags = @( $image, $completeVersionTag ) if($jdkMajorVersion -eq "$defaultJdk") { $tags += $baseImage } From 94fdc29caec6d94667d6bfc905cad2cbf93e44e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:53:55 +0200 Subject: [PATCH 11/27] debug --- build.ps1 | 3 +++ 1 file changed, 3 insertions(+) diff --git a/build.ps1 b/build.ps1 index 6c37f63a..3a92a050 100644 --- a/build.ps1 +++ b/build.ps1 @@ -93,6 +93,9 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { $builds[$image] = @{ 'Tags' = $tags; } + + # TODO: remove, debug only + Write-Host '$_: {0}, $env:WINDOWS_VERSION_NAME: {1}, $image: {2}, $jdkMajorVersion: {3}, $baseImage: {4}, $VersionTag: {5}, $completeVersionTag: {6}' -f $_, $env:WINDOWS_VERSION_NAME, $image, $jdkMajorVersion, $baseImage, $VersionTag, $completeVersionTag } Write-Host '= PREPARE: List of images and tags to be processed:' From 449f38b623526c283f9f85bcae3b4726bae636e7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 11:58:29 +0200 Subject: [PATCH 12/27] fix updatecli --- updatecli/updatecli.d/docker-agent.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatecli/updatecli.d/docker-agent.yaml b/updatecli/updatecli.d/docker-agent.yaml index 7be42be4..b00097b7 100644 --- a/updatecli/updatecli.d/docker-agent.yaml +++ b/updatecli/updatecli.d/docker-agent.yaml @@ -152,9 +152,9 @@ targets: spec: file: build.ps1 matchpattern: >- - \$ParentImageVersion(.*)=(.*), + ParentImageVersion(.*)=(.*) replacepattern: >- - $ParentImageVersion${1}= '{{ source "lastVersion" }}' + ParentImageVersion${1}= '{{ source "lastVersion" }}' scmid: default actions: From fb66e844d6a53b921cea3b406af0184e390e7302 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 12:06:24 +0200 Subject: [PATCH 13/27] fix debug (?) --- build.ps1 | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 3a92a050..875ec93e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -95,7 +95,8 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { } # TODO: remove, debug only - Write-Host '$_: {0}, $env:WINDOWS_VERSION_NAME: {1}, $image: {2}, $jdkMajorVersion: {3}, $baseImage: {4}, $VersionTag: {5}, $completeVersionTag: {6}' -f $_, $env:WINDOWS_VERSION_NAME, $image, $jdkMajorVersion, $baseImage, $VersionTag, $completeVersionTag + $debug = '$_: {0}, $env:WINDOWS_VERSION_NAME: {1}, $image: {2}, $jdkMajorVersion: {3}, $baseImage: {4}, $VersionTag: {5}, $completeVersionTag: {6}' -f $_, $env:WINDOWS_VERSION_NAME, $image, $jdkMajorVersion, $baseImage, $VersionTag, $completeVersionTag + Write-Host $debug } Write-Host '= PREPARE: List of images and tags to be processed:' From bdf380be51200d28cd1e614c8aa2912014a5c819 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 12:08:23 +0200 Subject: [PATCH 14/27] remove debug --- build.ps1 | 4 ---- 1 file changed, 4 deletions(-) diff --git a/build.ps1 b/build.ps1 index 875ec93e..6c37f63a 100644 --- a/build.ps1 +++ b/build.ps1 @@ -93,10 +93,6 @@ Invoke-Expression "$baseDockerCmd config --services" 2>$null | ForEach-Object { $builds[$image] = @{ 'Tags' = $tags; } - - # TODO: remove, debug only - $debug = '$_: {0}, $env:WINDOWS_VERSION_NAME: {1}, $image: {2}, $jdkMajorVersion: {3}, $baseImage: {4}, $VersionTag: {5}, $completeVersionTag: {6}' -f $_, $env:WINDOWS_VERSION_NAME, $image, $jdkMajorVersion, $baseImage, $VersionTag, $completeVersionTag - Write-Host $debug } Write-Host '= PREPARE: List of images and tags to be processed:' From f7d075e270d9fa46ece3b1459c3804906f78745c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 12:32:05 +0200 Subject: [PATCH 15/27] chore: fix docker-agent updatecli manifest --- updatecli/updatecli.d/docker-agent.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatecli/updatecli.d/docker-agent.yaml b/updatecli/updatecli.d/docker-agent.yaml index 5be71703..b00097b7 100644 --- a/updatecli/updatecli.d/docker-agent.yaml +++ b/updatecli/updatecli.d/docker-agent.yaml @@ -152,9 +152,9 @@ targets: spec: file: build.ps1 matchpattern: >- - \$ParentImageVersion(.*)=(.*), + ParentImageVersion(.*)=(.*) replacepattern: >- - $ParentImageVersion${1}= '{{ source "lastVersion" }}', + ParentImageVersion${1}= '{{ source "lastVersion" }}' scmid: default actions: From 76eb79d92871c8bcd400aa419c6a163823e691e1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= <91831478+lemeurherve@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:17:30 +0200 Subject: [PATCH 16/27] keep the comma as end of line delimiter and avoid it to be captured in the regexp group --- updatecli/updatecli.d/docker-agent.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatecli/updatecli.d/docker-agent.yaml b/updatecli/updatecli.d/docker-agent.yaml index b00097b7..5533fa3d 100644 --- a/updatecli/updatecli.d/docker-agent.yaml +++ b/updatecli/updatecli.d/docker-agent.yaml @@ -152,9 +152,9 @@ targets: spec: file: build.ps1 matchpattern: >- - ParentImageVersion(.*)=(.*) + ParentImageVersion(.*)=(.*), replacepattern: >- - ParentImageVersion${1}= '{{ source "lastVersion" }}' + ParentImageVersion${1}= '{{ source "lastVersion" }}', scmid: default actions: From 2782b79d4a47390ca91b334faaa5480fbe1072f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 13:45:54 +0200 Subject: [PATCH 17/27] restore updatecli, to be fixed in another PR --- updatecli/updatecli.d/docker-agent.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/updatecli/updatecli.d/docker-agent.yaml b/updatecli/updatecli.d/docker-agent.yaml index b00097b7..5be71703 100644 --- a/updatecli/updatecli.d/docker-agent.yaml +++ b/updatecli/updatecli.d/docker-agent.yaml @@ -152,9 +152,9 @@ targets: spec: file: build.ps1 matchpattern: >- - ParentImageVersion(.*)=(.*) + \$ParentImageVersion(.*)=(.*), replacepattern: >- - ParentImageVersion${1}= '{{ source "lastVersion" }}' + $ParentImageVersion${1}= '{{ source "lastVersion" }}', scmid: default actions: From c0a409ec7ba4af056a7879ac23e5360de46f4e55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 13:48:31 +0200 Subject: [PATCH 18/27] fix PushVersion restoration --- build.ps1 | 38 +++++++++++++++++++------------------- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/build.ps1 b/build.ps1 index 6c37f63a..5cda4e4e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -213,17 +213,17 @@ if($target -eq "publish") { if($lastExitCode -ne 0) { $publishFailed = 1 } - } - if($PushVersions) { - $buildTag = "$VersionTag-$tag" - if($tag -eq 'latest') { - $buildTag = "$VersionTag" - } - Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" - if($lastExitCode -ne 0) { - $publishFailed = 1 - } + if($PushVersions) { + $buildTag = "$VersionTag-$tag" + if($tag -eq 'latest') { + $buildTag = "$VersionTag" + } + Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" + if($lastExitCode -ne 0) { + $publishFailed = 1 + } + } } } else { foreach($b in $builds.Keys) { @@ -232,16 +232,16 @@ if($target -eq "publish") { if($lastExitCode -ne 0) { $publishFailed = 1 } - } - if($PushVersions) { - $buildTag = "$VersionTag-$tag" - if($tag -eq 'latest') { - $buildTag = "$VersionTag" - } - Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" - if($lastExitCode -ne 0) { - $publishFailed = 1 + if($PushVersions) { + $buildTag = "$VersionTag-$tag" + if($tag -eq 'latest') { + $buildTag = "$VersionTag" + } + Publish-Image "$b" "${Organization}/${Repository}:${buildTag}" + if($lastExitCode -ne 0) { + $publishFailed = 1 + } } } } From 653ac2ed43de2dc97a9bc504f7b59e4255850535 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Mon, 31 Jul 2023 14:02:10 +0200 Subject: [PATCH 19/27] do not put ParentImageVersion as last parameter position to keep a comma at its end of line --- build.ps1 | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/build.ps1 b/build.ps1 index 5cda4e4e..c05cda1e 100644 --- a/build.ps1 +++ b/build.ps1 @@ -4,8 +4,8 @@ Param( [String] $Target = "build", [String] $Build = '', [String] $VersionTag = 'NEXT_TAG_VERSION', - [switch] $PushVersions = $false, - [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4' + [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4', + [switch] $PushVersions = $false ) $ErrorActionPreference ='Stop' From 2be81286c6e2e6ff1b477f9666e3dbb59f7a64d5 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:04:11 +0000 Subject: [PATCH 20/27] chore: changed lines [24 29] of file "/tmp/updatecli/github/jenkinsci... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /docker-inbound-agent/windows/windowsservercore/Dockerfile" Made with ❤️️ by updatecli --- windows/windowsservercore/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/windowsservercore/Dockerfile b/windows/windowsservercore/Dockerfile index af38ac64..b1b9e5e8 100644 --- a/windows/windowsservercore/Dockerfile +++ b/windows/windowsservercore/Dockerfile @@ -21,12 +21,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 ARG JAVA_MAJOR_VERSION=17 ARG WINDOWS_VERSION_TAG=ltsc2019 FROM jenkins/agent:"${version}"-jdk"${JAVA_MAJOR_VERSION}"-windowsservercore-"${WINDOWS_VERSION_TAG}" -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols on Windows" Vendor="Jenkins Project" Version="$version" COPY jenkins-agent.ps1 C:/ProgramData/Jenkins From 14ad370ceab87278c9e680023ecd47fe9a256bbc Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:04:12 +0000 Subject: [PATCH 21/27] chore: changed lines [24 29] of file "/tmp/updatecli/github/jenkinsci... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /docker-inbound-agent/windows/nanoserver/Dockerfile" Made with ❤️️ by updatecli --- windows/nanoserver/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/windows/nanoserver/Dockerfile b/windows/nanoserver/Dockerfile index f71e02ba..548eb430 100644 --- a/windows/nanoserver/Dockerfile +++ b/windows/nanoserver/Dockerfile @@ -21,12 +21,12 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 ARG JAVA_MAJOR_VERSION=17 ARG WINDOWS_VERSION_TAG=1809 FROM jenkins/agent:"${version}"-jdk"${JAVA_MAJOR_VERSION}"-nanoserver-"${WINDOWS_VERSION_TAG}" -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols on Windows" Vendor="Jenkins Project" Version="$version" COPY jenkins-agent.ps1 C:/ProgramData/Jenkins From a27e3c1353c64c9f076fb36ff5c9994f8ca4d897 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:04:14 +0000 Subject: [PATCH 22/27] chore: changed lines [1 5] of file "/tmp/updatecli/github/jenkinsci/d... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... ocker-inbound-agent/debian/Dockerfile" Made with ❤️️ by updatecli --- debian/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/debian/Dockerfile b/debian/Dockerfile index 87ae642e..1037e1ff 100644 --- a/debian/Dockerfile +++ b/debian/Dockerfile @@ -1,8 +1,8 @@ -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 ARG JAVA_MAJOR_VERSION=17 FROM jenkins/agent:"${version}"-jdk"${JAVA_MAJOR_VERSION}" -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="$version" ARG user=jenkins From 4f5f76fa064b4a935314873745dfecc3da1cf20d Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:04:15 +0000 Subject: [PATCH 23/27] chore: changed lines [23 27] of file "/tmp/updatecli/github/jenkinsci... MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ... /docker-inbound-agent/alpine/Dockerfile" Made with ❤️️ by updatecli --- alpine/Dockerfile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/alpine/Dockerfile b/alpine/Dockerfile index e3acb175..5ebfc400 100644 --- a/alpine/Dockerfile +++ b/alpine/Dockerfile @@ -20,11 +20,11 @@ # OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN # THE SOFTWARE. -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 ARG JAVA_MAJOR_VERSION=17 FROM jenkins/agent:"${version}"-alpine-jdk"${JAVA_MAJOR_VERSION}" -ARG version=3131.vf2b_b_798b_ce99-4 +ARG version=3131.vf2b_b_798b_ce99-5 LABEL Description="This is a base image, which allows connecting Jenkins agents via JNLP protocols" Vendor="Jenkins project" Version="$version" ARG user=jenkins From 28703d30b7b9d2e3e0c164360b02ef3d8047eae9 Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:04:16 +0000 Subject: [PATCH 24/27] chore: Updated to content "" in file "build.ps1" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made with ❤️️ by updatecli --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index 75014b9c..3c0a8433 100644 --- a/build.ps1 +++ b/build.ps1 @@ -3,7 +3,7 @@ Param( [Parameter(Position=1)] [String] $Target = "build", [String] $Build = '', - [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-4', + [String] $ParentImageVersion = '3131.vf2b_b_798b_ce99-5', [String] $BuildNumber = '1', [switch] $PushVersions = $false ) From e208b74e9a53501d03d007a0f453fbc90628bf2f Mon Sep 17 00:00:00 2001 From: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com> Date: Mon, 31 Jul 2023 13:04:17 +0000 Subject: [PATCH 25/27] chore: Updated to content "" in file "docker-bake.hcl" MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Made with ❤️️ by updatecli --- docker-bake.hcl | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker-bake.hcl b/docker-bake.hcl index 76601963..1a24d014 100644 --- a/docker-bake.hcl +++ b/docker-bake.hcl @@ -32,7 +32,7 @@ variable "IMAGE_TAG" { #### This is for the "parent" image version to use (jenkins/agent:-) variable "PARENT_IMAGE_VERSION" { - default = "3131.vf2b_b_798b_ce99-4" + default = "3131.vf2b_b_798b_ce99-5" } variable "REGISTRY" { From 9bd9608e2d1a9f1dab3a395e8cffed6dd2621722 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= <91831478+lemeurherve@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:30:35 +0200 Subject: [PATCH 26/27] chore: trim spaces --- build.ps1 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/build.ps1 b/build.ps1 index c05cda1e..e726a8cb 100644 --- a/build.ps1 +++ b/build.ps1 @@ -223,7 +223,7 @@ if($target -eq "publish") { if($lastExitCode -ne 0) { $publishFailed = 1 } - } + } } } else { foreach($b in $builds.Keys) { From 5d385f400e0fab92499da265423f208273b106e4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= <91831478+lemeurherve@users.noreply.github.com> Date: Mon, 31 Jul 2023 15:52:28 +0200 Subject: [PATCH 27/27] chore: fix link title in README (#381) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 0aa1fe38..bca13b14 100644 --- a/README.md +++ b/README.md @@ -53,7 +53,7 @@ Optional environment variables: ## Windows Jenkins Java Opts -The processing of the JENKINS_JAVA_OPTS environment variable or -JenkinsJavaOpts command line parameter follow the [https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-7.3](command parsing semantics of Powershell). This means that if a parameter contains any characters that are part of an expression in Powershell, it will need to be surrounded by quotes. +The processing of the JENKINS_JAVA_OPTS environment variable or -JenkinsJavaOpts command line parameter follow the [command parsing semantics of Powershell](https://learn.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_parsing?view=powershell-7.3). This means that if a parameter contains any characters that are part of an expression in Powershell, it will need to be surrounded by quotes. For example: -XX:+PrintCommandLineFlags --show-version