✅ What is Jenkins? (Simple Explanation for Students)
🔧 Jenkins is a free tool used by developers to automate tasks like:
- 
Building code 
- 
Testing code 
- 
Deploying applications 
💡 Think of Jenkins as a Robot Assistant:
Whenever you write code and push it to GitHub, Jenkins can:
- 
Automatically test if the code works 
- 
Automatically build the app 
- 
Automatically deploy it to a server 
🔁 This process is called CI/CD:
- 
CI – Continuous Integration (build + test automatically) 
- 
CD – Continuous Deployment (deploy automatically) 
🚀 Jenkins Installation: Key Steps and Important Options
🔷 Windows Installation Steps:
- 
Install Java First (JDK) 
 Jenkins needs Java to run.- 
Download JDK from Oracle or OpenJDK 
- 
Set JAVA_HOMEenvironment variable
- 
Add Java to system PATH 
 
- 
- 
Download Jenkins - 
Go to https://www.jenkins.io 
- 
Download the Jenkins Windows Installer (.msi) 
 
- 
- 
Run Installer - 
Double-click and follow steps 
- 
It will install Jenkins as a Windows Service 
 
- 
- 
Initial Setup - 
Go to http://localhost:8080
- 
Unlock Jenkins using the password in the file shown on screen - 
Path: C:\Program Files\Jenkins\secrets\initialAdminPassword
 
- 
- 
Install Suggested Plugins (Recommended) 
- 
Create Admin User 
 
- 
- 
Ready to Use! 
🔷 Linux Installation Steps (Ubuntu/Debian Example):
- 
Install Java 
- 
Add Jenkins Repository 
- 
Install Jenkins 
- 
Start Jenkins 
- 
Open in Browser 
 Visithttp://your-server-ip:8080- 
Unlock Jenkins with password: 
- 
Install Suggested Plugins 
- 
Create Admin User 
 
- 
⭐ Most Important Options in Jenkins (For Beginners):
| Feature | What It Does (In Simple Words) | 
|---|---|
| Freestyle Project | Manually configure tasks like build/test/deploy | 
| Pipeline | Write scripts to automate build + deploy | 
| Build Triggers | Run job automatically (e.g. when code is pushed) | 
| Source Code Management (SCM) | Connect with GitHub, GitLab, Bitbucket | 
| Post-build Actions | Send emails, deploy code, etc. after build | 
| Plugins | Add extra features (GitHub, Docker, Slack, etc.) | 
Task1 create free style project to print hello world under windows machine
Task2: Create Java Program and push into github using git , compile and execute this code under Jenkins using Free Style Project
Task3: Create Python Program and push into github using git , execute this code under Jenkins using Free Style Project
Task4: Build Execute by Github Webhooks
1. Install ngrok
Download from: https://ngrok.com/download
Extract and place ngrok.exe in a known location (e.g., C:\ngrok\ngrok.exe)
2. Run ngrok to Expose Jenkins
Open Command Prompt and run:
You’ll see output like:
✅ Copy the HTTPS URL (e.g., https://abc123.ngrok.io)
3) Manage ngrok authentication with login and authenticate token
step6: replace ngrok url under payload url like this https://d3d61da557f0.ngrok-free.app/github-webhook/
4) choose webhooks triggers
i choose commit and push both
5) build automatically created when you push or commit in jenkins
Task5: Build Java Project using Maven from github (Free Style Project)
📌 What is a Pipeline in Jenkins?
A Jenkins Pipeline is a way to define the steps of your build process as code (written in Groovy).
Instead of clicking around in the Jenkins UI to configure a job, you put all your build steps inside a file called Jenkinsfile.
This gives you:
- 
Automation (every build runs exactly the same way) 
- 
Version control (the pipeline code lives with your project) 
- 
Flexibility (build, test, deploy in sequence) 
🛠 Simple Jenkins Pipeline Example
Task6: Build Java Project using Maven from github (Pipeline Style Project)
 
 
 
 
0 تعليقات
POST Answer of Questions and ASK to Doubt