0

We have N number of jenkins jobs, which needs to be stored as jenkinsfile in git and scanned from git to get all jobs in oneshot. Is that possible ?

For Example : - lap/a1.jenkinsfile lap/a2.jenkins lap/a3.jenkinsfile

in Jenkins,

when we configure multibranch pipeline in Jenkins, is that possible to get all jobs available in directory 'lap'

Should be a1 a2 a3

Tried with multiple scenarios, but anyways we need to add new item and specify the exact jenkinsfile to have a job displayed in jenkins.

Vinoop
  • 1
  • You can have three multibranch pipelines, `a1`, `a2` and `a3`, driven by `lap/a1.jenkinsfile`, `lap/a2.jenkinsfile` and `lap/a3.jenkinsfile` respectively. – MaratC Dec 12 '19 at 13:17
  • Yes, that is one of the way. But without creating new pipeline jobs, is that possible to scan and fetch the jobs ? There are 100+ jobs .. – Vinoop Dec 16 '19 at 06:14
  • If there are 100+ jobs, then 100+ jobs need to be created. If you don't want to create 100+ jobs manually, you can copy one job into another, or modify a technique outlined [here](https://stackoverflow.com/questions/8424228/export-import-jobs-in-jenkins/30575318#30575318) to create them automatically. – MaratC Dec 16 '19 at 08:11
  • Thank you.. Expecting this feature soon in Jenkins Plugin ... So that, all Jobs are maintained in git and no worries on creating new Jenkins with Jobs or any server crash, etc.. – Vinoop Dec 16 '19 at 09:32

0 Answers0