From 2848aee1285034e64115766bad73644eaab58ecf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 21 Sep 2025 13:57:09 +0200 Subject: [PATCH 1/3] chore: don't skip Windows tests when simulating LTS --- tests/functions.Tests.ps1 | 4 ++-- tests/plugins-cli.Tests.ps1 | 18 +++++++++--------- tests/runtime.Tests.ps1 | 6 +++--- 3 files changed, 14 insertions(+), 14 deletions(-) diff --git a/tests/functions.Tests.ps1 b/tests/functions.Tests.ps1 index 915aba478d..bdecfa23bb 100644 --- a/tests/functions.Tests.ps1 +++ b/tests/functions.Tests.ps1 @@ -21,7 +21,7 @@ Describe "[functions > $global:TEST_TAG] build image" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[functions > $global:TEST_TAG] Check-VersionLessThan" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[functions > $global:TEST_TAG] Check-VersionLessThan" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'exit codes work' { docker run --rm $global:SUT_IMAGE "exit -1" $LastExitCode | Should -Be -1 @@ -74,7 +74,7 @@ Describe "[functions > $global:TEST_TAG] Check-VersionLessThan" -Skip:(-not $glo } # Only test on Java 21, one JDK is enough to test all versions -Describe "[functions > $global:TEST_TAG] Copy-ReferenceFile" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[functions > $global:TEST_TAG] Copy-ReferenceFile" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'build test image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE $PSScriptRoot/functions $exitCode | Should -Be 0 diff --git a/tests/plugins-cli.Tests.ps1 b/tests/plugins-cli.Tests.ps1 index 5c760f87ef..4e9d001a4d 100644 --- a/tests/plugins-cli.Tests.ps1 +++ b/tests/plugins-cli.Tests.ps1 @@ -29,7 +29,7 @@ Describe "[plugins-cli > $global:TEST_TAG] cleanup container" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli $PSScriptRoot/plugins-cli $exitCode | Should -Be 0 @@ -64,7 +64,7 @@ Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-pl } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli with non-default REF" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli with non-default REF" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli-ref $PSScriptRoot/plugins-cli/ref $exitCode | Should -Be 0 @@ -102,7 +102,7 @@ Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-pl } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli from a plugins file" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli from a plugins file" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli $PSScriptRoot/plugins-cli $exitCode | Should -Be 0 @@ -140,7 +140,7 @@ Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-pl } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli even when already exist" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli even when already exist" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli $PSScriptRoot/plugins-cli $exitCode | Should -Be 0 @@ -167,7 +167,7 @@ Describe "[plugins-cli > $global:TEST_TAG] clean work directory" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] plugins are getting upgraded but not downgraded" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] plugins are getting upgraded but not downgraded" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { # Initial execution $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli $PSScriptRoot/plugins-cli @@ -218,7 +218,7 @@ Describe "[plugins-cli > $global:TEST_TAG] clean work directory" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] do not upgrade if plugin has been manually updated" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] do not upgrade if plugin has been manually updated" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli $PSScriptRoot/plugins-cli @@ -268,7 +268,7 @@ Describe "[plugins-cli > $global:TEST_TAG] clean work directory" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] upgrade plugin even if it has been manually updated when PLUGINS_FORCE_UPGRADE=true" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] upgrade plugin even if it has been manually updated when PLUGINS_FORCE_UPGRADE=true" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli $PSScriptRoot/plugins-cli $exitCode | Should -Be 0 @@ -315,7 +315,7 @@ Describe "[plugins-cli > $global:TEST_TAG] clean work directory" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli and no war" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-plugin-cli and no war" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli-no-war $PSScriptRoot/plugins-cli/no-war $exitCode | Should -Be 0 @@ -323,7 +323,7 @@ Describe "[plugins-cli > $global:TEST_TAG] plugins are installed with jenkins-pl } # Only test on Java 21, one JDK is enough to test all versions -Describe "[plugins-cli > $global:TEST_TAG] Use a custom jenkins.war" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[plugins-cli > $global:TEST_TAG] Use a custom jenkins.war" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'builds child image' { $exitCode, $stdout, $stderr = Build-DockerChild $global:SUT_IMAGE-plugins-cli-custom-war $PSScriptRoot/plugins-cli/custom-war --no-cache $exitCode | Should -Be 0 diff --git a/tests/runtime.Tests.ps1 b/tests/runtime.Tests.ps1 index de7e7503ec..5d4eb9d093 100644 --- a/tests/runtime.Tests.ps1 +++ b/tests/runtime.Tests.ps1 @@ -27,7 +27,7 @@ Describe "[runtime > $global:TEST_TAG] cleanup container" { } # Only test on Java 21, one JDK is enough to test all versions -Describe "[runtime > $global:TEST_TAG] test multiple JENKINS_OPTS" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[runtime > $global:TEST_TAG] test multiple JENKINS_OPTS" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It '"--help --version" should return the version, not the help' { # need the last line of output $exitCode, $stdout, $stderr = Run-Program 'docker.exe' "run --rm -e JENKINS_OPTS=`"--help --version`" --name $global:SUT_CONTAINER -P $global:SUT_IMAGE" @@ -37,7 +37,7 @@ Describe "[runtime > $global:TEST_TAG] test multiple JENKINS_OPTS" -Skip:(-not $ } # Only test on Java 21, one JDK is enough to test all versions -Describe "[runtime > $global:TEST_TAG] test jenkins arguments" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[runtime > $global:TEST_TAG] test jenkins arguments" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { It 'running --help --version should return the version, not the help' { # need the last line of output $exitCode, $stdout, $stderr = Run-Program 'docker.exe' "run --rm --name $global:SUT_CONTAINER -P $global:SUT_IMAGE --help --version" @@ -59,7 +59,7 @@ Describe "[runtime > $global:TEST_TAG] test jenkins arguments" -Skip:(-not $glob } # Only test on Java 21, one JDK is enough to test all versions -Describe "[runtime > $global:TEST_TAG] passing JVM parameters" -Skip:(-not $global:TEST_TAG.StartsWith('jdk21-')) { +Describe "[runtime > $global:TEST_TAG] passing JVM parameters" -Skip:(-not $global:TEST_TAG.Contains('jdk21-')) { BeforeAll { $tzSetting = '-Duser.timezone=Europe/Madrid' $tzRegex = [regex]::Escape("Europe/Madrid") From 27cb503d257a9cdd67af4e62d62662e9236dc401 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 21 Sep 2025 14:03:15 +0200 Subject: [PATCH 2/3] test: temporary simulate LTS build, to be reverted after the CI build --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index f12eb41d09..3b9750df10 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ def envVars = ['PUBLISH=true'] // Set to true in a replay to simulate a LTS build on ci.jenkins.io // It will set the environment variables needed for a LTS // and disable images publication out of caution -def SIMULATE_LTS_BUILD = false +def SIMULATE_LTS_BUILD = true if (SIMULATE_LTS_BUILD) { envVars = [ From d2551ae09313c027217772b8ae87e92383929708 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Herv=C3=A9=20Le=20Meur?= Date: Sun, 21 Sep 2025 14:06:15 +0200 Subject: [PATCH 3/3] Revert "test: temporary simulate LTS build, to be reverted after the CI build" This reverts commit 27cb503d257a9cdd67af4e62d62662e9236dc401. --- Jenkinsfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Jenkinsfile b/Jenkinsfile index 3b9750df10..f12eb41d09 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -17,7 +17,7 @@ def envVars = ['PUBLISH=true'] // Set to true in a replay to simulate a LTS build on ci.jenkins.io // It will set the environment variables needed for a LTS // and disable images publication out of caution -def SIMULATE_LTS_BUILD = true +def SIMULATE_LTS_BUILD = false if (SIMULATE_LTS_BUILD) { envVars = [