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

Git poll always finds changes when there is none when used with Gerrit trigger strategy

      I have gerrit configured to react on changes in all branches (**) but the buids are using the property $GERRIT_BRANCH set to ref/heads/my_branch
      WHen polls are running i see that the last built revision matches the ones that are available in mainline - there is no other revisions that are coming from the git ls-remote command that poll uses. Yet git poll reports it found changes and it triggeres the rebuild.
      in changes list for the project all latest builds are having the same one commit over and over again.

          [JENKINS-24648] Git poll always finds changes when there is none when used with Gerrit trigger strategy

          eguess74 created issue -
          eguess74 made changes -
          Summary Original: Git poll always finds changes when there is non when used with Gerrit trigger strategy New: Git poll always finds changes when there is none when used with Gerrit trigger strategy

          eguess74 added a comment -

          i will try the alternative approach recommended on the gerrit trigger plugin page: " If this does not work for you set Refspec to refs/changes/:refs/changes/ and 'Branches to build' to $GERRIT_REFSPEC."

          eguess74 added a comment - i will try the alternative approach recommended on the gerrit trigger plugin page: " If this does not work for you set Refspec to refs/changes/ :refs/changes/ and 'Branches to build' to $GERRIT_REFSPEC."

          eguess74 added a comment -

          i went back to the original configuration where GERRIT_REFSPEC is set to /refs/heads/my_branch and the the branches to build is set to $GERRIT_BRANCH. I limited the scope by speciying in gerrit trigger to trigger only on /my_branch/*
          Yet everytime when the job is polling the repo (scheduled poll) it always finds same change, for some of the project few months old ones

          eguess74 added a comment - i went back to the original configuration where GERRIT_REFSPEC is set to /refs/heads/my_branch and the the branches to build is set to $GERRIT_BRANCH. I limited the scope by speciying in gerrit trigger to trigger only on /my_branch/ * Yet everytime when the job is polling the repo (scheduled poll) it always finds same change, for some of the project few months old ones

          eguess74 added a comment -

          BTW it is jenkins 1.578 and latest gerrit trigger and git plugins

          eguess74 added a comment - BTW it is jenkins 1.578 and latest gerrit trigger and git plugins

          eguess74 added a comment -

          tryig to set up the trigger explicitely as "my_branch" without patterns.

          eguess74 added a comment - tryig to set up the trigger explicitely as "my_branch" without patterns.

          eguess74 added a comment -

          so, to clarify the last settings i have iisues with: my builds are using a parameter GERRIT_REFSPEC set to refs/heads/my_branch
          Git repository refspec = $GERRIT_REFSPEC
          Branches to build = $GERIT_BRANCH
          Strategy = Gerrit Trigger
          Gerrit event: repo plain repos name, branch plain "my_branch"
          We are using ivy build trigger with more than a 1000 of projects set this way
          Everytimte the poll is triggered it finds 1 commit and rebuilds it

          eguess74 added a comment - so, to clarify the last settings i have iisues with: my builds are using a parameter GERRIT_REFSPEC set to refs/heads/my_branch Git repository refspec = $GERRIT_REFSPEC Branches to build = $GERIT_BRANCH Strategy = Gerrit Trigger Gerrit event: repo plain repos name, branch plain "my_branch" We are using ivy build trigger with more than a 1000 of projects set this way Everytimte the poll is triggered it finds 1 commit and rebuilds it

          eguess74 added a comment -

          what i would like to achieve is to make Jenkins to build only in case if there are changes submitted for review for branch my_branch and in case if there is a direct push into this branch. Nothing else should trigger the buid

          eguess74 added a comment - what i would like to achieve is to make Jenkins to build only in case if there are changes submitted for review for branch my_branch and in case if there is a direct push into this branch. Nothing else should trigger the buid

          eguess74 added a comment - - edited

          had to go back to the ANT branch pattern my_branch* as the plain branch name was not triggering properly if there is a topic added.

          eguess74 added a comment - - edited had to go back to the ANT branch pattern my_branch * as the plain branch name was not triggering properly if there is a topic added.

          eguess74 added a comment - - edited

          i'm curious if the conflict can be caused by the fact that i have gerrit event as the trigger configured together with the poll scm...

          eguess74 added a comment - - edited i'm curious if the conflict can be caused by the fact that i have gerrit event as the trigger configured together with the poll scm...

            Unassigned Unassigned
            eguess74 eguess74
            Votes:
            1 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated: