Jenkins is a self-hosted automation server that runs build, test and deploy pipelines. Modern Jenkins defines those pipelines as code in a Jenkinsfile checked into the repo.
Why teams use it
- Runs anywhere you can host it - full control over agents and network
- Enormous plugin ecosystem for almost any tool or cloud
- Pipelines-as-code keep CI logic versioned next to the app
Install it
docker run -d --name jenkins -p 8080:8080 -p 50000:50000 \
-v jenkins_home:/var/jenkins_home jenkins/jenkins:lts
docker exec jenkins cat /var/jenkins_home/secrets/initialAdminPasswordA first working config
A declarative Jenkinsfile with stages and a post block.
pipeline {
agent any
options { timeout(time: 20, unit: 'MINUTES') }
stages {
stage('Build') { steps { sh 'make build' } }
stage('Test') { steps { sh 'make test' } }
stage('Deploy') {
when { branch 'main' }
steps { sh 'make deploy' }
}
}
post {
failure { echo 'Build failed - notifying team' }
always { junit 'reports/**/*.xml' }
}
}Run and verify
# Trigger and follow a build via the CLI
java -jar jenkins-cli.jar -s http://localhost:8080 build myjob -f -vMistakes to avoid early
- Building on the controller instead of ephemeral agents
- Storing credentials in freeform text instead of the Credentials store
- Snowflake controllers configured by hand and impossible to rebuild
Want senior help putting Jenkins to work - or a team bootcamp on it? CodeWizard runs Israel's largest DevOps community and embeds named senior engineers with a transparent hours log. Book a free consult or explore the Academy.