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

git-parameter-plugin in declarative pipeline showing origin1 and origin as remote branches but actually did'nt exist

    Details

    • Similar Issues:

      Description

      I have configured Jenkins git parameter plugin for selecting appropriate branches before building a job. I am using two repositories for building a single job.

      For one of the repositories its showing two remote sever as origin and origin1 but actually it has only one it is origin.

      I have checked the repository and given the result as below

       
      $ git ls-remote --heads origin
      d8c63b4c1f1a87cba2b5065d3c2018193079fb80        refs/heads/XXXX
      3b390cec5ede9ec4dede3b83dc8d05969a286b70        refs/heads/XXXX
      ea0908b790a8491584bfe0f7e7ba459ee6307cb0        refs/heads/XXXX
      a1225d5a8f1a24ef4c65384b6833224358d30587        refs/heads/XXXX
      74977aed5ed375d2afae0e35d3ec73fa214e63e1        refs/heads/XXXX
      9e3e0fa0c93829b9dbb945f3d7788e77462f15c9        refs/heads/feature/scenario
      ff9af7bcd7d6c06cbb573656cf73abe2c0b26538        refs/heads/master
       
      $ git ls-remote
      From https://github.developer.allianz.io/cta-crui/crui-data-model.git
      ff9af7bcd7d6c06cbb573656cf73abe2c0b26538        HEAD
      d8c63b4c1f1a87cba2b5065d3c2018193079fb80        refs/heads/XXXX
      3b390cec5ede9ec4dede3b83dc8d05969a286b70        refs/heads/XXXX
      ea0908b790a8491584bfe0f7e7ba459ee6307cb0        refs/heads/XXXX
      a1225d5a8f1a24ef4c65384b6833224358d30587        refs/heads/XXXX
      74977aed5ed375d2afae0e35d3ec73fa214e63e1        refs/heads/XXXX
      9e3e0fa0c93829b9dbb945f3d7788e77462f15c9        refs/heads/feature/scenario
      ff9af7bcd7d6c06cbb573656cf73abe2c0b26538        refs/heads/master
      7d3177956309ea27d828ea8e879084ee2c1a5344        refs/pull/1/head
      27a27fe3d82c0fd867a54716b693e7173968b05b        refs/pull/2/head
      9e3e0fa0c93829b9dbb945f3d7788e77462f15c9        refs/pull/3/head
      d8c63b4c1f1a87cba2b5065d3c2018193079fb80        refs/pull/4/head
      3b390cec5ede9ec4dede3b83dc8d05969a286b70        refs/pull/5/head
      a1225d5a8f1a24ef4c65384b6833224358d30587        refs/pull/6/head
      74977aed5ed375d2afae0e35d3ec73fa214e63e1        refs/pull/7/head
      9564fdb879cc3b3ff15d66baf4d9a0cfafcda120        refs/pull/7/merge
      ff9af7bcd7d6c06cbb573656cf73abe2c0b26538        refs/tags/v0.1

       
       
      But in jenkins job it showing like this

       
       
      You can see both origin1 and origin are showing . Please provide us support regarding this issue 
       

        Attachments

          Activity

          Hide
          klimas7 Boguslaw Klimas added a comment -

          Hi,

          Are you try used 'use-repository' option?

          https://github.com/jenkinsci/git-parameter-plugin#use-repository

          Show
          klimas7 Boguslaw Klimas added a comment - Hi, Are you try used 'use-repository' option? https://github.com/jenkinsci/git-parameter-plugin#use-repository
          Hide
          krishnakp2 krishna prasad added a comment - - edited

          Hi Boguslaw Klimas,

          Yes I am already using use-repository option. so that it will select appropriate branches before the Jenkins build start .

          In this case I am confused since origin1 remote branch is not existing in repository as you can see in the above comments . So how this is getting populated in the parameter branch list.

          Show
          krishnakp2 krishna prasad added a comment - - edited Hi Boguslaw Klimas , Yes I am already using use-repository option. so that it will select appropriate branches before the Jenkins build start . In this case I am confused since origin1 remote branch is not existing in repository as you can see in the above comments . So how this is getting populated in the parameter branch list.
          Hide
          krishnakp2 krishna prasad added a comment -

          Hi Boguslaw Klimas,

          Is it related to plugin issue ? I there any way to debug this. 

          Show
          krishnakp2 krishna prasad added a comment - Hi Boguslaw Klimas , Is it related to plugin issue ? I there any way to debug this. 
          Hide
          rds1985 Rahul Singh added a comment -

          I am also facing this issue and this is happening after plugin update. Now If I am adding more than one repository then I am getting the branch name as origin/branch1 , origin1/branch1 , origin2, branch for each git parameter added for the each repository. I am having 3 repos at the moment. 

          krishna prasad Did you get any solution to this ?

          Show
          rds1985 Rahul Singh added a comment - I am also facing this issue and this is happening after plugin update. Now If I am adding more than one repository then I am getting the branch name as origin/branch1 , origin1/branch1 , origin2, branch for each git parameter added for the each repository. I am having 3 repos at the moment.  krishna prasad Did you get any solution to this ?

            People

            • Assignee:
              klimas7 Boguslaw Klimas
              Reporter:
              krishnakp2 krishna prasad
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated: