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

Webhook not working with return Processed

    Details

    • Type: Bug
    • Status: Reopened (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: gitea-plugin
    • Labels:
    • Environment:
      Jenkins version : 2.222.3
      Gitea version : 1.8.1
      All components run on docker container
    • Similar Issues:

      Description

      I have configured a Weeb Hook on Gitea server.

      The test of this hook seems to works fine (HTTP 200 return code and Response body = Processe) but no build is visible on Jenkins side.

        Attachments

          Activity

          Hide
          stephenconnolly Stephen Connolly added a comment -

          Is this a dupe of JENKINS-61753?

          Show
          stephenconnolly Stephen Connolly added a comment - Is this a dupe of JENKINS-61753 ?
          Hide
          stephenconnolly Stephen Connolly added a comment -

          A status of incomplete means that the reporter has questions to answer or missing information to provide. Please reopen if/when the response has been provided and there remains an issue to be addressed

          Show
          stephenconnolly Stephen Connolly added a comment - A status of incomplete means that the reporter has questions to answer or missing information to provide. Please reopen if/when the response has been provided and there remains an issue to be addressed
          Hide
          sadmin91 Boris Manchette added a comment -

          I have updated the Gitea plugin to version 1.2.1 but the same problem still here.

          Show
          sadmin91 Boris Manchette added a comment - I have updated the Gitea plugin to version 1.2.1 but the same problem still here.
          Hide
          stephenconnolly Stephen Connolly added a comment -

          We’d need some logs or a reproduction scenario to make progress

          Show
          stephenconnolly Stephen Connolly added a comment - We’d need some logs or a reproduction scenario to make progress
          Hide
          sadmin91 Boris Manchette added a comment -

          No problem.

          Could you describe which file is necessary to analyze this behaviour?

          Show
          sadmin91 Boris Manchette added a comment - No problem. Could you describe which file is necessary to analyze this behaviour?
          Hide
          stephenconnolly Stephen Connolly added a comment -

          The Multibranch project’s event log

          If multibranch is in an org folder, the org folder’s event logs

          Snipped around the event

          Would be a start anyway

          Show
          stephenconnolly Stephen Connolly added a comment - The Multibranch project’s event log If multibranch is in an org folder, the org folder’s event logs Snipped around the event Would be a start anyway
          Hide
          sadmin91 Boris Manchette added a comment -

          When I click on "Multibranch Pipeline Events", no event is tracing.

          Could you explain how to send the desired log file?

          Show
          sadmin91 Boris Manchette added a comment - When I click on "Multibranch Pipeline Events", no event is tracing. Could you explain how to send the desired log file?
          Hide
          stegss Steffen Gaisser added a comment -

          As far as I can see a possible problem with webhooks and the gitea plugin is the usage of ssh credentials for gitea with a different url. AFAIK, the webhook checks only the html url in the payload of the webhook:

          Gitea GiteaCreateSCMEvent.java

          In my case the https (html) and ssh url are different. The scm event was triggered but the event matcher will not find any matching jenkins job for the webhook. However, the return will be 200 and processed.

          You can test this with replacing the html url in the json, which gitea provides in the webhook view, and using curl to POST the request. If I inserted my ssh url in the html of the json, then the webhook triggered the job correctĺy.

          Entering an alias in the jenkins settings does not change the way, the event matcher works. I don't want to setup a specific jenkins user for gitea as I wanted to use deploy keys only. Another solution would be to add a check in GiteaCreateSCMEvent.isMatch(..) with the ssh url: ...(getPayload().getRepository().getSshUrl());...

          Show
          stegss Steffen Gaisser added a comment - As far as I can see a possible problem with webhooks and the gitea plugin is the usage of ssh credentials for gitea with a different url. AFAIK, the webhook checks only the html url in the payload of the webhook: Gitea GiteaCreateSCMEvent.java In my case the https (html) and ssh url are different. The scm event was triggered but the event matcher will not find any matching jenkins job for the webhook. However, the return will be 200 and processed. You can test this with replacing the html url in the json, which gitea provides in the webhook view, and using curl to POST the request. If I inserted my ssh url in the html of the json, then the webhook triggered the job correctĺy. Entering an alias in the jenkins settings does not change the way, the event matcher works. I don't want to setup a specific jenkins user for gitea as I wanted to use deploy keys only. Another solution would be to add a check in GiteaCreateSCMEvent.isMatch(..) with the ssh url: ...(getPayload().getRepository().getSshUrl());...

            People

            • Assignee:
              Unassigned
              Reporter:
              sadmin91 Boris Manchette
            • Votes:
              1 Vote for this issue
              Watchers:
              4 Start watching this issue

              Dates

              • Created:
                Updated: