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

Support checkout of Jenkinsfile for multibranch & organization pipeline jobs

    Details

    • Similar Issues:

      Description

      Problem:

      Currently multi-branch pipeline builds & organizational builds require you to have a Jenkinsfile checked in for each branch/project that is to be built. The associated checked in Jenkinsfile will be used for the build job. There is no way to use a different discovery mechanism for each job, and checkout a Jenkinsfile from source as you can with a standard pipeline build job.

      How it effects my team:

      My team is using the same Jenkinsfile for all of our builds thanks to leveraging a gradle plug-in we wrote which defines the tasks needed for each project. We want to adopt multi-branch pipeline builds & organizational builds, but the associated maintenance of having to update 20+ Jenkinsfile's when we want to make a change to the Jenkinsfile is too much work. Therefore, we are not adopting multi-branch or organizational pipeline jobs at this time and will be sticking to standard Pipeline jobs as it supports Jenkinsfile checkout.

       

      Purposed Solution:

      Since you already support Jenkinsfile checkout for Pipeline Builds, why not support it for multi-branch and organizational builds?

      Issue to implement this feature currently:

      • Discovery 
        • Right now discovery of a project/branch for a build job is based off whether or not a Jenkinsfile is checked in for the associated project/banch. You could create behavior as such: 
          • If there is a Jenkinsfile, create a build job for that project/branch and use it. If there isn't one and there is some other property existing(some string in a readme, a special badge, etc.) create a build job and checkout the Jenkinsfile from a provided git repo. This supports one off cases where a project might need to do something special but allows for better maintenance for projects sharing a Jenkinsfile.

       

       

        Attachments

          Activity

          There are no comments yet on this issue.

            People

            • Assignee:
              sag47 Sam Gleske
              Reporter:
              rnewsom Ryan Newsom
            • Votes:
              3 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: