This issue is archived. You can view it, but you can't modify it. Learn more

ExportXMLWordPrintable

      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.

            Assignee:
            Unassigned
            Reporter:
            Allan BURDAJEWICZ
            Archiver:
            Jenkins Service Account

              Created:
              Updated:
              Archived: