openskills.info
Jenkins Fundamentals logo

Jenkins Fundamentals

itDevOps and software delivery

Jenkins Fundamentals

Jenkins is an open-source automation server. Teams commonly use it to turn changes in source control into repeatable build, test, packaging, and delivery work. Its important idea is broader than CI/CD: Jenkins coordinates tools. Compilers, test runners, scanners, artifact repositories, deployment systems, and scripts still do their own jobs; Jenkins decides when and where they run, records the result, and exposes the execution history.

That distinction prevents a common category error. Jenkins is not your build system, package manager, or deployment platform. It is the automation control plane connecting those systems.

The mental model

A Jenkins installation has a controller that stores configuration, schedules work, presents the web interface, and coordinates execution. Work should run on agents connected to the controller. An agent provides one or more executors, which represent concurrent work slots. Labels describe agent capabilities so a Pipeline can request an appropriate environment—for example Linux, Windows, a particular architecture, or access to specialized tooling.

The work itself is normally described as a Pipeline. A Jenkinsfile kept with the application source defines that Pipeline as code. It can express stages such as build, test, package, and deploy; each stage contains steps. Jenkins supports Declarative and Scripted Pipeline syntax. Declarative Pipeline supplies a more structured model and validation; Scripted Pipeline exposes a flexible Groovy-based execution model. Fundamentals work should usually begin with Declarative Pipeline and use Scripted features only when their flexibility is justified.

A minimal Declarative Pipeline looks like this:

pipeline {
  agent any

  stages {
    stage('Build') {
      steps {
        sh './build.sh'
      }
    }
    stage('Test') {
      steps {
        sh './test.sh'
      }
    }
  }
}

This example is intentionally small. A production Pipeline also needs decisions about timeouts, retries, artifact retention, credentials, concurrency, failure notifications, and deployment authorization.

Why teams use Jenkins

Jenkins fits environments that need a highly extensible automation server, must integrate a diverse toolchain, or require control over where automation runs. Its plugin ecosystem connects Jenkins to source-control systems, build tools, credentials providers, user directories, cloud agents, and many other systems. Distributed agents let one controller coordinate heterogeneous execution environments.

The same flexibility creates operational responsibility. Plugins are executable software and need deliberate selection, updates, compatibility testing, and removal when unused. The controller holds valuable configuration and build metadata, so access control, credentials handling, upgrades, backups, and recovery testing are part of operating Jenkins—not optional polish.

A useful first journey

  1. Install a disposable Jenkins controller for learning, following the official guided tour.
  2. Create a Pipeline whose Jenkinsfile lives in source control.
  3. Separate the Pipeline into meaningful stages and make failures visible.
  4. Add an agent and use a label to control placement.
  5. Add one credential through Jenkins and consume it through a credentials-aware Pipeline step rather than embedding it in source.
  6. Learn plugin and controller lifecycle management before treating the installation as production infrastructure.

Where Jenkins is not automatically the answer

Jenkins is a poor default when nobody will own the service, plugin lifecycle, security posture, backups, and agent fleet. It can also be excessive for a small repository already well served by a managed, repository-native automation service. Choose Jenkins because its extensibility, deployment control, or heterogeneous execution model solves a real constraint—not merely because it can execute shell commands.

Relevant careers