title: Jenkins + Build Flow, how to pass a variable from one job to another
body: <p>I have a build flow scenario similar to the <a href="https://wiki.jenkins-ci.org/display/JENKINS/Build+Flow+Plugin" rel="noreferrer">documentation example</a>: two jobs, one running after the other.</p>
  
  <pre><code>b = build("job1")
  build("job2", param1: b.????)
  </code></pre>
  
  <p>My <code>job1</code> is a shell script that builds a package out of a checked out git repositoy and prints out the version of the built package.</p>
  
  <p>I need to extract the version from <code>job1</code> (parse output??) and make it available somehow as a parameter to <code>job2</code>. How can this be achieved? Please note that I can't know the version before running <code>job1</code>.</p>