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

Pipeline: GitHub webhook received but nothing happens

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Closed (View Workflow)
    • Priority: Major
    • Resolution: Not A Defect
    • Component/s: github-plugin
    • Labels:
      None
    • Environment:
      Jenkins 2.3
      Github Plugin 1.19.1
      Git Plugin 2.4.4
    • Similar Issues:

      Description

      I apologize if this is something known that I've overlooked.

      I've created a small pipeline project in Jenkins to manage Github pushes against some of my enabled repositories. These jobs were brand new, typed as Pipeline jobs (not multibranch - I haven't got the buy-in from my developers to add Jenkinsfiles yet). I have Jenkins configured to automatically create webhooks against these projects, which works perfectly. I am also able to manually run jobs, whereupon I can pull the code and the pipeline builds out as intended.

      The problem lies in Jenkins kicking off the build when the POST is received. For all of these repositories, watching the Jenkins logs, I see this:

      May 25, 2016 4:09:45 PM org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber onEvent
      INFO: Received POST for https://github.com/[org]/[repo]
      

      But afterwards, nothing happens: no build starts, no exceptions are triggered, nothing. I've read through the plugin and thought this might be a mismatched class type for the job, but I am not a pro at Java, much less Jenkins plugin syntax.

      Am I missing something here? Is there lacking support for this version?

      VERY much appreciate any help anyone can provide. I've been tearing my hair out about this for a few days.

        Attachments

        1. github-polling-log.png
          github-polling-log.png
          11 kB
        2. screenshot-1.png
          screenshot-1.png
          29 kB
        3. screenshot-2.png
          screenshot-2.png
          123 kB

          Activity

          Hide
          integer Kanstantsin Shautsou added a comment -

          MultibranchPipepline doesn't use gitscm, it totally separate code that works on their own triggers/plugins. Please fill issues to workflow.
          Github-plugin provides generic API for plugins, but nobody uses it and implements their own bicycles. Starting from this time there is no sense to make one powerful plugin as we thought before. If you don't like this triggering algorithm - don't use it. You can implement one more trigger way by using eventing APIs.
          Hint: on screenshot https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Integration+Plugin that triggers jobs as i wanted without sticking to gitscm at all and in theory it should work with "worfklow" (again mutlibranch is totally different APIs, if somebody exposed not suitable types in workflow-multibranch for not siutable triggers, then it their bugs) and workflow was known to be broken because they did hacks for triggers - fix was in one of latest releases. But again there is no any useful information in this issue or in comments. Please follow https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue

          Show
          integer Kanstantsin Shautsou added a comment - MultibranchPipepline doesn't use gitscm, it totally separate code that works on their own triggers/plugins. Please fill issues to workflow. Github-plugin provides generic API for plugins, but nobody uses it and implements their own bicycles. Starting from this time there is no sense to make one powerful plugin as we thought before. If you don't like this triggering algorithm - don't use it. You can implement one more trigger way by using eventing APIs. Hint: on screenshot https://wiki.jenkins-ci.org/display/JENKINS/GitHub+Integration+Plugin that triggers jobs as i wanted without sticking to gitscm at all and in theory it should work with "worfklow" (again mutlibranch is totally different APIs, if somebody exposed not suitable types in workflow-multibranch for not siutable triggers, then it their bugs) and workflow was known to be broken because they did hacks for triggers - fix was in one of latest releases. But again there is no any useful information in this issue or in comments. Please follow https://wiki.jenkins-ci.org/display/JENKINS/How+to+report+an+issue
          Hide
          jachandler Josh Chandler added a comment -

          The word "generic" doesn't even occur on this page until you get to the comments: https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin

          I take issue with the sentiment that "nobody uses [the generic APIs]" because, in fact, the plugin documentation explicitly states that it does, in that it is able to trigger webhooks. If that is not the case, the plugin needs to be deprecated for end-user consumption and the documentation changed. There is nothing on the github-plugin page to indicate that an installable plugin is just an abstraction that I shouldn't be using for the purpose stated by the documentation.

          This functionality was guaranteed up until workflow. Kirill did not protest the use of the plugin in the way I have specified, leading me to believe this was expected behavior until now. If that was not the case, I would love to know why no one said anything to the contrary for seven months until you jumped on this thread. The very fact that of 19 watchers of this issue, that no one but you knew about this, is pretty incredible. In fact, if you ask google "jenkins github push trigger": guess what comes up as the very first result?:

          "Starting from this time" does not magically reconcile the fact that this bug was filed under completely different auspices seven months ago. If I am totally incorrect and this is the direction that the authors are taking with respect to their plugins, there is still a bug in that the documentation for the github-plugin needs to be changed to tell us we shouldn't be using it this way, and to point us to the appropriate plugins.

          Show
          jachandler Josh Chandler added a comment - The word "generic" doesn't even occur on this page until you get to the comments: https://wiki.jenkins-ci.org/display/JENKINS/Github+Plugin I take issue with the sentiment that "nobody uses [the generic APIs] " because, in fact, the plugin documentation explicitly states that it does , in that it is able to trigger webhooks. If that is not the case, the plugin needs to be deprecated for end-user consumption and the documentation changed. There is nothing on the github-plugin page to indicate that an installable plugin is just an abstraction that I shouldn't be using for the purpose stated by the documentation. This functionality was guaranteed up until workflow. Kirill did not protest the use of the plugin in the way I have specified, leading me to believe this was expected behavior until now. If that was not the case, I would love to know why no one said anything to the contrary for seven months until you jumped on this thread. The very fact that of 19 watchers of this issue, that no one but you knew about this, is pretty incredible. In fact, if you ask google "jenkins github push trigger": guess what comes up as the very first result?: "Starting from this time" does not magically reconcile the fact that this bug was filed under completely different auspices seven months ago . If I am totally incorrect and this is the direction that the authors are taking with respect to their plugins, there is still a bug in that the documentation for the github-plugin needs to be changed to tell us we shouldn't be using it this way, and to point us to the appropriate plugins.
          Hide
          integer Kanstantsin Shautsou added a comment -

          Because jenkins INFRA is not suitable for maintaining. I switched assign to Kirill Merkushev but i can't have notifications for issues. So after making review and releases i decided to check issues. I provided hints and description, i don't want discuss this issue anymore because issue complain is about not github-plugin. Trigger description will be updated as it seems that people still confused and doesn't read documentation that describes that this pushtrigger works only with gitscm.
          Most of jenkins plugins documentation is pure because done by developers for developers. Last year documentation was updated. Will review and update when i will have time.

          Show
          integer Kanstantsin Shautsou added a comment - Because jenkins INFRA is not suitable for maintaining. I switched assign to Kirill Merkushev but i can't have notifications for issues. So after making review and releases i decided to check issues. I provided hints and description, i don't want discuss this issue anymore because issue complain is about not github-plugin. Trigger description will be updated as it seems that people still confused and doesn't read documentation that describes that this pushtrigger works only with gitscm. Most of jenkins plugins documentation is pure because done by developers for developers. Last year documentation was updated. Will review and update when i will have time.
          Hide
          integer Kanstantsin Shautsou added a comment -

          Checked wiki page - everything described right. UI text will be changed later.

          Show
          integer Kanstantsin Shautsou added a comment - Checked wiki page - everything described right. UI text will be changed later.
          Hide
          martinmine Martin added a comment - - edited

          In case someone are still having problems with this, here is a small example on how to use pipelines with webhooks:

          properties([pipelineTriggers([githubPush()])])
          
          node {
              git url: 'https://github.com/someone/something.git', branch: 'master'
          }
          

          This didn't work with the regular SCM checkout scm: [$class: 'GitSCM', ... 

          Also note that the job has to be executed manually one time in order for the push trigger and the git repo to be registered. Maybe this is worth mentioning on the Wiki as this is entirely undocumented and quite important for those of us not being able to use multibranch pipelines?

          Show
          martinmine Martin added a comment - - edited In case someone are still having problems with this, here is a small example on how to use pipelines with webhooks: properties([pipelineTriggers([githubPush()])]) node { git url: 'https: //github.com/someone/something.git' , branch: 'master' } This didn't work with the regular SCM checkout scm: [$class: 'GitSCM', ...  Also note that the job has to be executed manually one time in order for the push trigger and the git repo to be registered. Maybe this is worth mentioning on the Wiki as this is entirely undocumented and quite important for those of us not being able to use multibranch pipelines?

            People

            Assignee:
            lanwen Kirill Merkushev
            Reporter:
            jachandler Josh Chandler
            Votes:
            7 Vote for this issue
            Watchers:
            20 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: