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

Git polling builds even when includes section doesn't include the changes

XMLWordPrintable

      Some of my builds have an include of a single file

      scripts/test.sh

      I have fast remote polling enabled. I also hit this issue with fast remote polling off. I can check in something on a branch in the scripts2 dir, and the job which is monitoring scripts/test.sh will still run. The polling log shows changes. And the changes are shown as only the files changed in the scripts2 dir.

      It does correctly skip running the job when I have no remote refs, so :

      git ls-remote http://githq/releng.git master
      3b3a4479be16c88ee3f8b51b5995474b6516c17f refs/heads/master

      But on my other repo I get

      git ls-remote http://githq/bigger.git master
      0e144203fe6876612f70dba2315b92f78070c8f8 refs/heads/master
      d63653727dc58d1d79956b665c27442b58df7c82 refs/remotes/origin/master

      In addition, the git-plugin looks like it is polling both heads and remote refs, line 104 in the GitSDMSource.java

      return Arrays.asList(new RefSpec("+refs/heads/:refs/remotes/origin/"));

      Looks like it polls my ref/remotes, which is way out of date compared to the head, which means something will be triggered. I'm trying to change the plugin, or see if I can update the remote ref to see if that fixes things, but right now I haven't been able to do either one. I also am not sure I am even looking at the right spot.

            Unassigned Unassigned
            aflat aflat
            Votes:
            6 Vote for this issue
            Watchers:
            8 Start watching this issue

              Created:
              Updated: