• Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • ghprb-plugin
    • None

      I've been trying to get the GitHub Pull Request Builder plugin working.

      I set it up based on the instructions listed on the plugin page.

      After creating a new pull request, I can confirm Jenkins receives the payload in the logs:

      Mar 12, 2014 10:32:33 AM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex
      Got payload event: pull_request

      Unfortunately, it stops there. No build gets triggered. I did find that configuring the Jenkins job, and then saving (with no changes) will trigger the builds to start happening.

      I've checked the logs to see what is happening but it only shows this from the save configure trigger.

      Mar 12, 2014 10:35:54 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest
      Created pull request #170 on test/test by <user> updated at: 3/12/14 10:18 AM SHA: <hash>
      Mar 12, 2014 10:35:54 AM INFO org.jenkinsci.plugins.ghprb.GhprbRepository createCommitStatus
      Setting status of <hash> to PENDING with url null and message: Merged build triggered.
      Mar 12, 2014 10:35:54 AM INFO org.jenkinsci.plugins.ghprb.GhprbRepository createCommitStatus
      Setting status of <hash> to PENDING with url http://<jenkinsurl>:8080/job/BuildTests/8/ and message: Merged build started.
      Mar 12, 2014 10:35:54 AM INFO org.jenkinsci.plugins.ghprb.GhprbPullRequest build
      Merged build triggered.
      Mar 12, 2014 10:36:12 AM INFO hudson.model.Run execute
      iOS SDK PR Tests #8 main build action completed: SUCCESS
      Mar 12, 2014 10:36:12 AM INFO org.jenkinsci.plugins.ghprb.GhprbRepository createCommitStatus
      Setting status of <hash> to SUCCESS with url http://<jenkinsurl>:8080/job/BuildTests/8/ and message: Merged build finished.

          [JENKINS-22157] Web Hook Does not Start a build

          Dr. Kibitz added a comment - - edited

          If you are getting a payload, I would check your job's refspec is correct:
          +refs/pull/:refs/remotes/origin/pr/

          If it is correct, but you changed this from something else, I would wipe the workspace.
          Changing this value doesn't actually edit the .git/config file like it should.

          Maybe this will help.

          Dr. Kibitz added a comment - - edited If you are getting a payload, I would check your job's refspec is correct: +refs/pull/ :refs/remotes/origin/pr/ If it is correct, but you changed this from something else, I would wipe the workspace. Changing this value doesn't actually edit the .git/config file like it should. Maybe this will help.

          Frank K added a comment -

          We are seeing the exact same thing on our Jenkins environment.

          The "polling" system is not reliable so we switched to push (which is also more optimal api wise) only to run in to this particular issue which again results in jobs not being built when they should have been.

          Saving the configuration does "wake" it up again, something is pretty messed up here!

          The refspec is however set to

          +refs/pull/*:refs/remotes/origin/pr/*
          

          not sure if that matters here since it does match (and more).

          Frank K added a comment - We are seeing the exact same thing on our Jenkins environment. The "polling" system is not reliable so we switched to push (which is also more optimal api wise) only to run in to this particular issue which again results in jobs not being built when they should have been. Saving the configuration does "wake" it up again, something is pretty messed up here! The refspec is however set to +refs/pull/*:refs/remotes/origin/pr/* not sure if that matters here since it does match (and more).

          Taylor Leese added a comment -

          I am experiencing the same problem.

          Taylor Leese added a comment - I am experiencing the same problem.

          Similar behavior here, except not even saving the config gets the job running. Just silent failure.

          Christopher Smith added a comment - Similar behavior here, except not even saving the config gets the job running. Just silent failure.

          I was experiencing a nasty gap in the logging that I reported separately as JENKINS-24210. I'd inadvertently let Firefox autocomplete the GitHub URL from another project, and the `getRepos()` method at GhprbRootAction:94 wasn't finding a matching repository and returning empty, causing the for loop to never execute. The current algorithm is fragile in the first place (GitHub sends all the information necessary to find the repository in the post body anyway), and this misconfiguration made it wander off into nowhere.

          Christopher Smith added a comment - I was experiencing a nasty gap in the logging that I reported separately as JENKINS-24210 . I'd inadvertently let Firefox autocomplete the GitHub URL from another project, and the `getRepos()` method at GhprbRootAction:94 wasn't finding a matching repository and returning empty, causing the for loop to never execute. The current algorithm is fragile in the first place (GitHub sends all the information necessary to find the repository in the post body anyway), and this misconfiguration made it wander off into nowhere.

          Graham Hay added a comment -

          Same problem here. The plugin is working perfectly for several jobs, and was working for this one until recently. In the log:

          Mar 04, 2016 10:51:50 AM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex
          
          Checking issue comment 'retest this please' for repo REDACTED
          

          And nothing happens. Jenkins 1.642.2 and plugin version 1.30.6. I've tried re-saving the config etc.

          Graham Hay added a comment - Same problem here. The plugin is working perfectly for several jobs, and was working for this one until recently. In the log: Mar 04, 2016 10:51:50 AM INFO org.jenkinsci.plugins.ghprb.GhprbRootAction doIndex Checking issue comment 'retest this please' for repo REDACTED And nothing happens. Jenkins 1.642.2 and plugin version 1.30.6. I've tried re-saving the config etc.

          Graham Hay added a comment -

          Turned out be a case sensitivity issue with the "project url".

          For anyone else investigating this, I would recommend adding a jenkins logger for "org.jenkinsci.plugins.ghprb" at FINE or above.

          Graham Hay added a comment - Turned out be a case sensitivity issue with the "project url". For anyone else investigating this, I would recommend adding a jenkins logger for "org.jenkinsci.plugins.ghprb" at FINE or above.

            Unassigned Unassigned
            kingston Kingston Lee
            Votes:
            2 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated: