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

Pipeline Branch Specifier "blank for 'any'" fails

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Minor Minor
    • git-plugin
    • Jenkins ver. 2.60.3 and 2.73.1

      In Pipeline Job, "Branches to build configuration" it's said "blanck for any" but it fails when I manually trigger the build with :
      java.lang.IllegalArgumentException: Invalid refspec refs/heads/**
      see screen shots for more details

      is there any other way to build all branches?

      Work around the issue by disabling lightweight checkout in the job definition

          [JENKINS-46588] Pipeline Branch Specifier "blank for 'any'" fails

          Flo Pic created issue -
          Adrien Lecharpentier made changes -
          Component/s New: git-plugin [ 15543 ]
          Component/s Original: pipeline [ 21692 ]

          Adrien Lecharpentier added a comment - - edited

          flopic it would be interested to have a support-bundle of your instance so we can see the git-plugin version you are using. It would greatly help to reproduce the issue.

          Support bundle are generated using Support Core plugin

          Adrien Lecharpentier added a comment - - edited flopic it would be interested to have a support-bundle of your instance so we can see the git-plugin version you are using. It would greatly help to reproduce the issue. Support bundle are generated using Support Core plugin

          I'm seeing the same issue, also with jenkins 2.60.3. Git plugin is current:

           

          * git:3.5.1 'Jenkins Git plugin'
          * git-client:2.5.0 'Jenkins Git client plugin'
          * git-server:1.7 'Jenkins GIT server Plugin'
          

          I can attach a support bundle if it helps. Still looking through it to see what it contains.

          Nathaniel Irons added a comment - I'm seeing the same issue, also with jenkins 2.60.3. Git plugin is current:   * git:3.5.1 'Jenkins Git plugin' * git-client:2.5.0 'Jenkins Git client plugin' * git-server:1.7 'Jenkins GIT server Plugin' I can attach a support bundle if it helps. Still looking through it to see what it contains.

          Flo Pic added a comment -

          I have the same Jenkins/Git plugin versions as Nathaniel Irons :

          • git : 3.5.1 'Jenkins Git plugin'
          • git-client : 2.5.0 'Jenkins Git client plugin'
          • git-server : 1.7 'Jenkins GIT server Plugin'

          Flo Pic added a comment - I have the same Jenkins/Git plugin versions as Nathaniel Irons : git : 3.5.1 'Jenkins Git plugin' git-client : 2.5.0 'Jenkins Git client plugin' git-server : 1.7 'Jenkins GIT server Plugin'

          This appears to be 100% reproducible on 2.60.3. With a single branch specifier for a project hosted at github, if I leave the branch specifier field blank and save the job, Jenkins will fill the field with two asterisks. Kicking off a build at that point fails, with the error:

          Invalid refspec refs/heads/**

          However, when I update to 2.70.1, the same manually invoked build with a branch specifier of "**" now says "Multiple candidate revisions" and seems to pick a branch at random. This seems closer to expected behavior, though I'd like to understand how it's making a choice.

           

           

          Nathaniel Irons added a comment - This appears to be 100% reproducible on 2.60.3. With a single branch specifier for a project hosted at github, if I leave the branch specifier field blank and save the job, Jenkins will fill the field with two asterisks. Kicking off a build at that point fails, with the error: Invalid refspec refs/heads/** However, when I update to 2.70.1, the same manually invoked build with a branch specifier of "**" now says "Multiple candidate revisions" and seems to pick a branch at random. This seems closer to expected behavior, though I'd like to understand how it's making a choice.    

          Well, it was working for me four hours ago, but now I'm reproducing the invalid refspec error, in 2.70.1, in response to both polled changes and when invoking builds manually. The only branch specifier syntax I can find that reliably succeeds is some kind of specific branch prefix.

          Nathaniel Irons added a comment - Well, it was working for me four hours ago, but now I'm reproducing the invalid refspec error, in 2.70.1, in response to both polled changes and when invoking builds manually. The only branch specifier syntax I can find that reliably succeeds is some kind of specific branch prefix.
          Nathaniel Irons made changes -
          Environment Original: Jenkins ver. 2.60.3 New: Jenkins ver. 2.60.3 and 2.70.1
          Nathaniel Irons made changes -
          Environment Original: Jenkins ver. 2.60.3 and 2.70.1 New: Jenkins ver. 2.60.3 and 2.73.1

          Nathaniel Irons added a comment - - edited

          Sorry, both of my above references to 2.70.1 were from memory, and should have been 2.73.1, the current LTS.

          Nathaniel Irons added a comment - - edited Sorry, both of my above references to 2.70.1 were from memory, and should have been 2.73.1, the current LTS.

            Unassigned Unassigned
            flopic Flo Pic
            Votes:
            7 Vote for this issue
            Watchers:
            11 Start watching this issue

              Created:
              Updated: