[SOLVED] 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.

Coming a little late to the party :smiley:

But it seems, this issue has resolved, or not? At least on my end, I can set up a Jenkins Pipeline project, select “Pipeline script from SCM” → git → Enter repository URL, select credentials, branch, etc… so this seems to work no?

I am using Jenkins Version 2.541.3 . I also have the Gitea plugin version 273 installed, but I don’t think that this has anything to do with it.

Hi @isiThees
Yes, in general this issue is solved.
Let me add a screenshot as an example.

1 Like