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

git plugin supports multiple repos but does not work as expected

      When using the git plugin in a 'freestyle job' it is possible to add multiple git repos. There seems to be no sane way to use it because:

       - it seems only the last repo gets checked out
       - any post actions apply to all repos, or the one that is checked out

      This is a problem because the Multiple SCM plugin is deprecated and I don't want to use the pipeline style job because it can't be easily used to pull from git repos with self signed certs.
      In short, it epically sucks that it seems impossible to just use 2 repos in one build job.

      It would be great if the plugin can be fixed for example by just having the advanced options apply to the specific repo, because when a sub directory can be picked per repo, I suppose everyone can combine repos in the biggest use case I think that has.

       

          [JENKINS-63595] git plugin supports multiple repos but does not work as expected

          Mark Waite added a comment -

          Thanks for the request. Unfortunately, I don't plan to implement this request. Even if someone else implemented the request, I'm unlikely to review or merge that pull request because it would create another section in the git plugin with very few users and high likelihood of breaking from one release to the next.

          Pipeline jobs are the preferred way to handle multiple repositories from a Jenkins job. They can be configured to support clone from a repository with self-signed certificates the same as freestyle jobs. Pipeline jobs can be created from the Blue Ocean pipeline editor. Support for multiple repositories is available from both declarative pipeline and scripted pipeline.

          Mark Waite added a comment - Thanks for the request. Unfortunately, I don't plan to implement this request. Even if someone else implemented the request, I'm unlikely to review or merge that pull request because it would create another section in the git plugin with very few users and high likelihood of breaking from one release to the next. Pipeline jobs are the preferred way to handle multiple repositories from a Jenkins job. They can be configured to support clone from a repository with self-signed certificates the same as freestyle jobs. Pipeline jobs can be created from the Blue Ocean pipeline editor . Support for multiple repositories is available from both declarative pipeline and scripted pipeline.

          Hi markewaite,

           

          Any reason why this was instantly closed?

          The 'request' is also a bug report.
          The current way it works is broken.
          I hope this can be reopened and fixed.
          Is it only you doing anything with Jenkins source anymore?

          thanks,

          Vincent

          Vincent Gerris added a comment - Hi markewaite ,   Any reason why this was instantly closed? The 'request' is also a bug report. The current way it works is broken. I hope this can be reopened and fixed. Is it only you doing anything with Jenkins source anymore? thanks, Vincent

          Mark Waite added a comment -

          I explained why I was closing the enhancement request in my earlier comment.

          Pipeline jobs are the preferred way to handle multiple repositories from a Jenkins job. They can be configured to support clone from a repository with self-signed certificates the same as freestyle jobs. Pipeline jobs can be created from the Blue Ocean pipeline editor. Support for multiple repositories is available from both declarative pipeline and scripted pipeline.

          Regarding your comment:

          The 'request' is also a bug report. The current way it works is broken.

          I'm fully in favor of calling anything that "bugs" someone a bug report. In this case, I don't see any difference between whether this is a "bug" or an "enhancement". Whether this is a bug or an enhancement, Jenkins Pipeline is still the preferred way to handle multiple git repositories in a single Jenkins job. I don't intend to work on this. The other maintainers of the Jenkins git plugin (Fran Fernandez, Robert Sandell, Rishabh Boudhilya) are unlikely to accept a pull request proposing to do this and are even less likely than I am to implement this themselves.

          Adding support for multiple git repositories to Freestyle, Maven, and Multi-configuration jobs would add significant complication to the already complicated code in the git plugin. That addition would only help the small set of users that want to use Freestyle, Maven, and Multi-configuration jobs with multiple repositories. Since Pipeline jobs are already over 50% of all Jenkins jobs and their portion of total Jenkins jobs continues to increase, I'm unwilling to consider implementing this.

          Regarding your last question:

          Is it only you doing anything with Jenkins source anymore?

          I am definitely not the "only one doing anything with Jenkins source". The git plugin Google Summer of Code project we just completed included 4 mentors (Fran, me, Omkar, and Justin) supporting a student (Rishabh) that worked full-time for 3 months on the git plugin enhancements that were delivered in git plugin 4.4.x. There were 5 other Jenkins projects in Google Summer of Code, each with a team of mentors to support the student.

          The Jenkins UI SIG has released theming support, including the dark theme plugin and improvements to the Jenkins plugin manager.

          In addition to those efforts, the security team has released multiple security fixes for Jenkins core and for plugins.

          The infrastructure team has made dramatic improvements to the Jenkins update center, has increased the number of Jenkins mirrors, and has switched to a new and much better supported mirror solution.

          Mark Waite added a comment - I explained why I was closing the enhancement request in my earlier comment . Pipeline jobs are the preferred way to handle multiple repositories from a Jenkins job. They can be configured to support clone from a repository with self-signed certificates the same as freestyle jobs. Pipeline jobs can be created from the Blue Ocean pipeline editor. Support for multiple repositories is available from both declarative pipeline and scripted pipeline. Regarding your comment: The 'request' is also a bug report. The current way it works is broken. I'm fully in favor of calling anything that "bugs" someone a bug report. In this case, I don't see any difference between whether this is a "bug" or an "enhancement". Whether this is a bug or an enhancement, Jenkins Pipeline is still the preferred way to handle multiple git repositories in a single Jenkins job. I don't intend to work on this. The other maintainers of the Jenkins git plugin (Fran Fernandez, Robert Sandell, Rishabh Boudhilya) are unlikely to accept a pull request proposing to do this and are even less likely than I am to implement this themselves. Adding support for multiple git repositories to Freestyle, Maven, and Multi-configuration jobs would add significant complication to the already complicated code in the git plugin. That addition would only help the small set of users that want to use Freestyle, Maven, and Multi-configuration jobs with multiple repositories. Since Pipeline jobs are already over 50% of all Jenkins jobs and their portion of total Jenkins jobs continues to increase, I'm unwilling to consider implementing this. Regarding your last question: Is it only you doing anything with Jenkins source anymore? I am definitely not the "only one doing anything with Jenkins source". The git plugin Google Summer of Code project we just completed included 4 mentors (Fran, me, Omkar, and Justin) supporting a student (Rishabh) that worked full-time for 3 months on the git plugin enhancements that were delivered in git plugin 4.4.x. There were 5 other Jenkins projects in Google Summer of Code, each with a team of mentors to support the student. The Jenkins UI SIG has released theming support, including the dark theme plugin and improvements to the Jenkins plugin manager. In addition to those efforts, the security team has released multiple security fixes for Jenkins core and for plugins. The infrastructure team has made dramatic improvements to the Jenkins update center, has increased the number of Jenkins mirrors, and has switched to a new and much better supported mirror solution.

          Fedor added a comment -

          I apologize on commenting on an already closed issue, but since this is marked as a "won't-fix" I didn't want to add another ticket into the system.

          I was just wondering if you have any suggestions on how to work around this when I am using pipelines (as opposed to Freestyle jobs).

          When the Pipeline is being pulled from SCM (and not as an inline script of the job itself), if multiple repositories are defined (for example for usage with the Git branch parameter plugin which needs to fetch branches from two different repos), defining two repos will cause the default checkout process by Jenkins for the Pipeline file to checkout & fetch from both repositories while only the last one being checked out, which might lead to some issues and additional build times.

           

          Fedor added a comment - I apologize on commenting on an already closed issue, but since this is marked as a "won't-fix" I didn't want to add another ticket into the system. I was just wondering if you have any suggestions on how to work around this when I am using pipelines (as opposed to Freestyle jobs). When the Pipeline is being pulled from SCM (and not as an inline script of the job itself), if multiple repositories are defined (for example for usage with the Git branch parameter plugin which needs to fetch branches from two different repos), defining two repos will cause the default checkout process by Jenkins for the Pipeline file to checkout & fetch from both repositories while only the last one being checked out, which might lead to some issues and additional build times.  

          Mark Waite added a comment -

          federioc we prefer to use the community forum https://community.jenkins.io or gitter chat https://gitter.im/jenkinsci/jenkins for questions and answers. Raise your question there so that more people see the question and can offer their insights. Many more people read that location than read individual bug reports.

          Mark Waite added a comment - federioc we prefer to use the community forum https://community.jenkins.io or gitter chat https://gitter.im/jenkinsci/jenkins for questions and answers. Raise your question there so that more people see the question and can offer their insights. Many more people read that location than read individual bug reports.

            markewaite Mark Waite
            vgerris Vincent Gerris
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: