title: Jenkins pipeline post build to run on a previously used agent workspace
body: <p>In the Jenkins pipeline master-slave environment having multiple slaves type, how to force a post-build task to run in the same slave &amp; workspace where a previous stage was executed. </p>
  
  <p>For example, in the following pipeline code snippet, 3 different slaves are used. The "Dynamic Server Creation" stage is executed on "miscslave" type agent where we run a "vagrant up" command. The next 2 stages are executed in different slaves, 'performance_slave and 'seleniumslave'. Now when the tests are executed against the dynamic servers, we need to destroy it by running "vagrant destroy" as a post stage task. However, it needs to be run from the same slave "miscslave" workspace where the "vagrant up" executed, as it created a ".vagrant" directory there with the dynamic server machine info, which is required to run the "destroy". </p>
  
  <p>How can we force the pipeline here to execute this post build task in the same workspace where "Dynamic Server Creation" was executed?</p>
  
  <pre><code>pipeline {
          agent { label 'miscslave' }
          stages {
              stage('Stage 1') { }            
              stage("DynamicServer Creation") {               
                  agent {
                      label 'miscslave'
                  }
                  stages {
                      stage('DynamicServer Creation') {
                          //Create Dynamic server using vagrant up, create a .vagrant dir to save the create machine info
                      }
                      stage('DynamicServer Test') {
                          parallel {
                              stage("Execute Performance Tests") {                                
                                  agent {  label 'performance_slave' }
                              }
                              stage("Execute UI Tests") {                                
                                  agent { label 'seleniumslave' }
                              }
                          }
                      }
                  }
                  post {
                      always {                        
                          //Delete the dynamic server using vagrant destroy. It has to be run in the same workspace where "vagrant up" was executed in "Dynamic Server creation stage"
                      }
                  }
              }
          }
      }```
  </code></pre>