Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-57454

Declarative Pipeline shares Workspace between builds that are running in parallel

    Details

    • Similar Issues:

      Description

      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.

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              Unassigned
              Reporter:
              kurromat kurromat
            • Votes:
              1 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: