0

Is there any way to build all the projects present in a view of jenkins? I'm unable to find any such solution.

Each project is an individual and are not related to one another, but the number of project is growing and the number of clicks for building all the projects are increasing day by day.

  • What is the motivation to "build all" at the same time? You can use [schedule build](https://stackoverflow.com/a/59753806/598141) or similarly Poll SCM for changes, though it's more efficient to set a [push notification](https://plugins.jenkins.io/git/#plugin-content-push-notification-from-repository) if a code-based build. Or trigger them all via a one liner groovy command. – Ian W Jan 01 '22 at 02:38
  • we have a collection of same react project to some of our clients, so everytime there is an upgrade or fix, we need to build them all. Hence the motivation to build all projects in the view at the same time. – Sriram Arvind Lakshmanakumar Jan 01 '22 at 02:42
  • Then sounds like a push notification is the way to go. What SCM? Lots of answers here and elsewhere how-to depending on SCM tool. – Ian W Jan 01 '22 at 02:51
  • @IanW all projects have the same git repository. Its not that sample. A certain variable in the environment file needs to be changed before building, so that why i am thinking an jenkins based approach to build. – Sriram Arvind Lakshmanakumar Jan 01 '22 at 05:16
  • maybe you could look to use a matrix job - rather than a view and then build all the variations at the same time https://www.jenkins.io/blog/2019/11/22/welcome-to-the-matrix/ – KeepCalmAndCarryOn Jan 01 '22 at 08:00

2 Answers2

1

With the help of Bulk-builder plugin, multiple jobs can be triggered and even all the jobs in a view can be triggered either manually or through curl command the same can be automated.

https://plugins.jenkins.io/bulk-builder/

Arun AV
  • 86
  • 4
0

You can create and add a new job to your View.
This new job has a post build action to build all the other jobs in your View.
This new job can be triggered as per your need and it will in turn trigger all the other jobs in the View.

Arun Kumar B
  • 196
  • 9