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

Git SCM-polling should match everything when a parametrized branchspec resolves to empty

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      git-plugin 2.3.5
    • Similar Issues:

      Description

      This is a follow-up to JENKINS-27349.

      To reproduce:

      • A parametrized build with parameter BRANCH_TO_BUILD, with default value "" (or a last execution with BRANCH_TO_BUILD="" until JENKINS-27349 is fixed)
      • Git SCM with branch specifier "${BRANCH_TO_BUILD}"
      • SCM polling enabled

      Expected:

      • Should poll all branches, same as when you set the branchspec to "" directly, without parameters.

      Actual:

      • Nothing is matched

      Workaround:

      • Set the default value to "**" instead of ""

        Attachments

          Activity

          Hide
          jblanchard Jean Blanchard added a comment -
          Show
          jblanchard Jean Blanchard added a comment - Fixed in pull-request https://github.com/jenkinsci/git-plugin/pull/308
          Hide
          scm_issue_link SCM/JIRA link daemon added a comment -

          Code changed in jenkins
          User: Jean Blanchard
          Path:
          src/main/java/hudson/plugins/git/BranchSpec.java
          src/test/java/hudson/plugins/git/TestBranchSpec.java
          http://jenkins-ci.org/commit/git-plugin/3a83b2c181dd7bfb32e44c306b6360db8a83471c
          Log:
          JENKINS-27351 A parametrized branchspec that resolves to empty should match everything

          Show
          scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Jean Blanchard Path: src/main/java/hudson/plugins/git/BranchSpec.java src/test/java/hudson/plugins/git/TestBranchSpec.java http://jenkins-ci.org/commit/git-plugin/3a83b2c181dd7bfb32e44c306b6360db8a83471c Log: JENKINS-27351 A parametrized branchspec that resolves to empty should match everything
          Hide
          markewaite Mark Waite added a comment -

          Fix included in git plugin 2.4.0 released 18 July 2015

          Show
          markewaite Mark Waite added a comment - Fix included in git plugin 2.4.0 released 18 July 2015

            People

            • Assignee:
              ndeloof Nicolas De Loof
              Reporter:
              jblanchard Jean Blanchard
            • Votes:
              0 Vote for this issue
              Watchers:
              6 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: