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

    • Bug
    • Status: Open (View Workflow)
    • Major
    • Resolution: Unresolved
    • git-plugin
    • None
    • Jenkins 1.537
      Jenkins GIT Plugin 2.0
      Jenkins Multiple SCM Plugin 0.2

    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

          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

          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
          ataylor Alex Taylor added a comment -

          markewaite- 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.

          ataylor Alex Taylor added a comment - markewaite - 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.
          ataylor Alex Taylor added a comment -

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

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

          This is a major issue for people using a cloud build and has been open since 2013.

           

          Is it not possible to use the same solution for polling without wild cards as it is with wild cards?

          mkrussel Michael Krussel added a comment - This is a major issue for people using a cloud build and has been open since 2013.   Is it not possible to use the same solution for polling without wild cards as it is with wild cards?
          markewaite Mark Waite added a comment -

          mkrussel it is not possible to use the same solution without wild cards as with wild cards as far as I know. Pull requests with automated tests that show the problem and include a fix are certainly welcomed.

          markewaite Mark Waite added a comment - mkrussel it is not possible to use the same solution without wild cards as with wild cards as far as I know. Pull requests with automated tests that show the problem and include a fix are certainly welcomed.

          People

            Unassigned Unassigned
            m_a_r_k_y Mark Espiritu
            Votes:
            12 Vote for this issue
            Watchers:
            25 Start watching this issue

            Dates

              Created:
              Updated: