Trigger jobs across controllers

Article ID:226408088
1 minute readKnowledge base

Issue

  • I would like to trigger a job on another controller.

  • I would like to set a remote downstream job.

Resolution

Select a job which triggers a remote one and then go to Job Configuration > Build section > Add Build Step > Trigger builds on remote/local projects option.

build dropdown tam

This configuration allows you to trigger another exiting job on a different CC (remote). The downstream job name part will autocomplete.

build config tam

After you configure this you can trigger a new build and see the job executing on the other Jenkins controller:

Console output of triggering job:

console triggerer

Console output of triggered job (remote):

console triggered
In case you encounter an error similar to:
[operations-center-context] Could not find remote item at controller.example.com » remoteTriggerJobExample

Check at the CloudBees Jenkins Operations Center, under Manage Jenkins -> Configure Global Security -> Client controller security

  • Security Setting Enforcement > it needs to be one of the Single Sign-On options

  • Authentication mapping > it needs to Trusted controller with equivalent Security Realm

Then you need to re-connect your controllers back to your operations center as described in Enabling advanced use cases: Cross-controller triggers and bulk operations.

Here is a demonstration how to do both these steps to fix the [operations-center-context] Could not find remote item at error:

gif of the triggerRemoteJob fix
This article is part of our Knowledge Base and is provided for guidance-based purposes only. The solutions or workarounds described here are not officially supported by CloudBees and may not be applicable in all environments. Use at your own discretion, and test changes in a safe environment before applying them to production systems.