Gitea Pull Request integration with Jenkins

Hi,

First of all I am trying to setup a Gitea webhook to run a Jenkins job when a Pull request is created to validate a PR and if the jenkins job passed continue with the merge process of the PR.

I am using:

Gitea 1.21.0 rc0
Jenkins 2.414.1

Is it possible to do that with the tools that I have and what are the steps that should I need to consider in order to implement this.

In general I am trying to implement like a pre-push hook, so I want to make sure that what we are going to merge from the PR onto the master branch won’t break our code.

1 Like

Hello, tell me, did you manage to find a solution? My task is to implement what you described, but I can’t figure out how to run a task in jenkins on a pull request event

AFAIK there are no Jenkins plugins to build, review, comment PRs in Gitea. This can be done by setting up a Jenkins job for a multibranch pipeline. Here you have few options to have the Jenkinsfile inside the repository/ as a Shared library/ inside an external repository. You have to follow this way.