Jenkins
- Pronunciation
- JENG-kinz
In short
Jenkins is an open-source automation server that builds, tests and deploys software through pipelines, and one of the oldest and most widely used CI/CD tools.
What is Jenkins?
Jenkins grew out of Hudson, a build server created by Kohsuke Kawaguchi at Sun Microsystems, and took its current name in 2011 after a dispute over the project's direction. It runs on your own servers, watches source repositories, and runs jobs whenever code changes, on a schedule or when someone presses a button.
Modern Jenkins jobs are pipelines defined in a Jenkinsfile stored in the repository, written in a Groovy-based syntax with stages such as build, test and deploy. A controller schedules the work and agents, which can be machines, containers or Kubernetes pods, run the steps, so many builds can run in parallel.
Its strength is flexibility: plugins integrate it with almost any version control system, build tool, test framework, cloud and chat app, and it can automate tasks far beyond CI. That flexibility comes at a cost, because teams must host, secure, upgrade and back up Jenkins themselves and keep its plugins compatible.
A common misconception is that Jenkins is the only serious CI/CD option. Hosted services such as GitHub Actions, GitLab CI and CircleCI need no servers and keep pipeline files next to the code, so many new projects choose them. Jenkins remains common in large companies with existing setups or special on-premises requirements.
Key takeaways
- Jenkins is a self-hosted, open-source automation server for CI/CD.
- It forked from Hudson and took its name in 2011.
- Pipelines are defined in a Jenkinsfile with build, test and deploy stages.
- A controller schedules jobs and agents run them, often in parallel.
- Plugins make it flexible, but teams must maintain and secure it.
Example
pipeline {
agent { docker { image 'node:22' } }
stages {
stage('Install') {
steps { sh 'npm ci' }
}
stage('Test') {
steps { sh 'npm test' }
}
stage('Deploy') {
when { branch 'main' }
steps { sh './deploy.sh production' }
}
}
post {
failure { echo 'Build failed: notify the team' }
}
}Readers ask
What is the difference between Jenkins and GitHub Actions?
Jenkins is a server you install and maintain, configured through Jenkinsfiles and plugins. GitHub Actions is a hosted service built into GitHub, with workflows in YAML and runners provided for you. Jenkins offers more control; Actions offers less maintenance.
What is a Jenkinsfile?
A text file in the repository that defines a Jenkins pipeline as code, with its stages and steps. Keeping it with the code means the pipeline is reviewed and versioned like everything else.
Is Jenkins free?
Yes. Jenkins is open source under the MIT license. The costs are the servers it runs on and the time spent operating it.
See also
- CI/CDDevOps & Cloud, p. 9CI/CD is a set of automated practices that build, test, and release code changes frequently, so software can be delivered to users quickly and safely.
- GitHub ActionsDevOps & Cloud, p. 22GitHub Actions is GitHub's built-in automation platform: YAML workflows in a repo run tests, builds and deployments on events like a push or pull request.
- DevOpsDevOps & Cloud, p. 14DevOps is a set of practices and a culture that brings software development and IT operations together to deliver software faster and more reliably.
- DockerDevOps & Cloud, p. 17Docker is an open-source platform for packaging an application and everything it needs into a container that runs the same way on any machine.
- KubernetesDevOps & Cloud, p. 32Kubernetes is an open-source system that automates deploying, scaling, and managing containerized applications across a cluster of machines.
- Test AutomationTesting & Quality, p. 28Test automation is using code to run tests and check their results, so the same checks repeat quickly and consistently on every change instead of by hand.
Spotted a mistake or something missing on this page?Suggest an edit