Skip to content
Latchkey

How to Trigger a Downstream Job With the build Step in Jenkins

The build step starts another job by name, optionally passing parameters and waiting for its result.

Call build job: 'name' to trigger a downstream job. Pass parameters:, set wait: to block on it, and propagate: to decide whether its failure fails this build.

Steps

  • Call build job: 'downstream-name'.
  • Pass parameters: [string(name: ..., value: ...)] as needed.
  • Set wait and propagate to control blocking and failure handling.

Jenkinsfile

Jenkinsfile
pipeline {
  agent any
  stages {
    stage('Deploy') {
      steps {
        build job: 'deploy-service',
          parameters: [
            string(name: 'ENV', value: 'staging'),
            booleanParam(name: 'DRY_RUN', value: false)
          ],
          wait: true,
          propagate: true
      }
    }
  }
}

Gotchas

  • With propagate: false, capture the returned object and inspect .result yourself.
  • Parameter types must match the downstream job definition or the call is rejected.

Related guides

Run this faster and cheaper on Latchkey managed runners. Start free →