नवशिक्यांसाठी 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 वाचा.
मित्रांनो, कंपनी स्वतःचा CI server चालवते तर Jenkins येतो. आधी “माझ्या machine वर चालवा” ची fight पहा.
थोडक्यात उत्तर
हे पाच पॉइंट्स लक्षात ठेवा:
- Developer — app शेजारी pipeline-as-code हवा.
- Operations — server-side person जो अनेकदा Jenkins administer करतो.
- Problem — manual builds / “माझ्या machine वर चालवा” / shared console log नाही.
- Jenkins Pipeline — Declarative Jenkinsfile + Build Now.
- लक्षात ठेवा: 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 — फक्त तुमच्या laptop वरची सवय नाही.
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 install करून controller तोडू नका. समजलेल्या sh steps सह Declarative. Stable > fancy. लक्षात ठेवा.
Learn it properly
समजलं का? 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.