Ravindra BagaleCourses & study guides

Chapter 10: Jenkins Introduction

10.12 Lab — Jenkins in Docker + Pipeline job

Lab

Run Jenkins and execute a Pipeline for badge API tests.

  1. Start Jenkins LTS with a named volume; complete unlock + admin user.
  2. Confirm UI loads on your published host counter (local laptop preferred).
  3. Add a Jenkinsfile to your badge API repo with at least Checkout and Test stages (pytest or npm test).
  4. Create a Pipeline job → Pipeline script from SCM pointing at that repo.
  5. Run a build; save a note of Console Output lines from a green Test stage.
  6. Intentionally break a test, push, rebuild — confirm the stage goes red and the log shows the assertion.
  7. Fix the test; rebuild green.
  8. When done: docker stop jenkins (and remove if you want); keep or delete jenkins_home volume intentionally.

Practice task

Write a short table (five rows) mapping your Chapter 9 Actions workflow pieces to Jenkinsfile equivalents (on, job, run, secrets, SHA tag build).

Thodkyaat sangaycha tar

  • Jenkins remains common in enterprises; learn controller/agent and Pipeline-as-code.
  • Prefer Declarative Jenkinsfile in Git over only Freestyle clicks.
  • Credentials store holds secrets — not the repo.
  • Same CI stages as Actions; different YAML/Groovy syntax and hosting model.
  • Harden lab Jenkins (auth, SG, no open UI); stop idle containers.
  • Debug with Console Output the same way you read Actions logs.

Samajla ka? Nasel tar lab (10.12) green→red→green Test stage prove kara – Jenkinsfile Git madhe. Aata pudhe jaauya Ansible intro kade.