0

Through Jenkins GitHub Organizations folder, is it possible to configure two different jobs/pipelines by having multiple Jenkinsfile under a single repository.

The source code in my repo has multiple functionality and generates artifacts for each functionality. I have currently implemented parallel stages, but the build time is very long. Instead I have broken the Jenkinsfile into two different Jenkinsfile(One in root of the repo and the other in a different directory).

While configuring the same over Jenkins Organizations Folder, it is only scanning the Jenkinsfile present in the root of the repo.

enter image description here

How to configure a separate pipeline using the Jenkinsfile present in clients folder.

  • I don't fully understand you, but don't you just want different jobs each of them having its own Jenkinsfile? What's the point of using multiple Jenkinsfile in one job? (When you just separated the big task to many small) – redseven May 19 '23 at 22:59
  • @redseven yes I want two different jobs each of them having its own Jenkinsfile – DevOps_Guy_1903 May 22 '23 at 06:34
  • That's easy, you just define on Jenkins as many pipeline jobs as many you need, all will use the same git repo and just the `Jenkinsfile` path (or name!) will be different. – redseven May 23 '23 at 11:24

1 Answers1

0

Creating a new Organization Folder and having the jenkinsfile in another directory worked out.

Jenkins Dashboard -> Organization Folder