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

Git SCM-polling doesn't work when using a parametrized branch-name

    XMLWordPrintable

    Details

    • Similar Issues:

      Description

      Setup:

      • Git Plugin 1.1.20
      • a parameterized build with parameter "Branch", default "**"
      • Git SCM with branch specifier "${Branch}"
      • SCM polling activated

      Intended behaviour:

      • if any branch changes, Jenkins checks out and builds this branch
      • when executed manually, the user enters the name of the branch to be built

      Actual behaviour:

      • no changes are detected (because the "${Branch}" value isn't resolved when polling)

        Attachments

          Issue Links

            Activity

            Hide
            scm_issue_link SCM/JIRA link daemon added a comment -

            Code changed in jenkins
            User: Nicolas De Loof
            Path:
            src/main/java/hudson/plugins/git/GitSCM.java
            http://jenkins-ci.org/commit/git-plugin/75e4e6c2282e069bd26fbce0ead19c1c5b722c04
            Log:
            [FIXED JENKINS-20427] [FIXED JENKINS-14276] expanded vars in branch spec for remote polling

            Show
            scm_issue_link SCM/JIRA link daemon added a comment - Code changed in jenkins User: Nicolas De Loof Path: src/main/java/hudson/plugins/git/GitSCM.java http://jenkins-ci.org/commit/git-plugin/75e4e6c2282e069bd26fbce0ead19c1c5b722c04 Log: [FIXED JENKINS-20427] [FIXED JENKINS-14276] expanded vars in branch spec for remote polling
            Hide
            jblanchard Jean Blanchard added a comment -

            I created a pull request [1] to address the issue mentioned by Antoine Morisseau (polling should take the default value of a param, not the one from the last build).
            It also fixes the commit notification for those parametrized jobs.

            [1] https://github.com/jenkinsci/git-plugin/pull/293

            Show
            jblanchard Jean Blanchard added a comment - I created a pull request [1] to address the issue mentioned by Antoine Morisseau (polling should take the default value of a param, not the one from the last build). It also fixes the commit notification for those parametrized jobs. [1] https://github.com/jenkinsci/git-plugin/pull/293
            Hide
            pmv pmv added a comment -

            FYI for any others searching Jira - in my testing the issue Antoine identifies 3 comments above and Jean created the pull request for is no longer an issue in version 2.3.5 of the plugin.

            Show
            pmv pmv added a comment - FYI for any others searching Jira - in my testing the issue Antoine identifies 3 comments above and Jean created the pull request for is no longer an issue in version 2.3.5 of the plugin.
            Hide
            jblanchard Jean Blanchard added a comment -

            Actually it's not. Created JENKINS-27349 for it to have proper tracking.

            Also created related issues (that I also fixed in my original PR): JENKINS-27351 and JENKINS-27352.

            Show
            jblanchard Jean Blanchard added a comment - Actually it's not. Created JENKINS-27349 for it to have proper tracking. Also created related issues (that I also fixed in my original PR): JENKINS-27351 and JENKINS-27352 .
            Hide
            pmv pmv added a comment -

            @Jean Blanchard - you are correct. 2.3.5 did change behavior and seemed to cover more of our use case than 2.3.4, but yes, it seems your patches are still needed. I've voted for your tickets. Also, for what it's worth, I have been running a SNAPSHOT version with your changes on our Jenkins instance with 1000s of jobs and haven't seen any issues. Thanks for the patches - looking forward to seeing them integrated into future releases.

            Show
            pmv pmv added a comment - @Jean Blanchard - you are correct. 2.3.5 did change behavior and seemed to cover more of our use case than 2.3.4, but yes, it seems your patches are still needed. I've voted for your tickets. Also, for what it's worth, I have been running a SNAPSHOT version with your changes on our Jenkins instance with 1000s of jobs and haven't seen any issues. Thanks for the patches - looking forward to seeing them integrated into future releases.

              People

              • Assignee:
                markewaite Mark Waite
                Reporter:
                martoe Martin E
              • Votes:
                12 Vote for this issue
                Watchers:
                22 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: