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

False positives during CVS Polling triggering unneeded job executions

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: Major Major
    • cvs-plugin
    • None
    • Platform: PC, OS: Windows XP

      Hi there,
      I have set up a build job that uses CVS as its SCM. Specifically, it polls a
      specific TAG in cvs, and then builds if changes are detected.

      Here are relevant configuration information:
      Source Control Management
      CVS: (selected)
      Branch: (my tag name)
      This is a tag, not a branch: (checked)

      Build Triggers
      Poll SCM: (checked)
      Schedule: */5 * * * *

      It seems like with this configuration, the build gets triggered every 5
      minutes, even when there are no changes to the CVS repository. The following is
      in the polling log:
      Workspace is inconsistent with configuration. Scheduling a new build
      ...

      In investigating further, I found that the problem seems to be because when a
      particular tag (instead of branch) of a module is checked out from CVS, the
      contents of the CVS/Tag files is:
      N<tagname>

      instead of
      T<tagname>

      Changing the "isUpdatableModule(File)" method in hudson.scm.CVSSCM class in the
      core Hudson library as follows seem to resolve the issue:

      From:
      ...
      if(branch!=null)

      { if(!checkContents(new File(cvs,"Tag"),'T'+branch)) return false; }

      ...
      ...

      To:
      ...
      if(branch!=null) {
      if(isTag)

      { if(!checkContents(new File(cvs,"Tag"),'N'+branch)) return false; }

      else

      { if(!checkContents(new File(cvs,"Tag"),'T'+branch)) return false; }

      } ...
      ...

      Thank you!

            Unassigned Unassigned
            jackgene jackgene
            Votes:
            1 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: