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

Efficiently add a single repo to a github org without requiring a full scan

    XMLWordPrintable

    Details

    • Epic Link:
    • Sprint:
      1.0
    • Similar Issues:

      Description

      In some cases when you are using a github org folder, you know you want to add one specific repository to it (it may be brand new for example, or a user has changed the pattern).

      In this case, it would be nice to not do a full org scan but instead just look for that specified repository, and save the api quota.

        Attachments

          Issue Links

            Activity

            Hide
            vivek Vivek Pandey added a comment -

            Stephen Connolly Ok, I tried implementing it in PR https://github.com/jenkinsci/blueocean-plugin/pull/893. It doesn't work though, repo is fetched but MBP scan doesn't happen. MultibranchProjectFactory.recognize() returns false. Reason being that scmSource.fetch().getRevision() returns null. Since no factory is found the MBP is not created even though there is Jenkinsfile. Maybe there is something missing, PTAL.

            Also noticed, If there are multiple Jenkins organization folders for a given GitHub org, this repo is fetched for each org folder as SCMHeadEvent.isMatch(navigator) returns true as navigators match. Wonder if there is way to avoid this unnecessary fetch of this repo for each existing org folders for given GitHub org?

             

             

            Show
            vivek Vivek Pandey added a comment - Stephen Connolly Ok, I tried implementing it in PR https://github.com/jenkinsci/blueocean-plugin/pull/893.  It doesn't work though, repo is fetched but MBP scan doesn't happen. MultibranchProjectFactory.recognize() returns false. Reason being that scmSource.fetch().getRevision() returns null . Since no factory is found the MBP is not created even though there is Jenkinsfile. Maybe there is something missing, PTAL. Also noticed, If there are multiple Jenkins organization folders for a given GitHub org, this repo is fetched for each org folder as SCMHeadEvent.isMatch(navigator) returns true as navigators match. Wonder if there is way to avoid this unnecessary fetch of this repo for each existing org folders for given GitHub org?    
            Hide
            vivek Vivek Pandey added a comment -

            According to chat with Stephen Connolly, for what we are doing, that is org/repo level, SCMSourceEvent is more appropriate. Implementing using SCMSourceEvent.

            Show
            vivek Vivek Pandey added a comment - According to chat with Stephen Connolly , for what we are doing, that is org/repo level, SCMSourceEvent is more appropriate. Implementing using SCMSourceEvent.
            Hide
            lucasocio Leandro Lucarella added a comment -

            Any news on this one? I'm bumping into this problem, specially because scanning the full org will make Jenkins hit the API quota limit.

            Show
            lucasocio Leandro Lucarella added a comment - Any news on this one? I'm bumping into this problem, specially because scanning the full org will make Jenkins hit the API quota limit.
            Hide
            lucasocio Leandro Lucarella added a comment -

            BTW, this is marked as resolved but I can't find what's the solution and how to use it.

            Show
            lucasocio Leandro Lucarella added a comment - BTW, this is marked as resolved but I can't find what's the solution and how to use it.
            Hide
            vivek Vivek Pandey added a comment -

            This was fixed long time back. PR https://github.com/jenkinsci/blueocean-plugin/pull/893. However, pipeline creation using GitHub org folder was removed in later version of blue ocean. Basically, there is no pipeline creation using Github org folder in blueocean now.

            Show
            vivek Vivek Pandey added a comment - This was fixed long time back. PR https://github.com/jenkinsci/blueocean-plugin/pull/893 . However, pipeline creation using GitHub org folder was removed in later version of blue ocean. Basically, there is no pipeline creation using Github org folder in blueocean now.

              People

              • Assignee:
                vivek Vivek Pandey
                Reporter:
                michaelneale Michael Neale
              • Votes:
                0 Vote for this issue
                Watchers:
                5 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: