Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-35415

Multiple branch projects per repository with different recognizers

    • Icon: New Feature New Feature
    • Resolution: Unresolved
    • Icon: Major Major
    • branch-api-plugin
    • None
    • Jenkins 2.3

      As a developer/QA... It could be necessary to have multiple build methods/options on a project. And it could be possible if we could have 2 or more multibranch project on the same git project, but with different jenkinsfile file.

          [JENKINS-35415] Multiple branch projects per repository with different recognizers

          Elliot Morales created issue -
          Matthew DeTullio made changes -
          Component/s New: workflow-multibranch-plugin [ 21465 ]
          Component/s Original: multi-branch-project-plugin [ 21127 ]
          Matthew DeTullio made changes -
          Assignee Original: Matthew DeTullio [ mjdetullio ] New: Manuel Recena Soto [ recena ]
          Manuel Recena Soto made changes -
          Assignee Original: Manuel Recena Soto [ recena ] New: Jesse Glick [ jglick ]
          Jesse Glick made changes -
          Link New: This issue is duplicated by JENKINS-35655 [ JENKINS-35655 ]

          Jesse Glick added a comment -

          Note that CloudBees Jenkins Enterprise now includes this feature, via the CloudBees Pipeline: Template plugin.

          Jesse Glick added a comment - Note that CloudBees Jenkins Enterprise now includes this feature, via the CloudBees Pipeline: Template plugin.
          R. Tyler Croy made changes -
          Workflow Original: JNJira [ 171709 ] New: JNJira + In-Review [ 184422 ]

          fahd arshad added a comment -

          Is there any chance of getting this feature other than the Enterprise Jenkins? this is a pretty crucial feature.

          fahd arshad added a comment - Is there any chance of getting this feature other than the Enterprise Jenkins? this is a pretty crucial feature.

          As a workaround, you can have multpile Jenkinsfiles and Load the specific one based on JOB_NAME, like this:

          node () {
              checkout scm
              if (env.JOB_NAME =~ 'myjob1') {
                  load 'myjob1.Jenkinsfile'
             }
             else if (env.JOB_NAME =~ 'myjob2') {
                 load 'myjob2.Jenkinsfile'
              }
          }()
          

          Jakub Pawłowski added a comment - As a workaround, you can have multpile Jenkinsfiles and Load the specific one based on JOB_NAME, like this: node () { checkout scm if (env.JOB_NAME =~ 'myjob1' ) { load 'myjob1.Jenkinsfile' } else if (env.JOB_NAME =~ 'myjob2' ) { load 'myjob2.Jenkinsfile' } }()
          Jesse Glick made changes -
          Assignee Original: Jesse Glick [ jglick ]

            Unassigned Unassigned
            elliotmoso Elliot Morales
            Votes:
            30 Vote for this issue
            Watchers:
            36 Start watching this issue

              Created:
              Updated: