title: Get the build number of a failed build in a parallel build in jenkins workflow
body: <p>I am executing 3 parallel jobs, each that run tests, from my job as follows:</p>
  
  <pre><code>def run_job(job) {
     output = build(job:job, parameters:parameters)
     def buildNumber = output.getNumber().toString()
     test_results[job] = '/job/'+ job +'/' + buildNumber + '/artifact/test_result.xml'
  
  }
  
  
  def test_func_array = [:]
  def test_results = [:]
  
  test_func_array['Python_Tests'] = {run_job('Run_Python_Tests', test_results)}
  
  test_func_array['JS_Tests'] = {run_job('Run_JS_Tests', test_results)}
  
  test_func_array['Selenium_Tests'] = {run_job('Run_Selenium_Tests', test_results)}
  
  parallel(test_func_array)
  </code></pre>
  
  <p>I am able to get the build number using the <code>output.getNumber()</code> call when each job succeeds. However, when a job fails, <code>build()</code> function call throws an exception so I cannot get the build number.</p>
  
  <p>However, failed builds can still have build numbers and have archived artifacts.
  How do I get the build number of a failed build? </p>