Jenkinsfile at the repo root, push it in a feature branch, and let Jenkins automatically detect and run the pipeline via webhooks.

- A running Jenkins instance with the Gitea plugin installed.
- A Gitea organization folder configured in Jenkins.
- Access to your Gitea server and the Solar System repository.
Why the Solar System Repo Isn’t Yet in Jenkins
By default, Jenkins scans your Gitea organization folder for repositories containing aJenkinsfile. Since Solar System has no pipeline file or webhooks configured, it won’t appear in Jenkins:

1. Clone and Create a Feature Branch
Start by cloning the repo and creating a branch for CI/CD:2. Add a Basic Jenkinsfile
Open the project in your editor:

Jenkinsfile in the repository root:
3. Confirm Branch and Webhooks in Gitea
After pushing, head to Gitea to verify your branch and watch Jenkins webhooks auto-generate:

4. Trigger a Jenkins Scan
Jenkins periodically scans the organization folder for new repositories or branches. You can also kick off a manual scan:
feature/enabling-cicd branch:

5. View the Multibranch Pipeline
Jenkins creates a multibranch job for solar-system:


Pipeline Stages Overview
| Stage Name | Purpose | Script |
|---|---|---|
| Checkout SCM | Clone the repository | Implicit in Declarative |
| VM Node Version | Display Node.js and npm versions | node -vnpm -v |
6. Use a Jenkins-Managed Node.js Tool
By default, the pipeline uses the host’s Node.js. To leverage a managed tool:- In Jenkins, go to Pipeline Syntax → Declarative Directive Generator.
- Select tools and pick your Node.js installation (e.g.,
nodejs-22-6-0). - Copy the snippet and update your
Jenkinsfile:

Conclusion
You’ve now:- Added a
Jenkinsfileto the Solar System repo - Created webhooks in Gitea
- Triggered Jenkins to scan and build your feature branch
- Configured Jenkins to use a managed Node.js tool