<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>

CC BY-SA 4.0
2021-09-25T12:34:41.080Z
2021-09-25T12:34:41.080Z
Avi
<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>

CC BY-SA 4.0
2021-09-21T14:40:56.703Z
I don't understand the thing with the branches very well, could you explain it in a different way please?
William Andrés Bernal
CC BY-SA 4.0
2021-09-21T14:55:50.297Z
It's just a parameter that will be the same for all jobs. You can ignore that part if it bothers you
Brian Pipa
CC BY-SA 4.0
2021-09-21T16:13:27.073Z
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.
William Andrés Bernal
<jenkins><jenkins-pipeline>
Run multiple (dynamic list) other jobs from a single job
Brian Pipa
# 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.


---

