Search code examples
jenkinsjenkins-pipelinemultibranch-pipeline

How to configure separate jobs/pipelines using multiple Jenkinsfile under a same repository


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.


Solution

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

    Jenkins Dashboard -> Organization Folder