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

Build Parameter variable in branch name causes polling to detect false changes in GIT

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
      None
    • Environment:
      Jenkins 1.537
      Jenkins GIT Plugin 2.0
      Jenkins Multiple SCM Plugin 0.2
    • Similar Issues:

      Description

      Create a Job with a parameter:
      branch

      In GIT configuration set branch to:
      ${branch}
      or
      */${branch}

      This causes polling to keep detecting changes, even when there are none.

      Everything is fine when I hardcode branch name like so:
      */master

        Attachments

          Activity

          Hide
          markewaite Mark Waite added a comment -

          Puneeth Nanjundaswamy, Nicolas De Loof is no longer a maintainer of the git plugin. I was unable to duplicate the problem in my most recent attempt. Can you provide step by step instructions which show the failure on an "out of the box" Jenkins installation? Even better is to provide those step by step instructions and a docker image (like a bug verification job as a pull request to my lts-with-plugins docker instance).

          Every time I need to guess what a user is doing it is more time that I could have spent helping in other ways (like fixing other bugs, reviewing proposals, etc.)

          Show
          markewaite Mark Waite added a comment - Puneeth Nanjundaswamy , Nicolas De Loof is no longer a maintainer of the git plugin. I was unable to duplicate the problem in my most recent attempt. Can you provide step by step instructions which show the failure on an "out of the box" Jenkins installation? Even better is to provide those step by step instructions and a docker image (like a bug verification job as a pull request to my lts-with-plugins docker instance ). Every time I need to guess what a user is doing it is more time that I could have spent helping in other ways (like fixing other bugs, reviewing proposals, etc.)
          Hide
          puneeth_n Puneeth Nanjundaswamy added a comment -

          Mark Waite Thanks for the response. I have created a seperate JIRA ticket with all details. Here is the link: https://issues.jenkins-ci.org/browse/JENKINS-38406

          Let me know in case of more info

          Show
          puneeth_n Puneeth Nanjundaswamy added a comment - Mark Waite Thanks for the response. I have created a seperate JIRA ticket with all details. Here is the link: https://issues.jenkins-ci.org/browse/JENKINS-38406 Let me know in case of more info
          Hide
          stephen_rufle Stephen Rufle added a comment -

          I have seen this same issue with the TFS plugin used in Jenkins Multiple SCM plugin 0.5

          Show
          stephen_rufle Stephen Rufle added a comment - I have seen this same issue with the TFS plugin used in Jenkins Multiple SCM plugin 0.5
          Hide
          ataylor Alex Taylor added a comment -

          Mark Waite- I was finally able to reproduce this issue 100% if you have access to bitbucket.

          1. Have Bitbucket repository with at least 10 branches

          2. Create a freestyle job and configure it to use the git plugin but connect to a Bitbucket repository at `$BITBUCKET_URL/git/$PROJECT/$REPO.git`

          3. Add a parameter called BRANCH and has the default value of **

          4. Use that parameter in the `Branches to build` section

          5. Add a poll for changes of `* * * * *` so that it will build every minute

          6. Add a shell step of something like "echo hello"

          7. Run one build

           

          This will then launch a new build for every branch and then once that is done you will see it build every minute seeing changes.

           

          Let me know if that does not work for you because it has worked 2x for me so far.

          Show
          ataylor Alex Taylor added a comment - Mark Waite - I was finally able to reproduce this issue 100% if you have access to bitbucket. 1. Have Bitbucket repository with at least 10 branches 2. Create a freestyle job and configure it to use the git plugin but connect to a Bitbucket repository at `$BITBUCKET_URL/git/$PROJECT/$REPO.git` 3. Add a parameter called BRANCH and has the default value of ** 4. Use that parameter in the `Branches to build` section 5. Add a poll for changes of `* * * * *` so that it will build every minute 6. Add a shell step of something like "echo hello" 7. Run one build   This will then launch a new build for every branch and then once that is done you will see it build every minute seeing changes.   Let me know if that does not work for you because it has worked 2x for me so far.
          Hide
          ataylor Alex Taylor added a comment -

          See my last comment since I think it is still an issue

          Show
          ataylor Alex Taylor added a comment - See my last comment since I think it is still an issue

            People

            • Assignee:
              Unassigned
              Reporter:
              m_a_r_k_y Mark Espiritu
            • Votes:
              11 Vote for this issue
              Watchers:
              24 Start watching this issue

              Dates

              • Created:
                Updated: