title: How to restore workspace from another build in jenkins pipeline?
body: <p>I want to create jenkins pipeline to build my project.</p>
  
  <p>One of the steps is to clone the repository, but for that I have a different job (not included in the pipeline). I would like to use a workspace of this job from the most recent successful build.</p>
  
  <p>Such thing was easy to achieve by having normal maven / gradle jenkins job, but I have no idea how to do it using pipeline script.</p>
  
  <p><a href="https://imgur.com/dld9Pig" rel="nofollow noreferrer">Example from maven job</a></p>