Jenkins Pipeline for Beginners
Read this guide in: English · मराठी · हिंदी
Why do we need a Jenkins Pipeline? Because there is a real problem between developers and operations when the company runs CI on its own server. Developers want automatic checks. Operations — the employee on the server side — often owns the Jenkins controller. A Jenkinsfile describes the same stages as code: checkout, run steps, fail early — then Build Now and read Console Output.
Friends, Jenkins is still common at Infosys-style clients. First see who owns the controller. Then the Declarative skeleton sticks.
Quick answer
Hold this vertical picture:
- Developer — wants pipeline-as-code next to the app.
- Operations — server-side person who often administers Jenkins.
- The problem — manual builds / “run it on my machine” / no shared console log.
- Jenkins Pipeline — Declarative Jenkinsfile + Build Now.
- Pocket line: stages in Git (or pasted script) → Build Now → read console.
Language: English · मराठी · हिंदी
Why do we need Jenkins Pipeline?
- Many companies already have Jenkins for CI/CD.
- Operations on the server side needs one place to see build history.
- Pipeline-as-code stops “click the UI differently every Friday.”
Need a Jenkins you are allowed to use (lab VM/container). Do not scan servers you do not own. Basic Git. Compare: GitHub Actions.
What does operations have to do with Jenkins?
- Operations often installs plugins, agents, and credentials on the controller.
- Developers write the Jenkinsfile; both read Console Output when red.
- Prefer Jenkinsfile in Git so reviews travel with the app.
What is the problem? Suppose we are…
Suppose we are building Instagram (like updates)
Suppose every profile change is “built” by whoever remembers the local script. Operations has no Jenkins history when production breaks.
Suppose we are working at Netflix and we are giving updates
Suppose high-frequency updates need the same stages every time. A Declarative pipeline is that checklist as code.
Suppose you are working in Infosys on a client project
Suppose the client’s operations team already runs Jenkins. Your job is a Pipeline job + Jenkinsfile they can audit — not a private laptop ritual.
A git push starts a workflow from .yml: checkout on a runner, run steps, report pass or fail.
How Jenkins answers that same fight
Declarative skeleton:
pipeline {
agent any
stages {
stage('Checkout') {
steps { checkout scm }
}
stage('Check') {
steps { sh 'ls -la' }
}
}
}
Steps in Jenkins UI:
- Open Jenkins and sign in (lab URL you administer).
- New Item → name like
client-ci→ Pipeline → OK. - Definition: Pipeline script (paste skeleton) or Pipeline script from SCM (real projects).
- Build Now → open build → Console Output.
- Add a failing check once (
sh 'test -f README.md') and learn to read the red log. - Store the Jenkinsfile next to application code for review history.
Ravindra Bagale's Tip
Students install twenty plugins on day one and break the controller. Use Declarative with sh steps you understand. Stable beats fancy. Lakshat theva.
What you should see
- Build history blue/green (success) or red (failure).
- Console Output prints each
shcommand and exit code. - Stage view lists Checkout → Check in order.
Common errors — story pain then fix
| Pain from the stories | Likely cause | Fix |
|---|---|---|
checkout scm fails in script-only job |
No SCM configured | Plain sh steps, or Pipeline from SCM |
sh not found on Windows agent |
Agent OS | Unix agent or bat on Windows |
| Permissions denied writing workspace | Agent user rights | Fix agent user — never unsafe world-writable modes |
| Pipeline syntax error | Missing braces | Start from the skeleton |
| Slow builds | Heavy tools every run | Keep first lab tiny |
Learn it properly
Samajla ka? Why Jenkins = company-owned CI where operations and developers share Console Output; Instagram / Netflix / Infosys “suppose”; Jenkinsfile = pipeline as code. Build Now, read the console.
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.