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

SVN post-commit script cannot trigger build: "No subversion jobs using SCM polling"

      We've had the SVN post-commit hook for some time now, but after the latest upgrade to 1.406 (from 1.393, I think) it stopped working. There are no errors in the log expect this warning:

      27.apr.2011 13:36:44 hudson.scm.BlameSubversionRepositoryStatus doNotifyCommit
      WARNING: No subversion jobs using SCM polling
      
      27.apr.2011 13:36:44 hudson.scm.BlameSubversionRepositoryStatus
      FINE: Change reported to Subversion repository <my repos ID> on [ip/Timer/trunk/doc/mytest.doc]
      
      27.apr.2011 13:36:44 hudson.scm.BlameSubversionRepositoryStatus
      FINER: Reading line: A   ip/Timer/trunk/doc/mytest.doc
      

      It says "No subversion jobs using SCM polling" but I am 100% sure that we have SCM polling configured. The scm-polling.log says so:

      Started on 27.apr.2011 13:40:16
      Received SCM poll call on myserver for IP_Timer on Apr 27, 2011 1:40:16 PM
      http://myrepos/repos/ip/Timer/trunk is at revision 14,367
      Ignored revision 14,367: Found only excluded paths: /ip/Timer/trunk/doc/mytest.doc
      Done. Took 0,64 sec
      No changes
      

      I have even tried a fresh test installation and also there the post-commit hook does not work. The http posting returns 200 OK.

      The strange thing is that "ip/Timer/trunk/sim/run/rtl/run_sim" somehow is changed to "/Timer/trunk/sim/run/rtl/run_sim".

          [JENKINS-9529] SVN post-commit script cannot trigger build: "No subversion jobs using SCM polling"

          Jim Searle added a comment -

          I am having this same issue, is anyone looking into it?

          Jun 16, 2011 10:29:30 AM hudson.scm.BlameSubversionRepositoryStatus doNotifyCommit
          WARNING: No subversion jobs using SCM polling

          Does anyone have svn push notification working in a recent jenkins install? I'm running the latest Jenkins 1.416, and the latest subversion 1.28.

          I also verified it is not a permission issue but sending my username and password in the url to wget.

          Jim Searle added a comment - I am having this same issue, is anyone looking into it? Jun 16, 2011 10:29:30 AM hudson.scm.BlameSubversionRepositoryStatus doNotifyCommit WARNING: No subversion jobs using SCM polling Does anyone have svn push notification working in a recent jenkins install? I'm running the latest Jenkins 1.416, and the latest subversion 1.28. I also verified it is not a permission issue but sending my username and password in the url to wget.

          Jim Searle added a comment - - edited

          I looked at that hudson.scm.BlameSubversionRepositoryStatus code a little, and the only time that error should happen is when scmFound is true, and triggerFound is false.

          if (!scmFound) LOGGER.warning("No subversion jobs found");
          else if (!triggerFound) LOGGER.warning("No subversion jobs using SCM polling");
          else if (!uuidFound) LOGGER.warning("No subversion jobs using repository: " + uuid);
          else if (!pathFound) LOGGER.fine("No jobs found matching the modified files");

          and triggerFound gets set with:
          SCMTrigger trigger = p.getTrigger(SCMTrigger.class);
          if (trigger!=null) triggerFound = true; else continue;

          So I wrote a little groovy code to loop over all my jobs and print the trigger value, all of them are null except one:
          JOB: <myJobNameRemoved>
          hudson.triggers.SCMTrigger@652f5047
          JOB: <myJobNameRemoved>
          null
          JOB: <myJobNameRemoved>
          null

          So I have no clue what is going on.

          Jim Searle added a comment - - edited I looked at that hudson.scm.BlameSubversionRepositoryStatus code a little, and the only time that error should happen is when scmFound is true, and triggerFound is false. if (!scmFound) LOGGER.warning("No subversion jobs found"); else if (!triggerFound) LOGGER.warning("No subversion jobs using SCM polling"); else if (!uuidFound) LOGGER.warning("No subversion jobs using repository: " + uuid); else if (!pathFound) LOGGER.fine("No jobs found matching the modified files"); and triggerFound gets set with: SCMTrigger trigger = p.getTrigger(SCMTrigger.class); if (trigger!=null) triggerFound = true; else continue; So I wrote a little groovy code to loop over all my jobs and print the trigger value, all of them are null except one: JOB: <myJobNameRemoved> hudson.triggers.SCMTrigger@652f5047 JOB: <myJobNameRemoved> null JOB: <myJobNameRemoved> null So I have no clue what is going on.

          Markus added a comment -

          There is no component called "BlameSubversion" so I am assigning it directly to tangjinou.

          Markus added a comment - There is no component called "BlameSubversion" so I am assigning it directly to tangjinou.

          Markus added a comment - - edited

          A colleague of mine has tested this on on a fresh installation. He confirms that BlameSubversion brakes the Post-commit hook feature.

          It is still not working in Jenkins ver. 1.424. I am not a Java coder (anymore) so the code is difficult for me to understand. But it seems like BlameSubversion (v. 1.25) is replacing some of the original Subversion plugin classes. If this is true, then there could be some recent changes in the Subversion plugin that are not replicated in BlameSubversion, which then causes the post-commit hook to fail. I have compared the classes and there seems to be some new things in for example SubversionRepositoryStatus.java. But I don't understand the code so any changes I could do would be at random.

          BlameSubversion has not been updated for a year. I have email tangjinou ("any problems or request, pls send the mail to tangjinou@gmail.com, i will reply as quickly as possible.") twice without any reply.

          (This stuff is after all free, which I really appriciate, so I'm trying to not complain than much.)

          Another thing: Jim, could you share your groovy code which checks the trigger value?

          Markus added a comment - - edited A colleague of mine has tested this on on a fresh installation. He confirms that BlameSubversion brakes the Post-commit hook feature. It is still not working in Jenkins ver. 1.424. I am not a Java coder (anymore) so the code is difficult for me to understand. But it seems like BlameSubversion (v. 1.25) is replacing some of the original Subversion plugin classes. If this is true, then there could be some recent changes in the Subversion plugin that are not replicated in BlameSubversion, which then causes the post-commit hook to fail. I have compared the classes and there seems to be some new things in for example SubversionRepositoryStatus.java. But I don't understand the code so any changes I could do would be at random. BlameSubversion has not been updated for a year. I have email tangjinou ("any problems or request, pls send the mail to tangjinou@gmail.com, i will reply as quickly as possible.") twice without any reply. (This stuff is after all free, which I really appriciate, so I'm trying to not complain than much.) Another thing: Jim, could you share your groovy code which checks the trigger value?

          Johnny Horvi added a comment -

          We had a similar issue with 1.428 when we had enabled project-based security and using LDAP for authentication.
          Whenever we ran a post-commit as suggested at the plugin site, we got the following error in the Jenkins logfile:

          Sep 28, 2011 2:55:54 PM hudson.scm.SubversionRepositoryStatus doNotifyCommit
          WARNING: No subversion jobs found
          

          Our workaround was to enable project-based security on the job we wish to trigger and give read access to "Anonymous".

          Hope this can help.

          Johnny Horvi added a comment - We had a similar issue with 1.428 when we had enabled project-based security and using LDAP for authentication. Whenever we ran a post-commit as suggested at the plugin site , we got the following error in the Jenkins logfile: Sep 28, 2011 2:55:54 PM hudson.scm.SubversionRepositoryStatus doNotifyCommit WARNING: No subversion jobs found Our workaround was to enable project-based security on the job we wish to trigger and give read access to "Anonymous". Hope this can help.

          Markus added a comment - - edited

          We have stopped using the BlameSubversion plugin and the problem is no longer there. Instead we use fingerprinting, etc. That works for us.

          Markus added a comment - - edited We have stopped using the BlameSubversion plugin and the problem is no longer there. Instead we use fingerprinting, etc. That works for us.

          Peter Romba added a comment -

          Complete Jenkins newbie here. I am not using BlameSubversion, but I ran into this same issue--any time I made a commit and SVN fired off the post-commit, I'd see the above error in my Jenkins log.

          After scratching my head for a good hour, I noticed a block of text in the Post Commit Hook Section:

          Jobs on Jenkins need to be configured with the SCM polling option to benefit from this behavior. This is so that you can have some jobs that are never triggered by the post-commit hook (in the $REPOSITORY/hooks directory), such as release related tasks, by omitting the SCM polling option.
          The configured polling can have any schedule (probably infrequent like monthly or yearly). The net effect is as if polling happens out of their usual cycles.

          As a test, I set my job to poll SCM on a yearly basis, then I tried my post-commit hook, and it worked.

          Peter Romba added a comment - Complete Jenkins newbie here. I am not using BlameSubversion, but I ran into this same issue--any time I made a commit and SVN fired off the post-commit, I'd see the above error in my Jenkins log. After scratching my head for a good hour, I noticed a block of text in the Post Commit Hook Section : Jobs on Jenkins need to be configured with the SCM polling option to benefit from this behavior . This is so that you can have some jobs that are never triggered by the post-commit hook (in the $REPOSITORY/hooks directory), such as release related tasks, by omitting the SCM polling option. The configured polling can have any schedule (probably infrequent like monthly or yearly). The net effect is as if polling happens out of their usual cycles. As a test, I set my job to poll SCM on a yearly basis, then I tried my post-commit hook, and it worked.

          cforce added a comment - - edited

          I have a poll trigger in my job but despite that it does not work!
          No matter "leave poll schedule empty" or "any poll schedudle" it does not work for me.
          I any case jenkins log says "WARNING: No subversion jobs using repository:" although the passed uuid in post commit hook http post (and in jenkins log) and the workspace's svn uuid in jenkins job is exactly the same.
          It does not work and this ia major! I have no to chnage all my jobs trigger ,, ahh!

          cforce added a comment - - edited I have a poll trigger in my job but despite that it does not work! No matter "leave poll schedule empty" or "any poll schedudle" it does not work for me. I any case jenkins log says "WARNING: No subversion jobs using repository:" although the passed uuid in post commit hook http post (and in jenkins log) and the workspace's svn uuid in jenkins job is exactly the same. It does not work and this ia major! I have no to chnage all my jobs trigger ,, ahh!

            tangjinou tangjinou
            mabahj Markus
            Votes:
            4 Vote for this issue
            Watchers:
            6 Start watching this issue

              Created:
              Updated: