-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins 2.164.1
When using a Scripted Pipeline, using the node-Block creates a workspace and ensures that the workspace is only used by one build (by appending e.g. @2 )
from https://jenkins.io/doc/pipeline/steps/workflow-durable-task-step/#node-allocate-node
"A workspace is automatically allocated for you with the node step, or you can get an alternate workspace with this ws step, but by default the location is chosen automatically. (Something like SLAVE_ROOT/workspace/JOB_NAME@2.)"
When using a Declarative Jenkins-Pipeline, this seems not to be the case.
Even when using
agent {
node{
label 'thelabel'
}
}
only one workspace is created, nothing is appended to the workspace-name.
Is that inteded behaviour?
I can work around this by using the customWorkspace parameter, but it is a changed behaviour in comparison to the old Jenkinsfiles.