शुरुआती के लिए Jenkins Pipeline
Read this guide in: English · मराठी · हिंदी
Why Jenkins Pipeline चाहिए? क्योंकि कंपनी CI अपने server पर चलाती है तब developers और operations में problem आता है। Developers को automatic checks चाहिए। Operations — server side — अक्सर Jenkins controller own करता है। Jenkinsfile stages को code बताता है: checkout, steps, early fail — फिर Build Now और Console Output पढ़ो।
संक्षिप्त उत्तर
- Developer — app के पास pipeline-as-code चाहिए।
- Operations — server-side person जो अक्सर Jenkins administer करता है।
- Problem — manual builds / “मेरी machine पर चलाओ” / shared console log नहीं।
- Jenkins Pipeline — Declarative Jenkinsfile + Build Now।
- Pocket: stages → Build Now → console पढ़ो.
Language: English · मराठी · हिंदी
Problem? Suppose we are…
Suppose we are building Instagram (like updates)
हर profile change “जिसे याद हो उस local script” से build। Production टूटे तो Operations के पास Jenkins history नहीं।
Suppose we are working at Netflix and we are giving updates
बार‑बार updates — हर बार वही stages चाहिए। Declarative pipeline = checklist as code।
Suppose you are working in Infosys on a client project
Client का operations team पहले से Jenkins चलाता है। आपका काम: Pipeline job + audit‑योग्य Jenkinsfile — private laptop ritual नहीं।
Lab Jenkins उपयोग करें; अपने न होने वाले servers scan न करें। Compare: GitHub Actions।
A git push starts a workflow from .yml: checkout on a runner, run steps, report pass or fail.
Jenkins कैसे जवाब देता है
pipeline {
agent any
stages {
stage('Checkout') {
steps { checkout scm }
}
stage('Check') {
steps { sh 'ls -la' }
}
}
}
- Jenkins खोलो, sign in।
- New Item → Pipeline → OK।
- Pipeline script paste या Pipeline script from SCM।
- Build Now → Console Output।
- एक बार fail check; red log सीखो।
- Jenkinsfile app code के पास रखो।
Ravindra Bagale's Tip
पहले दिन बीस plugins लगाकर controller मत तोड़ो। समझे हुए sh steps के साथ Declarative। Stable > fancy। याद रखो।
Learn it properly
Samajla ka? Why Jenkins = company-owned CI जहाँ operations और developers Console Output साझा करते हैं; Instagram / Netflix / Infosys “suppose”; Jenkinsfile = pipeline as code।
Frequently asked questions
What is Jenkins?
An open-source automation server commonly used for CI/CD pipelines.
What is a Jenkinsfile?
A text file (usually in Git) that defines the Pipeline as code.
Declarative vs Scripted?
Declarative pipeline { } is the beginner-friendly syntax. Scripted is more Groovy-heavy.
Jenkins vs GitHub Actions?
Actions lives inside GitHub. Jenkins is a separate server you operate — useful in many companies.
What is an agent?
Where the stages run — built-in node or a labelled worker.
Is Jenkins only for Java?
No. Pipelines can run shell, Docker, Node, Python and more.