Search code examples
githubjenkinsjenkins-pipeline

Github webhook is not triggering Jenkins pipeline


I am trying to trigger a pipeline when code is merged to a particular branch. I have don the Git server set up and the git webhook configuration and yet the pipeline is not trigger. I get a 200 response code in the Git webhook : Response delivery but Jenkins webhook log shows no data.

It is a Private repo and have checked the Configations.

Things tried so far:

  1. created a Test repo and checked the webhook trigger : It worked.
  2. Create a freestyle job on jenkins and tried the webhook trigger on the actual repo : It worked. (Since i'm not able to provide a jenkins file as script cannot use freestyle)

Kindly help me understand if there is any Organization level setting that i am missing or any configuration on jenkins and help me debug the issue. (Also im the owner of both Test and Actual organization and Repo in Github and have checked the member privilages.)


Solution

  • The catch was to do a successful manual build and then trigger via web hooks.

    Also enabling loggers helped to debug the issue :

    Configure WebHook logs : Manage Jenkins -> System Logs -> Add recorder.

    1. Set "hudson.plugins.git.GitStatus" : All
    2. Set "com.cloudbees.jenkins.GitHubWebHook" : All
    3. Set "org.jenkinsci.plugins.github" : All