Configure Jenkins pipeline (not organization)

Hi,
I am pretty new to Gitea, so please be patient with me :wink:
My goal was to replace GitHub with a self hosted tool and I was soon directed to this neat little application, that was so easy to install, as I very rarely find applications to be on a Linux based system (my applause for that to the DEV team!)
My work consists out of Jenkins Pipelines, each bound to a GitHub repository and a Jenkins file. I do not use Jenkins in the strict context of a CI/CD tool, but more like a command processor.
We setup scheduled jobs by using Pipeline jobs inside Jenkins. In some rare cases we use some web hooks to have those pipelines triggered.
This being said I now try to setup such a pipeline, but fail, as Gitea seems ā€œonlyā€ to work with ā€œOrganization Foldersā€ due to the manual I find.
I would have Gitea expected to just ā€œpop upā€ beside GitHub as SCM Tool. But it only occurs in the ā€œOrganization Folderā€.
Is that correct, or do I miss anything?
br
Carsten

up!!
Same question here… I am looking for information about configuring webhooks for a normal pipeline and I didn’t find anything. Can anyone help us, please?

Hi again.
As no answer came in here, I tried to find a workaround and succeeded.
It is not very elegant and in some circumstances not for a huge production environment, but for smaller instances it could fit.

You need to setup a jenkins job w/o any SCM. Just a groovy script that receives the parameters from the webhook and pushes the correct job within the org folder.

If you are not familiar with how to trigger jobs within a job, search for the ā€œbuild jobā€ command in jenkins groovy.
Should look similar to this:

build job: 'abinsnetz/LinuxAutoupdater/master/', parameters:

where

  • ā€œabinsnetzā€ is my organizational folder
  • ā€œLinuxAutoUpdaterā€ is the repository
  • ā€œmasterā€ is the branch in question.

You can make those even more dynamic by setting them as a parameter for the webhook.

It does NOT solve the initial question, but it provides a sort of work around.

Hope it helps

Configuring a Jenkins pipeline involves setting up a Jenkinsfile, which defines the steps of your pipeline using the Pipeline DSL (Domain Specific Language). Here’s a step-by-step guide to configuring a Jenkins pipeline for a project.

Step-by-Step Guide to Configure a Jenkins Pipeline

1. Install Jenkins and Necessary Plugins

  • Make sure Jenkins is installed and running.
  • Install the necessary plugins, especially the ā€œPipelineā€ plugin.

This thread/Question is not about setting up a pipeline, it is, how Gitea SCM is setup inside Jenkins.
While with Github as example you can address single repositories in Jenkins, you only can setup Organizations with Gitea.
This has some disadvantages if you have to work with a single repo.
I had to put all my Repos into one organization, before I was able to work with them in Jenkins.

Hello,

After trying and testing, I solved it using a generic webhook trigger plugin. I didn’t really like the solution because for some functionality you have to use the gitea API in your pipeline. The Gitea plugin solves it automatically.

Hello,

I’m trying to describe how Gitea and Jenkins work together for me.

Each project has its own Jenkinsfile and uses a multi-branch pipeline configuration. In this I use the Git plugin and define the specific repository together with the SSH access. The webhook trigger is also defined in the configuration to start the Gitea pipeline (in my case when pushing).

I hope I was able to give you an idea for a solution.