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

Ability to specify a default workspace on all nodes

      It would be great if I had the ability to define a default workspace location for all nodes inside my pipeline.

      Example:

      I want to specify a default workspace for all nodes inside my pipeline. If I want to do this, I need to wrap the same kind of snippet for each node. For example:

          node ('A') {
              dir("${env.BUILD_NUMBER}") {
                  withEnv(["WORKSPACE=${env.WORKSPACE}/${env.BUILD_NUMBER}"]) {
                      // ...
                  }
              }
          }
          
          node ('B') {
              dir("${env.BUILD_NUMBER}") {
                  withEnv(["WORKSPACE=${env.WORKSPACE}/${env.BUILD_NUMBER}"]) {
                      // ...
                  }
              }
          }
          
          node ('C') {
              dir("${env.BUILD_NUMBER}") {
                  withEnv(["WORKSPACE=${env.WORKSPACE}/${env.BUILD_NUMBER}"]) {
                      // ...
                  }
              }
          }
      
          [...]
      

      This is redundant. The same applies to the `ws` step.

          [JENKINS-40329] Ability to specify a default workspace on all nodes

          There are no comments yet on this issue.

            Unassigned Unassigned
            allan_burdajewicz Allan BURDAJEWICZ
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

              Created:
              Updated: