1
0
mirror of https://github.com/SAP/jenkins-library.git synced 2025-09-16 09:26:22 +02:00

chore(): Replaced node version lts-buster with lts-bookworm (#5286)

Co-authored-by: Valentin Uchkunev <valentin.uchkunev@sap.com>
This commit is contained in:
Valentin
2025-04-07 12:53:37 +03:00
committed by GitHub
parent 8c66027f34
commit 29059f51c4
25 changed files with 40 additions and 40 deletions

View File

@@ -251,7 +251,7 @@ func batsExecuteTestsMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "bats", Image: "node:lts-buster", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "outputFormat", Value: "junit"}}}}},
{Name: "bats", Image: "node:lts-bookworm", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "outputFormat", Value: "junit"}}}}},
},
Outputs: config.StepOutputs{
Resources: []config.StepResources{

View File

@@ -297,7 +297,7 @@ func gaugeExecuteTestsMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "gauge", Image: "node:lts-buster", EnvVars: []config.EnvVar{{Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}, {Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}}, WorkingDir: "/home/node"},
{Name: "gauge", Image: "node:lts-bookworm", EnvVars: []config.EnvVar{{Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}, {Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}}, WorkingDir: "/home/node"},
},
Sidecars: []config.Container{
{Name: "selenium", Image: "selenium/standalone-chrome", EnvVars: []config.EnvVar{{Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}, {Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}}},

View File

@@ -86,7 +86,7 @@ func KarmaExecuteTestsCommand() *cobra.Command {
The step is using the ` + "`" + `seleniumExecuteTest` + "`" + ` step to spin up two containers in a Docker network:
* a Selenium/Chrome container (` + "`" + `selenium/standalone-chrome` + "`" + `)
* a NodeJS container (` + "`" + `node:lts-buster` + "`" + `)
* a NodeJS container (` + "`" + `node:lts-bookworm` + "`" + `)
In the Docker network, the containers can be referenced by the values provided in ` + "`" + `dockerName` + "`" + ` and ` + "`" + `sidecarName` + "`" + `, the default values are ` + "`" + `karma` + "`" + ` and ` + "`" + `selenium` + "`" + `. These values must be used in the ` + "`" + `hostname` + "`" + ` properties of the test configuration ([Karma](https://karma-runner.github.io/1.0/config/configuration-file.html) and [WebDriver](https://github.com/karma-runner/karma-webdriver-launcher#usage)).
@@ -255,7 +255,7 @@ func karmaExecuteTestsMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "karma", Image: "node:lts-buster", EnvVars: []config.EnvVar{{Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}, {Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}, {Name: "PIPER_SELENIUM_HOSTNAME", Value: "karma"}, {Name: "PIPER_SELENIUM_WEBDRIVER_HOSTNAME", Value: "selenium"}, {Name: "PIPER_SELENIUM_WEBDRIVER_PORT", Value: "4444"}}, WorkingDir: "/home/node"},
{Name: "karma", Image: "node:lts-bookworm", EnvVars: []config.EnvVar{{Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}, {Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}, {Name: "PIPER_SELENIUM_HOSTNAME", Value: "karma"}, {Name: "PIPER_SELENIUM_WEBDRIVER_HOSTNAME", Value: "selenium"}, {Name: "PIPER_SELENIUM_WEBDRIVER_PORT", Value: "4444"}}, WorkingDir: "/home/node"},
},
Sidecars: []config.Container{
{Name: "selenium", Image: "selenium/standalone-chrome", EnvVars: []config.EnvVar{{Name: "NO_PROXY", Value: "localhost,karma,$NO_PROXY"}, {Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}}},

View File

@@ -326,7 +326,7 @@ func newmanExecuteMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "newman", Image: "node:lts-buster", WorkingDir: "/home/node"},
{Name: "newman", Image: "node:lts-bookworm", WorkingDir: "/home/node"},
},
Outputs: config.StepOutputs{
Resources: []config.StepResources{

View File

@@ -223,7 +223,7 @@ func npmExecuteLintMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "node", Image: "node:lts-buster"},
{Name: "node", Image: "node:lts-bookworm"},
},
},
}

View File

@@ -464,7 +464,7 @@ func npmExecuteScriptsMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "node", Image: "node:lts-buster"},
{Name: "node", Image: "node:lts-bookworm"},
},
Outputs: config.StepOutputs{
Resources: []config.StepResources{

View File

@@ -204,7 +204,7 @@ func shellExecuteMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "shell", Image: "node:lts-buster", WorkingDir: "/home/node"},
{Name: "shell", Image: "node:lts-bookworm", WorkingDir: "/home/node"},
},
},
}

View File

@@ -260,7 +260,7 @@ func uiVeri5ExecuteTestsMetadata() config.StepData {
},
},
Containers: []config.Container{
{Name: "uiVeri5", Image: "node:lts-buster", EnvVars: []config.EnvVar{{Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}, {Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}}, WorkingDir: "/home/node"},
{Name: "uiVeri5", Image: "node:lts-bookworm", EnvVars: []config.EnvVar{{Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}, {Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}}, WorkingDir: "/home/node"},
},
Sidecars: []config.Container{
{Name: "selenium", Image: "selenium/standalone-chrome", EnvVars: []config.EnvVar{{Name: "NO_PROXY", Value: "localhost,selenium,$NO_PROXY"}, {Name: "no_proxy", Value: "localhost,selenium,$no_proxy"}}},

View File

@@ -1114,9 +1114,9 @@ func whitesourceExecuteScanMetadata() config.StepData {
{Image: "gradle", WorkingDir: "/home/gradle", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "gradle"}}}}},
{Image: "hseeberger/scala-sbt:8u181_2.12.8_1.2.8", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "sbt"}}}}},
{Image: "maven:3.5-jdk-8", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "maven"}}}}},
{Image: "node:lts-buster", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "npm"}}}}},
{Image: "node:lts-bookworm", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "npm"}}}}},
{Image: "python:3.6-stretch", WorkingDir: "/tmp", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "pip"}}}}},
{Image: "node:lts-buster", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "yarn"}}}}},
{Image: "node:lts-bookworm", WorkingDir: "/home/node", Conditions: []config.Condition{{ConditionRef: "strings-equal", Params: []config.Param{{Name: "buildTool", Value: "yarn"}}}}},
},
Outputs: config.StepOutputs{
Resources: []config.StepResources{

View File

@@ -26,7 +26,7 @@ func TestDummyIntegration(t *testing.T) {
dir = filepath.Dir(dir)
req := testcontainers.ContainerRequest{
Image: "node:lts-buster",
Image: "node:lts-bookworm",
Cmd: []string{"tail", "-f"},
Mounts: testcontainers.Mounts(
testcontainers.BindMount(dir, "/data"),

View File

@@ -56,7 +56,7 @@ cd /test
}
if languageRunner == "js" {
reqNode.Image = "node:lts-buster"
reqNode.Image = "node:lts-bookworm"
}
nodeContainer, err := testcontainers.GenericContainer(ctx, testcontainers.GenericContainerRequest{

View File

@@ -46,7 +46,7 @@ cd /test
networkName := "sidecar-" + uuid.New().String()
reqNode := testcontainers.ContainerRequest{
Image: "node:lts-buster",
Image: "node:lts-bookworm",
Cmd: []string{"tail", "-f"},
Mounts: testcontainers.Mounts(
testcontainers.BindMount(pwd, "/piperbin"),

View File

@@ -102,7 +102,7 @@ steps:
versioningTemplate: '${version}-${timestamp}${commitId?"+"+commitId:""}'
batsExecuteTests:
#TODO: check wheather defaults in here are still required
dockerImage: 'node:lts-buster'
dockerImage: 'node:lts-bookworm'
dockerWorkspace: '/home/node'
envVars: {}
outputFormat: 'junit' # tap, junit
@@ -271,7 +271,7 @@ steps:
testOptions: '-DspecsDir=specs'
npm:
#TODO: check wheather defaults in here are still required
dockerImage: 'node:lts-buster'
dockerImage: 'node:lts-bookworm'
dockerName: 'npm'
dockerWorkspace: '/home/node'
languageRunner: 'js'
@@ -306,14 +306,14 @@ steps:
influxServer: ''
karmaExecuteTests:
containerPortMappings:
'node:lts-buster':
'node:lts-bookworm':
- containerPort: 9876
hostPort: 9876
dockerEnvVars:
NO_PROXY: 'localhost,selenium,$NO_PROXY'
no_proxy: 'localhost,selenium,$no_proxy'
#TODO: check wheather defaults in here are still required
dockerImage: 'node:lts-buster'
dockerImage: 'node:lts-bookworm'
dockerName: 'karma'
dockerWorkspace: '/home/node'
installCommand: 'npm install --quiet'
@@ -355,7 +355,7 @@ steps:
parallelExecution: false
npmExecute:
#TODO: check wheather defaults in here are still required
dockerImage: 'node:lts-buster'
dockerImage: 'node:lts-bookworm'
npmExecuteScripts:
install: true
npmExecuteEndToEndTests:
@@ -435,7 +435,7 @@ steps:
dockerName: 'maven'
dockerWorkspace: ''
npm:
dockerImage: 'node:lts-buster'
dockerImage: 'node:lts-bookworm'
dockerName: 'npm'
dockerWorkspace: '/home/node'
bundler:
@@ -447,7 +447,7 @@ steps:
defaultMessage: "${buildStatus}: Job ${env.JOB_NAME} <${env.BUILD_URL}|#${env.BUILD_NUMBER}>"
snykExecute:
buildDescriptorFile: './package.json'
dockerImage: 'node:lts-buster'
dockerImage: 'node:lts-bookworm'
exclude: []
monitor: true
scanType: 'npm'

View File

@@ -60,7 +60,7 @@ spec:
type: bool
containers:
- name: bats
image: node:lts-buster
image: node:lts-bookworm
workingDir: /home/node
conditions:
- conditionRef: strings-equal

View File

@@ -75,7 +75,7 @@ spec:
type: delivery-mapping
containers:
- name: gauge
image: node:lts-buster
image: node:lts-bookworm
env:
- name: no_proxy
value: localhost,selenium,$no_proxy

View File

@@ -7,7 +7,7 @@ metadata:
The step is using the `seleniumExecuteTest` step to spin up two containers in a Docker network:
* a Selenium/Chrome container (`selenium/standalone-chrome`)
* a NodeJS container (`node:lts-buster`)
* a NodeJS container (`node:lts-bookworm`)
In the Docker network, the containers can be referenced by the values provided in `dockerName` and `sidecarName`, the default values are `karma` and `selenium`. These values must be used in the `hostname` properties of the test configuration ([Karma](https://karma-runner.github.io/1.0/config/configuration-file.html) and [WebDriver](https://github.com/karma-runner/karma-webdriver-launcher#usage)).
@@ -75,7 +75,7 @@ spec:
type: requirement-mapping
containers:
- name: karma
image: node:lts-buster
image: node:lts-bookworm
env:
- name: no_proxy
value: localhost,selenium,$no_proxy

View File

@@ -16,7 +16,7 @@ spec:
- STAGES
- STEPS
type: string
default: '**/*.postman_collection.json'
default: "**/*.postman_collection.json"
- name: newmanRunCommand
description: +++ Deprecated +++ Please use list parameter `runOptions` instead.
scope:
@@ -100,5 +100,5 @@ spec:
type: delivery-mapping
containers:
- name: newman
image: node:lts-buster
image: node:lts-bookworm
workingDir: /home/node

View File

@@ -71,4 +71,4 @@ spec:
- name: npm/outputFormat
containers:
- name: node
image: node:lts-buster
image: node:lts-bookworm

View File

@@ -191,4 +191,4 @@ spec:
type: cucumber
containers:
- name: node
image: node:lts-buster
image: node:lts-bookworm

View File

@@ -57,5 +57,5 @@ spec:
mandatory: false
containers:
- name: shell
image: node:lts-buster
image: node:lts-bookworm
workingDir: /home/node

View File

@@ -6,7 +6,7 @@ metadata:
# The step is using `dockerExecute` step to spin up two containers in a Docker network:
# * a Selenium/Chrome container (`selenium/standalone-chrome`)
# * a NodeJS container (`node:lts-buster`)
# * a NodeJS container (`node:lts-bookworm`)
# In the Docker network, the containers can be referenced by the values provided in `dockerName` and `sidecarName`, the default values are `uiVeri5` and `selenium`.
# !!! note
# In a Kubernetes environment, the containers both need to be referenced with `localhost`.
@@ -74,7 +74,7 @@ spec:
type: delivery-mapping
containers:
- name: uiVeri5
image: node:lts-buster
image: node:lts-bookworm
env:
- name: no_proxy
value: localhost,selenium,$no_proxy

View File

@@ -796,7 +796,7 @@ spec:
params:
- name: buildTool
value: maven
- image: node:lts-buster
- image: node:lts-bookworm
workingDir: /home/node
env: []
conditions:
@@ -812,7 +812,7 @@ spec:
params:
- name: buildTool
value: pip
- image: node:lts-buster
- image: node:lts-bookworm
workingDir: /home/node
env: []
conditions:

View File

@@ -44,8 +44,8 @@ class NpmExecuteTest extends BasePiperTest {
@Test
void testNpmExecute() {
stepRule.step.npmExecute(script: nullScript, dockerImage: 'node:lts-buster')
assertEquals 'node:lts-buster', dockerExecuteRule.dockerParams.dockerImage
stepRule.step.npmExecute(script: nullScript, dockerImage: 'node:lts-bookworm')
assertEquals 'node:lts-bookworm', dockerExecuteRule.dockerParams.dockerImage
}
@Test
@@ -76,7 +76,7 @@ class NpmExecuteTest extends BasePiperTest {
@Test
void testNpmExecuteWithClosure() {
stepRule.step.npmExecute(script: nullScript, dockerImage: 'node:lts-buster', npmCommand: 'run build') { }
stepRule.step.npmExecute(script: nullScript, dockerImage: 'node:lts-bookworm', npmCommand: 'run build') { }
assert shellRule.shell.find { c -> c.contains('npm run build') }
}
@@ -85,6 +85,6 @@ class NpmExecuteTest extends BasePiperTest {
helper.registerAllowedMethod 'fileExists', [String], { false }
thrown.expect AbortException
thrown.expectMessage '[npmExecute] package.json is not found.'
stepRule.step.npmExecute(script: nullScript, dockerImage: 'node:lts-buster', npmCommand: 'run build')
stepRule.step.npmExecute(script: nullScript, dockerImage: 'node:lts-bookworm', npmCommand: 'run build')
}
}

View File

@@ -72,7 +72,7 @@ class SeleniumExecuteTestsTest extends BasePiperTest {
}
assertThat(bodyExecuted, is(true))
assertThat(dockerExecuteRule.dockerParams.containerPortMappings, is(['selenium/standalone-chrome': [[containerPort: 4444, hostPort: 4444]]]))
assertThat(dockerExecuteRule.dockerParams.dockerImage, is('node:lts-buster'))
assertThat(dockerExecuteRule.dockerParams.dockerImage, is('node:lts-bookworm'))
assertThat(dockerExecuteRule.dockerParams.dockerName, is('npm'))
assertThat(dockerExecuteRule.dockerParams.dockerWorkspace, is('/home/node'))
assertThat(dockerExecuteRule.dockerParams.sidecarEnvVars, is(null))

View File

@@ -100,7 +100,7 @@ class SnykExecuteTest extends BasePiperTest {
)
assertThat(withCredentialsParameters.credentialsId, is('myPassword'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'node:lts-buster'))
assertThat(dockerExecuteRule.dockerParams, hasEntry('dockerImage', 'node:lts-bookworm'))
assertThat(dockerExecuteRule.dockerParams.stashContent, hasItem('buildDescriptor'))
assertThat(dockerExecuteRule.dockerParams.stashContent, hasItem('opensourceConfiguration'))
}