Creating & Configuring Jenkins Pipeline
Step 1: Configure Access Token in Gitea
-
In Gitea, click on your user avatar at the top right, then select Settings > Applications.
-
Enter a token name (e.g.,
Jenkins
), set it toPrivate
, and select all permissions as READ/WRITE. Click Generate Token. -
Copy the token and store it in a secure place. This token will be used for Jenkins authentication.
Step 2: Install Required Plugins in Jenkins
-
Log into Jenkins. From the Dashboard, click Manage Jenkins > Manage Plugins.
-
Under Available Plugins, search for and install the following:
- Gitea
- SonarQube Scanner
- Prometheus Metrics
Step 3: Create Jenkins Pipeline
-
From the Jenkins Dashboard, click New Item.
-
Select Organization Folder and name it (e.g.,
OWASP Juice Shop Pipeline
). -
Scroll down to Repository Sources and select Gitea Organization.
-
Under Credentials, click Add. Select the organization folder name, set the Kind to Gitea Personal Access Token (PAT), and paste the token generated from Gitea.
-
Set the Owner to your Gitea username, and then click Apply and Save.