SadServers
  • Scenarios
  • Labs
    All Labs Linux & Bash Web Servers Databases Data Processing Docker Kubernetes CI/CD Infrastructure as Code Tooling / Applications
  • Dashboard
  • Solutions
    For Individuals For Businesses
  • Ranking
  • Newsletter
  • Documentation
    FAQ Support Pro Accounts Pro+ Accounts Business Accounts Gift API CLI/TUI Privacy Troubleshooting Interviews
  • Blog
  • Pricing
  • Gift
    Gift Purchase Gift Redeem
  • About
Log In - Sign Up
  1. Labs
  2. Jenkins
  3. Guide

Guide

Concepts and learning path

Troubleshooting

Failure modes and fixes

Cheatsheet

Commands to keep handy

Jenkins guide

What Jenkins does in production

Jenkins is an automation server for continuous integration and continuous delivery. Developers push code; Jenkins pulls (or receives webhooks), runs compile/test/deploy steps, and reports pass/fail. It integrates with Git, Docker, Kubernetes, and notification tools — the hub of many delivery pipelines.

CI vs CD

  • CI (Continuous Integration) — merge often; each change triggers build + tests
  • CD (Continuous Delivery/Deployment) — automated promotion to staging/production after gates pass

Jenkins handles both: a pipeline stage runs unit tests (CI), later stages push images to Harbor or deploy to Kubernetes (CD).

Controller and agents

The controller (formerly master) schedules work, serves the UI, stores configuration, and coordinates pipelines. Agents (formerly slaves/executors) run build steps — on the same machine (built-in executor) or remote VMs, Docker containers, or Kubernetes pods. Heavy builds should run on agents, not overload the controller.

Job types

  • Freestyle job — UI-configured steps; legacy but still common
  • Pipeline job — Jenkinsfile in Git (Declarative or Scripted syntax)
  • Multibranch pipeline — one pipeline per branch/PR automatically

Modern teams prefer Pipeline as Code — the Jenkinsfile lives in the repo and is reviewed like application code.

Declarative pipeline sketch

pipeline { agent any stages { stage('Build') { steps { sh 'make build' } } stage('Test') { steps { sh 'make test' } } stage('Deploy') { when { branch 'main' } steps { sh './deploy.sh' } } } post { failure { echo 'Notify team' } } }

How a build runs

  1. Trigger — webhook from Git, poll SCM, manual, or cron
  2. Queue — job waits for a free executor on an agent
  3. Checkout — SCM plugin clones the repository into a workspace
  4. Execute — steps run (shell, Docker, Maven, etc.)
  5. Archive / publish — artifacts, test reports, images
  6. Result — SUCCESS, UNSTABLE, FAILURE, or ABORTED

Credentials and secrets

Store Git SSH keys, API tokens, and registry passwords in Jenkins Credentials — referenced by ID in pipelines (credentials('my-git-key')). Prefer short-lived tokens and integration with Vault or cloud secret managers in mature setups. Never hardcode secrets in Jenkinsfiles.

Plugins

Jenkins is extended via plugins (Git, Pipeline, Docker, Kubernetes, Blue Ocean UI, etc.). Pin plugin versions; test upgrades on a staging controller — incompatible plugins are a top cause of post-upgrade breakage.

Web UI and logs

Default URL: http://host:8080 (or behind reverse proxy with TLS). Each build has a Console Output — the first place to read when a stage fails. Blue Ocean or Pipeline Stage View shows parallel stages graphically.

Key paths and service

  • Home — JENKINS_HOME (often /var/lib/jenkins)
  • Jobs config — $JENKINS_HOME/jobs/
  • Plugins — $JENKINS_HOME/plugins/
  • Logs — $JENKINS_HOME/logs/ or systemd journal
  • Service — jenkins (package install) or container

Learning resources

  • Jenkins documentation — jenkins.io/doc
  • Pipeline syntax — Declarative pipeline
  • Installing Jenkins — jenkins.io — installing
  • Blue Ocean — Pipeline UI

Practice scenarios

Hands-on Jenkins scenarios on live Linux VMs: jenkins

Troubleshooting →
SadServersSadServers

Real-world Linux and DevOps scenarios for hands-on learning and technical assessment.

Uptime Robot ratio (30 days)
Product
  • Scenarios
  • For Individuals
  • For Businesses
  • Pricing
Resources
  • FAQ
  • Blog
  • Newsletter
Company
  • About Us
  • Support
  • Privacy Policy
  • Terms of Service
  • Contact
Connect With Us
info@sadservers.com

Made in Canada 🇨🇦
Updated: 2026-06-13 16:06 UTC – 2d2950a