Create a temporary directory for specific steps in Jenkins pipeline : <p>Is there a Jenkins pipeline step that will create and run a block of steps in a directory?</p>

<p>I know that the <code>dir</code> step runs the steps in the block in a specific directory:</p>

<pre class="lang-java prettyprint-override"><code>// not in /tmp/jobDir
dir ('/tmp/jobDir') {
    // these steps get run in /tmp/jobDir
}
// once again not in /tmp/jobDir
</code></pre>

<p>My question is if there is a step in Pipeline or in a plugin that let's me run this codeblock, but <code>/tmp/jobDir</code> is created at the start of the block, and is removed at the end of the block.</p>

<p>Something like:</p>

<pre class="lang-java prettyprint-override"><code>// /tmp/jobDir does not exist
dir ('/tmp/jobDir') {
    // /tmp/jobDir now exists
    // these steps get run in /tmp/jobDir
}
// /tmp/jobDir has been removed
</code></pre>

<p>Does such a step or plugin exist?</p>
