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

unable to load shared library from gerrit pull request branch

XMLWordPrintable

      It seems that is not possible to load a shared library from a CRs gerrit branch, mostly because current GitSCMSource plugin fails to see gerrit branches, and tuning the rawRefSpecs parameter seems to have no effect on it.

       

      library identifier: 'temp-lib@master', retriever: modernSCM(
      [$class: 'GitSCMSource',
          remote: 'https://review.gerrithub.io/rhos-infra/foobar',
          excludes: '',
          includes: '*',
          rawRefSpecs: '+refs/heads/*:refs/remotes/origin/* +refs/tags/*:refs/remotes/origin/tags/* +refs/changes/*:refs/remotes/changes/*'
      ])
      

      Example of using git ls-remote on gerrit repository:

      git ls-remote https://review.gerrithub.io/rhos-infra/foobar
      558aca4bf8d2eb357caa72292abb94b3b87cc41f HEAD
      a6b8fced01ebdd09930ff75768d3c437567e2f81 refs/changes/78/386678/1
      ad71ed9c8a225eb11531322ef928b89ca74eba5e refs/changes/82/386682/1
      73969f31bbc57a53b903b3c16ade1b991cbf11f7 refs/changes/82/386682/2
      cd404f64f7840bf2d92a830186159c809ff2450e refs/changes/84/386684/1
      f05cf74695e6c5731ccbeb5d98de113031ff0c70 refs/changes/84/386684/2
      65e65cae35fc55779db0afe56e9bd28554e5c074 refs/changes/85/386685/1
      c96845ab149d8f1908f46ad279088e4fb1a77dae refs/changes/85/386685/2
      89fbd1f054b2d1f3d0c417235b0e37299a36c078 refs/changes/85/386685/3
      558aca4bf8d2eb357caa72292abb94b3b87cc41f refs/heads/master
      

      As you can see, ls-remote is able to detect gerrit branches without problems. Still, I we check the console log of the job, we will find that Jenkins is trying to perform a "git ls-remote -t -h ..." which is filtering out the remote branches that we are interested about.

      I was not able to find any option to tell it not to do this.

       

       

       

            Unassigned Unassigned
            ssbarnea Sorin Sbarnea
            Votes:
            1 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated:
              Resolved: