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

Jenkins not triggering the job for pull requests when github actions

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Unresolved
    • Icon: Major Major
    • None
    • Jenkins 2.263.4
      github-branch-source-plugin 2.9.9

      Trying to trigger the jenkins build via github workflow action with github webhooks.

      on push events, branches are getting triggered whereas pull requests are not triggering. 

      I can see the payload at jenkins log with fail to process.

      Subscriber org.jenkinsci.plugins.github.webhook.subscriber.DefaultPushGHEventSubscriber failed to process SCMEvent{type=UPDATED, timestamp=Tue Oct 05 13:52:10 CDT 2021, payload={
      "action": "opened",
      "enterprise": {
      "avatar_url": "https://avatars.githubusercontent.com/b/7526?v=4",
      "created_at": "2021-06-09T14:45:02Z",

       

      github action workflow:

      1. This is a basic workflow to help you get started with Actions

      name: Github-Webhook-Jenkins

      1. Controls when the workflow will run
        on: [push, pull_request]
      2. Triggers the workflow on push or pull request events but only for the Apple-API-Key branch

      jobs:

      1. This workflow contains a single job called "build"
        build:
      2. The type of runner that the job will run on
        runs-on: webhooks
        steps:
      • name: Trigger Jenkins
        env:
        WEBHOOK_EVENT: ${{ toJson(github.event) }}
        run: |
        echo "$WEBHOOK_EVENT"
        curl --header "X-GitHub-Event: push" --header "Content-Type: application/json" -X POST --data "$WEBHOOK_EVENT" https://jenkins-server-url/github-webhook/
         

       

       

            Unassigned Unassigned
            harasai Harasai Kumar
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

              Created:
              Updated: