Stop 06 · CI/CD PipelinesTopics · 2/10

Jenkins Fundamentals

Part of the DevOps Roadmap

In short

Newer tools get the hype, but plenty of banks, telecoms and large IT companies still run their pipelines on Jenkins. If you join one, you'll be reading Jenkinsfiles in week one.

One of the oldest and most widely deployed CI/CD tools — highly customizable via plugins, self-hosted, and still common at larger, established companies despite newer cloud-native alternatives.

The mascot in a small garage tightens a bolt on a classic taxi loaded with add-on parts.

Think of it like this

The old Ambassador taxi

The Ambassador taxi has run for decades. You can bolt on a carrier, new seats, a better horn: almost anything. But you own it, so servicing, spare parts and breakdowns are your job. Jenkins is the same: endlessly customisable with plugins, and fully yours to maintain.

Watch it happen

A push triggers a Jenkins build

Git repo
Controller
Agent

webhook: push main

1/6GitHub or GitLab tells the Jenkins controller that new commits arrived.

The big ideas

What you need to know

Controller and agents

The controller schedules jobs and serves the UI. Agents do the actual builds. Don't run heavy builds on the controller.

Plugins do everything

Git, Docker, Slack and credentials all come through plugins. They're powerful but need regular updates.

Declarative Jenkinsfile

Write pipelines as a Jenkinsfile in the repo, not as clicked-together jobs in the UI.

You run it

Jenkins is self-hosted. Backups, upgrades and security patches are your team's responsibility.

See it in code

Walk through the code

groovy
1pipeline {2  agent { docker { image 'node:22' } }3  stages {4    stage('Install') { steps { sh 'npm ci' } }5    stage('Test')    { steps { sh 'npm test' } }6    stage('Build')   { steps { sh 'npm run build' } }7    stage('Deploy') {8      when { branch 'main' }9      steps { sh './deploy.sh staging' }10    }11  }12  post {13    failure { echo 'Build failed, check the console log' }14  }15}

1/4A declarative pipeline that runs every stage inside a Node 22 container.

The docker agent needs the Docker Pipeline plugin and Docker on the agent. when { branch } works in multibranch pipelines.

Save yourself the pain

Common mistakes

Oops

Building jobs by clicking through the UI, so nobody knows how they're configured.

Do this instead

Keep every pipeline as a Jenkinsfile in Git, reviewed through pull requests like any other code.

Oops

Never updating Jenkins and its plugins because 'it works'.

Do this instead

Schedule regular updates. Old plugins are a common source of security holes on internet-facing Jenkins servers.

Your mission

Run Jenkins locally

~40 min

Quick check

Why should builds run on Jenkins agents instead of the controller?

Go deeper

  1. 1Set up a local or free-tier Jenkins instance and create a simple build job.
  2. 2Learn the difference between a freestyle job and a Jenkinsfile-based pipeline.
  3. 3Understand why Jenkins' plugin ecosystem is both its biggest strength and a maintenance burden.

More topics at this stop

Stuck on this topic? Ask an Insider

Get 1:1 guidance from people who've walked this exact path — on the InsideEdge app.

Download
InsideEdge