The following plugin provides functionality available through
Pipeline-compatible steps. Read more about how to integrate steps into your
Pipeline in the
section of the
For a list of other such plugins, see the
Pipeline Steps Reference
Parameterized Remote Trigger Plugin
triggerRemoteJob: Trigger Remote Job
The `triggerRemoteJob` pipeline step triggers a job on a remote Jenkins.
The full documentation is available in GitHub.
//Trigger remote job
def handle = triggerRemoteJob(remoteJenkinsName: 'remoteJenkins', job: 'RemoteJob')
//Get information from the handle
def status = handle.getBuildStatus()
def buildUrl = handle.getBuildUrl()
echo buildUrl.toString() + " finished with " + status.toString()
//Download and parse the archived "build-results.json" (if generated and archived by remote build)
def results = handle.readJsonFileFromBuildArchive('build-results.json')
echo results.urlToTestResults //only example
//List other available methods
Remote Job Name or full URL.
The name or URL of the job on the remote Jenkins host which you would like to trigger. If the full job URL is specified the URL of the remote Jenkins host configured above will be ignored.
Using this parameter you can override the authentication used to connect to the selected remote Jenkins.
Jenkins API Tokens
- Don't Override
The authentication configured in the (global) settings of the selected 'remote host' is used.
- Token Authentication
The specified user id and Jenkins API token is used.
- Credentials Authentication
The specified Jenkins Credentials are used. This can be either user/password or user/API Token.
- No Authentication
No Authorization header will be sent, independent of the global 'remote host' settings.
are recommended since, if stolen, they allow access only to a specific Jenkins while user and password typically provide access to many systems.
Nested Choice of Objects
Wait/Block Until Remote Build Complete
If enabled the remote job is called synchronously and the plugin waits until the remote job finished.
If disabled the plugin triggers the remote job and returns.
In both cases a
is returned for further tracking the remote job or getting the results (see plugin main help page).
Enable Enhanced Logging
If this option is enabled, the console output of the remote job is also logged.
Parameters which will be used when triggering the remote job.
If no parameters are needed, then just leave this blank.
Any line start with a pound-sign (#) will be treated as a comment.
The plugin identifies the status of the remote build by polling. Here you can specify how often the plugin shall poll the remote status.
Be aware that polling too often might cause an increased load on the remote Jenkins.
Prevent Remote Build Queue
Wait to trigger remote builds until no other builds are running.
Remote Jenkins Name
The name of the remote Jenkins as configured in the Jenkins global configuration (Manage Jenkins > Configure System > Parameterized Remote Trigger Configuration > Remote Hosts).
It is possible to override the Remote Jenkins URL for each Pipeline separately.
Do Not Fail If Remote Fails
If this option is enabled, the build will not fail even if the remote build fails.
Remote Job Token
Security token which is defined on the job of the remote Jenkins host.
If no job token is needed to trigger this job, then just leave it blank
Was this page helpful?
Please submit your feedback about this page through this
Alternatively, if you don't wish to complete the quick form, you can simply
indicate if you found this page helpful?
See existing feedback here.