jenkins fails on building a downstream job : <p>I'm trying to trigger a downstream job from my current job like so</p>

<pre><code>pipeline {
  stages {
    stage('foo') {
      steps{
        build job: 'my-job', propagate: true, wait: true
      }
     }
  }
}
</code></pre>

<p>The purpose is to wait on the job result and fail or succeed according to that result. Jenkins is always failing with the message <code>Waiting for non-job items is not supported</code> . The job mentioned above does not have any parameters and is defined like the rest of my jobs, using multibranch pipeline plugin. </p>

<p>All i can think of is that this type of jenkins item is not supported as a build step input, but that seems counterintuitive and would prove to be a blocker to me. Can anyone confirm if this is indeed the case?</p>

<p>If so, can anyone suggest any workarounds?</p>

<p>Thank you</p>
