Ravindra BagaleCourses & study guides Track your progress

Guides

शुरुआती के लिए 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 पढ़ो।

संक्षिप्त उत्तर

  1. Developer — app के पास pipeline-as-code चाहिए।
  2. Operations — server-side person जो अक्सर Jenkins administer करता है।
  3. Problem — manual builds / “मेरी machine पर चलाओ” / shared console log नहीं।
  4. Jenkins Pipeline — Declarative Jenkinsfile + Build Now।
  5. 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।

GitHub Actions CI pipeline on every push A git push starts a workflow from .yml: checkout the repo, run job steps on a runner, then report pass or fail. git push to main Workflow ci.yml on: push Job · runner 1. checkout 2. ls / test 3. report Result ✓ pass / fail CI proof before deploy Diagram of the YAML idea — no live GitHub login required to learn the shape

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' }
    }
  }
}
  1. Jenkins खोलो, sign in।
  2. New Item → Pipeline → OK।
  3. Pipeline script paste या Pipeline script from SCM।
  4. Build Now → Console Output।
  5. एक बार fail check; red log सीखो।
  6. Jenkinsfile app code के पास रखो।

Ravindra Bagale's Tip

पहले दिन बीस plugins लगाकर controller मत तोड़ो। समझे हुए sh steps के साथ Declarative। Stable > fancy। याद रखो।

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.