title: How to pass the Job name and build number as parameter to another jenkins job?
body: <p>I have two Jenkins Jobs - <em>JobA</em> and <em>JobB</em>. </p>
  
  <p>I need to start execution of <em>JobB</em> when <em>JobA</em> has finished building and I need to pass the Job name (i.e. 'JobA') and the latest build number (the  build that just completed) to <em>JobB</em>. </p>
  
  <p>Along with these, I also need to pass the original parameters that were passed to <em>JobA</em>, to be passed to <em>JobB</em></p>
  
  <p>I have added a post build action in <em>JobA</em> - <em>Trigger parameterized build on other projects</em> and specified <em>JobB</em> in the <em>projects to build</em>. within this, I have also added a parameter - <em>Current build parameters</em>, which will pass the current parameters to the next job.</p>
  
  <p>I have also added a build trigger in <em>JobB</em> - <em>Build after other projects are built</em> and specified <em>JobA</em> as the Project Name.</p>
  
  <p>Now, how do I pass the jobName and buildNumber of <em>JobA</em> to <em>JobB</em>?</p>