Answers: <p>I would use a checkboxParam that has the job names values.
  Then I would iterate over this param and trigger jobs with it from same groovy file.
  If you need to get the branch name you can use a git param for it.</p>
  
Answers: CC BY-SA 4.0
Answers: 2021-09-25T12:34:41.080Z
Answers: 2021-09-25T12:34:41.080Z
Answers: Avi
Body: <p>I have 30+ jobs in jenkins that deploy code. For any release, it could be 1 to 30 of those jobs that need to be run. Each job is standalone and deploys its piece independently. For simplicity let's say I have only 5 jobs...</p>
  <ul>
  <li>job A</li>
  <li>job B</li>
  <li>job C</li>
  <li>job D</li>
  <li>job E</li>
  </ul>
  <p>As an example, for one release I need to deploy A, B, C and the next one maybe I need to deploy A and E.
  I was hoping I could make one job that has all 30 deploy jobs as checkboxes (booleans), then I can just run that job, choose the others to run, and go.</p>
  <p>Each job accesses git with a branch parameter, but for a release, the branch is always the same for all projects so I figure I can set the branch in the main job and pass the parameter to each deploy job.</p>
  <p>Any ideas of the best way to get this to work?</p>
  
Comments: CC BY-SA 4.0
Comments: 2021-09-21T14:40:56.703Z
Comments: I don't understand the thing with the branches very well, could you explain it in a different way please?
Comments: William Andrés Bernal
Comments: CC BY-SA 4.0
Comments: 2021-09-21T14:55:50.297Z
Comments: It's just a parameter that will be the same for all jobs. You can ignore that part if it bothers you
Comments: Brian Pipa
Comments: CC BY-SA 4.0
Comments: 2021-09-21T16:13:27.073Z
Comments: Maybe you can use the parameterized parameters option from Jenkins: https://www.baeldung.com/ops/jenkins-parameterized-builds . I'm not 100% convinced about it, because you still would have to configure the 30 parameters for each job, but at least from this job you could also call the others.
Comments: William Andrés Bernal
Tags: <jenkins><jenkins-pipeline>
Title: Run multiple (dynamic list) other jobs from a single job
UserDisplayName: Brian Pipa
ThreadText: # Run multiple (dynamic list) other jobs from a single job
  
  (Asked by: username_0 on 2021-09-21)
  
  I have 30+ jobs in jenkins that deploy code. For any release, it could be 1 to 30 of those jobs that need to be run. Each job is standalone and deploys its piece independently. For simplicity let's say I have only 5 jobs...
  
  * job A
  * job B
  * job C
  * job D
  * job E
  
  As an example, for one release I need to deploy A, B, C and the next one maybe I need to deploy A and E.
  I was hoping I could make one job that has all 30 deploy jobs as checkboxes (booleans), then I can just run that job, choose the others to run, and go.
  
  Each job accesses git with a branch parameter, but for a release, the branch is always the same for all projects so I figure I can set the branch in the main job and pass the parameter to each deploy job.
  
  Any ideas of the best way to get this to work?
  
  **Tags:** jenkins, jenkins-pipeline
  
  > **Comments:**
  > **username_1**: I don't understand the thing with the branches very well, could you explain it in a different way please?  
  > **username_0**: It's just a parameter that will be the same for all jobs. You can ignore that part if it bothers you  
  > **username_1**: Maybe you can use the parameterized parameters option from Jenkins: https://www.baeldung.com/ops/jenkins-parameterized-builds . I'm not 100% convinced about it, because you still would have to configure the 30 parameters for each job, but at least from this job you could also call the others.  
  
  ---
  
  ## 1 answers
  
  ### Answer by username_2 on 2021-09-25. Score: 1
  
  I would use a checkboxParam that has the job names values.
  Then I would iterate over this param and trigger jobs with it from same groovy file.
  If you need to get the branch name you can use a git param for it.
  
  
  ---
  
  