Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

run a Jenkins job on another Jenkins instance from the Jenkins job

I want to create a Jenkins job that starts other Jenkins jobs. That would be quite easy, because Jenkins Template Project Plugin allows us to create a build step of a type "use builders from another project". However, what makes my situation harder is that I have to start Jenkins jobs on other machines. Is there any standard way to do that?

like image 778
user983447 Avatar asked Sep 07 '15 13:09

user983447


People also ask

How do I call one Jenkins job from another Jenkins job?

Under Build Section, Add Trigger a remote parameterized job as a build step. Then select the Destination Jenkins name that we just added, give the job name that you want to trigger at destination Jenkins(here it is test ) and parameters. Once saved, trigger the source Jenkins job.

How do I copy a Jenkins job from one instance to another?

According to the manual, https://wiki.jenkins-ci.org/display/JENKINS/Administering+Jenkins, it's simply to move the corresponding job directory to the new Jenkins instance. The "Copy existing Job" option requires the job to exist on the current Jenkins instance. It's an option to use the existing job as a template.

How can you copy job from your local Jenkins instance to another local Jenkins instance?

You can: Move a job from one installation of Jenkins to another by simply copying the corresponding job directory. Make a copy of an existing job by making a clone of a job directory by a different name. Rename an existing job by renaming a directory.

Can we run Jenkins job parallel?

In Jenkins, there are several ways to implement parallel job execution. One of the common approaches is the parent-child build model. In this model - a parent (upstream) job is triggering child (downstream) jobs.


1 Answers

In case you want only to trigger new build of Job You Have plenty of ways to accomplish it

you can use remote access API and Trigger a request to build target job from source Job.

https://wiki.jenkins-ci.org/display/JENKINS/Remote+access+API

Or you can use https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin

which is handy in handling server details and other stuff. you shoukld ensure ssh keys shared by both servers.

like image 86
DevD Avatar answered Oct 14 '22 14:10

DevD