Jenkins Tutorial

Learn Jenkins CI/CD: installation, freestyle jobs, declarative pipelines, credentials, agents, configuration as code, multibranch builds, shared libraries, and deployments.

Jenkins is the open-source automation server that has run continuous integration and delivery for a huge number of teams for over a decade. It builds and tests every change, packages artifacts and deploys them, and its plugin ecosystem connects it to almost any tool.

This path explains how Jenkins works (controllers, agents, executors and jobs), installs it, and builds up from freestyle jobs to declarative pipelines written as a Jenkinsfile. It then covers what running Jenkins well requires: managing credentials safely, distributing builds to agents, configuring the controller as code, multibranch pipelines driven by webhooks, shared libraries, and a complete build-test-deploy pipeline with approvals and automatic rollback. Pipelines were run on Jenkins LTS 2.580.

What You'll Learn

  • Getting Started
  • Pipelines
  • Scaling and Administration
  • Real-World Delivery

11 tutorials · Beginner to advanced · Exercises with solutions in every article · Free, no sign-up

Start here

What Jenkins Is and How It Works

What Jenkins does, how its controller, agents, executors, jobs, builds and plugins fit together, and how freestyle and Pipeline jobs differ, with real build logs.

Section 1. Getting Started

Start here to learn the Jenkins basics.

  • —What Jenkins Is and How It Works – What Jenkins does, how its controller, agents, executors, jobs, builds and plugins fit together, and how freestyle and Pipeline jobs differ, with real build logs.
  • —Installing Jenkins – Install Jenkins LTS from the WAR, Docker or Linux packages, unlock the setup wizard, lock down security, and learn what JENKINS_HOME holds and how to back it up.
  • —Freestyle Jobs, Parameters, and Triggers – Build a real project as a Jenkins freestyle job: git checkout, shell steps, parameters, environment variables, cron and SCM triggers, artifacts, fingerprints and discarders.

Section 2. Pipelines

  • —Your First Pipeline: Jenkinsfile Basics – Write a first Jenkinsfile for a real Python project: stages, sh steps, test reports and artifacts, Pipeline from SCM, Replay, the Snippet Generator and the declarative linter.
  • —Declarative Pipeline in Depth – Every declarative Pipeline directive that matters, run on a real controller: environment, parameters, options, triggers, when, parallel, matrix, post, input, stash and script.

Section 3. Scaling and Administration

  • —Credentials and Secrets – How Jenkins stores, scopes and injects secrets: the five credential types, credentials() and withCredentials, log masking, and the ways secrets still leak.
  • —Agents and Distributed Builds – Move builds off the Jenkins controller: connect inbound and SSH agents, route work with labels, manage workspaces across machines, and plan agent capacity.
  • —Jenkins Configuration as Code – Define a whole Jenkins controller in Git: JCasC YAML for settings and credentials, Job DSL for jobs, plugins.txt for plugins, and a tested way to rebuild it.

Section 4. Real-World Delivery

  • —Multibranch Pipelines and Webhooks – Let Jenkins discover every branch, tag and pull request on its own, run branch-specific stages with when, and build on push through webhooks instead of polling.
  • —Shared Libraries – Move the deploy logic that every Jenkinsfile copies into one versioned Pipeline library: custom steps, classes, resources, trust, and loading it by tag or branch.
  • —Capstone: A Build, Test, and Deploy Pipeline – A complete Jenkins delivery pipeline run end to end: tests with JUnit reports, a versioned artifact, staging, approval, production, automatic rollback, locks and notifications.