title: Jenkins pipeline: Access individual stage result from upstream job
body: <p>I've been searching and reading the Jenkins Javadoc and Jenkins CI documentation but I can't confirm if what I want is feasible or not</p>
  
  <p>I have a pipeline, which is just a groovy script loaded via SCM. In this pipeline I use the <code>build job: 'JobName'</code> command. The job <code>JobName</code> looks like this:</p>
  
  <pre><code>node('agent-complet') {
      def phase1Success = true
      def phase2Success = true
      def phase3Success = true
  
      // The success flags are set to true/false in the stages...
      stage('Phase1') { ... }
      stage('Phase2') { ... }
      stage('Phase3') { ... }
  }
  </code></pre>
  
  <p>What I'd like to do is know the result (success/failure flags) of each stage in the groovy script that called the job <code>JobName</code>. Is there a straight forward way of doing that? </p>
  
  <p>Otherwise, I was thinking of maybe writing to a file and then read that file once the job has run its course. </p>
  
  <p>Thanks</p>