How to add job dependency to gerrit trigger in Jenkins pipeline? We do have this configuration in our GUI based Jenkins project, trying to convert it to Jenkins pipeline, couldn't find how to add precurse-build as dependent build as shown in red below.



I added below below pipeline code to trigger the build whenrun_job is added as gerrit comment, and it works good, would anyone please show me how to add Other jobs on which this job depends to this?

pipeline {
    triggers {
         gerrit dynamicTriggerConfiguration: 'true',
                triggerConfigURL: 'https://some/url/path/trigger.txt',
                serverName: 'gerrit-server',
                triggerOnEvents: [
                    commentAddedContains('^run_job$')
                ]
    }

    stages {
       ...
       ...
The "correct" way to determine the names for Pipeline step parameters is to use the Pipeline Snippet generator in the web UI:

https://www.jenkins.io/doc/book/pipeline/getting-started/#snippet-generator

However, based on browsing the source code, I am guessing the name of the parameter you are looking for is dependencyJobsNames.