Skip to content
IT glossary
DevOps and cloudUpdated December 3, 2026

Jenkins

An open-source automation server that runs repeatable software tasks such as building an application, testing changes, and deploying a release.

What Jenkins does

Imagine a team wants every pull request tested before it can be merged. Instead of asking someone to run the tests and report the result, the team configures Jenkins to do it automatically. Jenkins runs the project's existing tools and records what happened. It doesn't compile Java or deploy containers on its own; it coordinates the tools that do. Jenkins is one way to implement CI/CD, not another name for it.

How a run gets from Git to an agent

A Git hosting service can send a webhook to Jenkins when code changes. Jobs can also run on a schedule or be started manually. The Jenkins controller manages the queue and tracks run history. Build commands typically run on agents: machines or temporary containers equipped with the software the job needs. A label lets a pipeline request an agent with a particular capability, such as a Linux environment with a JDK.

Teams commonly put the pipeline in a Jenkinsfile in the source repository. That lets them review a change to the build process alongside the code that needs it. In a declarative pipeline, a stage groups related work, and steps are the individual actions inside it. Plugins extend Jenkins with capabilities such as Git integration and Kubernetes-based agents.

Example: test and package a Java project

pipeline {
  agent { label 'linux' }
  stages {
    stage('Test') {
      steps { sh './gradlew test' }
    }
    stage('Package') {
      steps {
        sh './gradlew assemble'
        archiveArtifacts artifacts: 'build/libs/*.jar'
      }
    }
  }
}

This assumes Jenkins loads the pipeline from the project's repository, the project includes the Gradle Wrapper, and the selected Linux agent has a JDK. A nonzero exit from the test command fails the run before packaging. On success, Jenkins archives the JAR so it can be retrieved later. An archived JAR is a build artifact, not a deployment: no application environment has changed yet.

Where teams use it and what can go wrong

A team might verify pull requests, publish a versioned package after merge, then deploy that package to staging. If it passes validation, the team can promote the same package to production rather than build it again. The point is to ship what was actually tested. Keep secrets out of the Jenkinsfile, and don't give jobs that run untrusted pull request code access to deployment credentials. A team running its own Jenkins also needs to maintain the controller and its plugins.

What comes up in interviews

A common troubleshooting prompt is: “The job is queued even though an agent is online. What do you check?” An online agent may not match the job's label, or all its execution slots may be occupied. If a job has already started and failed, use the console log to identify the first failing step. A compiler error, a missing tool on the agent, and an unavailable package registry call for different fixes.