Skip to content
Tutorials Center
My learning

Topics

Lesson 1 of 40 ยท Meet Jenkins

DevOps, the delivery lifecycle and where Jenkins fits

Understand DevOps culture, the eight-phase lifecycle, continuous integration, delivery and deployment, infrastructure as code, DevSecOps and the metrics that show whether delivery improves.

Jenkins is a tool, and tools make sense only inside the problem they solve. The problem is getting software from a developer's laptop to real users quickly, safely and repeatedly. For many years this was split between two groups. Developers wrote code and wanted to ship changes. Operations teams ran the servers and wanted stability. The handoff between them was slow, manual and tense: code was "thrown over the wall", deployments happened at night, and when something broke each side blamed the other.

DevOps is the name for the set of habits, culture and tools that remove that wall. This lesson explains what DevOps means, walks through the delivery lifecycle and its core practices, and shows exactly which parts Jenkins automates. The tools mentioned cannot run on this site; the runnable examples are small JavaScript stand-ins that model the ideas.

What DevOps is (and is not)

DevOps is not a job title, a tool or a department you can buy. It is an approach in which the people who build software and the people who run it share responsibility for the whole path, supported by automation. Its ideas:

  • Shared ownership. "You build it, you run it" (or at least you care how it runs).
  • Automation of repeatable work. Builds, tests, deployments and infrastructure changes are done by scripts, not by hand.
  • Small, frequent changes. A deployment of ten lines is easier to understand and undo than a deployment of ten thousand.
  • Fast feedback. Developers learn within minutes that a change broke something, and operations teams tell developers how the software behaves in production.
  • Measurement and learning. Decisions are based on data, and failures are reviewed without blame.

DevOps is closely linked to Agile (see What Is Agile?): agile makes the planning and building iterative, DevOps makes the delivery and operation iterative.

The lifecycle

Teams often draw the DevOps lifecycle as an infinity loop with eight phases, because the end of one cycle feeds the next:

Plan, code, build, test

Plan Backlog, goals, priorities.
Code Branches and reviews.
Build Compile and package.
Test Automated checks.
1 / 2

Jenkins sits in the middle: it takes the code that was committed and runs the build, test, release and deploy phases automatically. It does not plan work (a tracker such as Jira does) and it does not monitor production (Prometheus, Grafana and similar tools do), although it can call them.

The seven Cs

A popular way to remember the practices is the "seven Cs":

  1. Continuous development: planning and coding in small steps.
  2. Continuous integration: merging often and verifying each merge automatically.
  3. Continuous testing: automated tests at several levels (see the testing levels).
  4. Continuous deployment or delivery: releasing automatically, or at the push of a button.
  5. Continuous monitoring: watching the running system.
  6. Continuous feedback: using users' reactions and metrics to improve.
  7. Continuous operations: updating without downtime.

CI, continuous delivery and continuous deployment

These terms are often mixed up, and What Is Jenkins? introduces them briefly. Here is the precise version:

  • Continuous integration (CI): every change is merged to a shared branch frequently and a build plus tests run automatically. The goal is to find integration problems within minutes.
  • Continuous delivery (CD): every change that passes the pipeline is ready to release, and releasing is a business decision made with one click.
  • Continuous deployment: every change that passes the pipeline is released to production automatically, with no human step.

Most organizations practice CI and continuous delivery; far fewer deploy every passing commit straight to users. The difference is a single approval step, such as an input in a Jenkins pipeline (see Deployment Pipelines and Approvals).

Practices that make it work

Version control for everything. Application code, the Jenkinsfile, deployment scripts and server definitions all live in Git, so every change has an author, a reason and a way back.

Infrastructure as code (IaC). Instead of clicking through a console to create servers, you describe them in files that a tool applies, such as Terraform for provisioning or Ansible for configuration. The files are reviewed, versioned and repeatable, which also makes it possible to create a test environment on demand. Jenkins often runs these tools as pipeline steps.

Containers. A container image packages an app with everything it needs, so "works on my machine" becomes "works in the image". See Docker Agents and Building Images.

Configuration management and immutable deploys. You replace a server or container with a new, known version rather than patching it in place.

Automated testing and quality gates. A pipeline fails when tests fail or coverage drops.

Monitoring and logging. Metrics, centralized logs (the ELK stack is a popular choice) and alerts tell you quickly when a release misbehaves.

DevSecOps. Security checks move left, into the pipeline: dependency scanning, secret detection, static analysis and container image scanning run on every commit instead of once before launch. See Security, Users and Authorization for Jenkins' own security.

Measuring delivery

How do you know the practices help? The research known as DORA found four measures that distinguish high-performing teams:

Metric Question it answers
Deployment frequency How often do we release to production?
Lead time for changes How long from commit to running in production?
Change failure rate What share of releases cause a problem needing a fix?
Time to restore service How long does it take to recover from a failure?

The first two measure speed, the last two stability. A common surprise is that good teams are better on both, because small, automated releases are safer than big manual ones. Jenkins' build history gives you raw data for the first two.

JS DORA-style metrics from a deployment log

Press Run (or Ctrl + Enter) to see the console output here.

No output.

Where Jenkins automates the loop

A pipeline in Jenkins covers the middle of the lifecycle. The stand-in below models a commit moving through the automated phases and records which tool is usually responsible for each phase. The mapping is typical, not mandatory.

JS Which phase of the lifecycle does Jenkins cover?

Press Run (or Ctrl + Enter) to see the console output here.

No output.

How to adopt DevOps without chaos

Adoption works best in steps: build a shared mindset first, assess your current infrastructure, pick measurable goals (for example "cut lead time from days to hours"), choose a small integrated toolset, automate tests before automating deployment, standardize on containers where it fits, and then iterate. Starting with a pipeline that only builds and tests is a perfectly good first milestone. See Pipeline Basics and the Jenkinsfile for that first step.

Check your understanding

Quick check ยท 4 questions

of 4 answered You scored / 4 ยท perfect!

  1. 1. What is the difference between continuous delivery and continuous deployment?

    Continuous delivery leaves the final release as a deliberate step, while continuous deployment automates it as well.
  2. 2. Which DORA metric measures stability rather than speed?

    Change failure rate and time to restore service measure stability; frequency and lead time measure speed.
  3. 3. What does shifting security left mean?

    DevSecOps moves scanning and checks to the early stages instead of leaving them to a final review.
  4. 4. Which lifecycle phases does a Jenkins pipeline typically automate?

    Planning belongs to a tracker and monitoring to observability tools; Jenkins automates the middle of the loop.

Summary

  • DevOps joins development and operations through shared ownership, automation, small changes, fast feedback and measurement.
  • The lifecycle is plan, code, build, test, release, deploy, operate, monitor, and it loops.
  • CI merges and verifies often; continuous delivery keeps changes releasable; continuous deployment releases them automatically.
  • Version control, infrastructure as code, containers, quality gates, monitoring and DevSecOps support the loop.
  • DORA metrics (deployment frequency, lead time, change failure rate, time to restore) show whether delivery improves; Jenkins automates build, test, release and deploy.

Next: What Is Jenkins?.