## customWorkspace 

A string. Run the Pipeline or individual stage  this agent  is applied to within this custom workspace, rather than the default. It can be either a relative path, in which case the custom workspace will be under the workspace root on the node, or an absolute path. For example: 

agent { node { label 'my-defined-label' customWorkspace '/some/other/path' } } 

This option is valid for node , docker  and dockerfile . 

## reuseNode 

A boolean, false by default. If true, run the container on the node specified at the top-level of the Pipeline, in the same workspace, rather than on a new node entirely. 

This option is valid for docker  and dockerfile , and only has an effect when used on an agent  for an individual stage . 

## Example 

// Declarative // pipeline { agent { docker 'maven:3-alpine' } ① stages { stage('Example Build') { steps { sh 'mvn -B clean verify' } } } } // Script // 

① Execute all the steps defined in this Pipeline within a newly created container of the given name and tag ( maven:3-alpine ). 

Stage-level agent  section 

