title: How to execute multiple post action in jenkins declarative pipeline on different nodes?
body: <p>I have the below scenario where I have to clean up work from the stages executed like delete files under different nodes as a clean step. I tried the below but getting the error "Error when executing always post condition:java.lang.NoSuchMethodError: No such DSL method 'agent' found among steps"</p>
  
  <pre><code>pipeline {
  stages {...}
  post {
      always{
       node 'test1'{
        steps{...}
        }
       }
      cleanup{
       node 'test2'{
        steps{...}
       }
      }
      success {...}
      failure {...}
   }
  }
  </code></pre>
  
  <p>Don't want it to be dependent on a stage like this.</p>
  
  <pre><code>stage('Clean up'){
     agent {node 'test1'}
      steps{
             sh '''
             #!/bin/bash
                 echo "Cleaning up"
            '''
       }
       post {
        always {
         sh '''
             #!/bin/bash
               rm test/*
            '''
        }
      }
    }
  </code></pre>
  
  <p>Want it to run to clean up regardless any stage fails.</p>