List downstream jenkins jobs - jenkins

I got jenkins job that starts numerous downstream jobs
Does jenkins job run keeps accessible information on those such as jobName and buildNum ?

Related

Parameterized Remote Trigger is blocking the job until the remote job is triggered

I have two jenkins (Jenkins A and Jenkins B) on different servers. I'm trigger the Job on Jenkins B from Jenkins A remotely using parameterized remote trigger plugin.
Does the Job in Jenkins A wait until the Job in Jenkins B is triggered ?
This is the log from the Job in Jenkins A which is triggering the Job in Jenkins B
This is the actual scenario happening in Jenkins B
What i understood is that if a remote job is already running then the Job in Jenkins A will wait for the remote job to get triggered. is it the default behaviour?
I want my job in jenkins A to trigger the Job in Jenkins B without waiting that means in this case it should put the remote job in queue and marked itself finished.

Continuous deployment branch wise using Spinnaker

I'm using Jenkins multibranch pipeline for CI process and for CD using Spinnaker.
I've gone through almost all documents, support channels etc. from spinnaker for "how to create spinnaker multibranch pipeline similarly as jenkins" but didn't find anywhere.
After integrating jenkins to spinnaker, in drop down list of jenkins jobs in spinnaker pipeline configuration, it shows all multibranch jobs separately. Hence for each branch I'd need to go to spinnaker and create pipeline manually.
To solve this, I'm thinking this solution: while running jenkins multibranch pipeline job > create spinnaker pipeline(if not exist) using spin cli with required parameters(branch, version, trigger using jenkins of this running branch job etc) > and trigger the same created spinnaker pipeline after jenkins job executed.
Please advise if there is any other better way to accomplish this.
Thanks.
I am not super familiar with the multibranch plugin, but you can make this simpler by doing [ triggers ] -> [ pipeline stage calling the same pipeline ] rather than calling the entire pipeline via the spin-cli.
Alternatively, if the list of jobs generated is small or well known, you could just update the list of triggers for the same pipeline programmatically as part of your release process.
i.e, in your jenkins job
add this job to list of triggers
run rest of jenkins job
job finishes, spinnaker pipeline triggers

Making a jenkins multijob using 2 jenkins jobs reside in two different jenkins servers

I want to create a Jenkins multijob using two jenkins jobs reside in two different jenkins servers. My two jenkins jobs would be job1 and job2. These job1 and job2 is located in two different jenkins servers. I want to make a Multijob linking both job1 and job2 and also job2 should be executed only when job1 successfully completed.
I have search this through online articles but most of them mentioned linking two jobs available within the same jenkins server. But in my case is little different as I mentioned above.
How do I do this?
You can use Parameterized Remote Trigger Plugin which can trigger parameterized Build on remote servers.
https://wiki.jenkins-ci.org/display/JENKINS/Parameterized+Remote+Trigger+Plugin
Have a look at the below thread:
run a Jenkins job on another Jenkins instance from the Jenkins job

Subs jobs in Jenkins MultiJob Project not waiting for other to complete and triggering their downstream job

I have a Jenkins Multijob Project which are running two sub jobs Job1 and Job2 .The issue I am facing is that Job2 is completed and it starts triggering its downstream job while Job1 is still running. I want Job1 to wait for Job2 before triggering its downstream.

Locking a slave in Jenkins until a particular job is run

There is a requirement in our CI set up( We are using Jenkins as CI ), where in we need to lock the slave for a particular time until a particular or high priority job finishes on Jenkins. This is to ensure that no other jobs should run on this slave.
Once the Job starts execution then it needs to be ensured that no other jobs should run on that slave?
Do we have any Jenkins plugins that can help us to lock the slave if a job is running and then release the slave node to be used by other jobs once the job finishes(fail or success).?
use Heavy Job Plugin https://wiki.jenkins-ci.org/display/JENKINS/Heavy+Job+Plugin and set the job weight equal the number of executors on your slave. Then no other job can run on this slave.

Resources