What Jenkins Is and How It Works
What Jenkins does, how its controller, agents, executors, jobs, builds and plugins fit together, and how freestyle and Pipeline jobs differ, with real build logs.
By The Dark DebuggerUpdated 21 min read
This is the first article in the Jenkins path. It explains what Jenkins is for, names every moving part you will meet (controller, agents, executors, jobs, builds, workspaces, plugins), and shows the two job styles and the two Pipeline syntaxes side by side, using build logs from a real controller. You only need to be comfortable on the command line and know what a git commit is; if the shell is new to you, start with Introduction to Bash. Installing your own controller is the next article.
Why CI/CD exists: a before and after
Picture a small team that maintains logstats, a Python tool that summarises nginx access logs. Their release process lives on a wiki page:
- Pull the latest
mainon your laptop. - Run the tests (unless it is Friday afternoon and "it's a one-line change").
- Build a tarball, copy it to the staging server with
scp, unpack it. - If staging looks fine, repeat for production.
Every step depends on someone's laptop and someone's memory. The tests run on whatever Python that laptop has. Nobody can say which commit is in production without logging in and looking. When a release breaks, the only record of what happened is a chat thread.
Continuous integration (CI) fixes the first half: every change pushed to the repository is checked out on a clean machine, built and tested automatically, and the result is recorded. Continuous delivery (CD) fixes the second half: the same automation packages the result and deploys it, usually to staging automatically and to production after a human approves. (Continuous deployment goes one step further and deploys to production with no approval at all.)
Jenkins is a server that does exactly this. Here is the "after" picture: the console log of a real build of the logstats project on the Jenkins 2.580.2 controller I used for this series. Nobody typed a test command; Jenkins read the steps from a file in the repository.
Started logstats #1
Started from command line by admin
Obtained Jenkinsfile from git file:///home/sid/logstats
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /home/sid/.jenkins/workspace/logstats
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Declarative: Checkout SCM)
[Pipeline] checkout
[…]
Checking out Revision fcc25fd24122d756fbddfdaaef4cd887768bcf9d (refs/remotes/origin/main)
[…]
Commit message: "Add a 503 to the sample log"
[…]
[Pipeline] { (Build)
[Pipeline] sh
+ python3 -m py_compile logstats.py
[Pipeline] sh
+ mkdir -p dist
+ tar czf dist/logstats-1.tar.gz logstats.py
[…]
[Pipeline] { (Test)
[Pipeline] sh
+ python3 tests/junit_runner.py reports/junit.xml
test_parses_a_combined_log_line (test_logstats.ParseTests.test_parses_a_combined_log_line) ... ok
test_returns_none_for_garbage (test_logstats.ParseTests.test_returns_none_for_garbage) ... ok
test_counts_status_classes (test_logstats.SummariseTests.test_counts_status_classes) ... ok
test_empty_input (test_logstats.SummariseTests.test_empty_input) ... ok
test_error_rate_is_a_percentage (test_logstats.SummariseTests.test_error_rate_is_a_percentage) ... ok
----------------------------------------------------------------------
Ran 5 tests in 0.001s
OK
[…]
[Pipeline] { (Report)
[Pipeline] sh
+ python3 logstats.py sample/access.log
+ tee report.txt
requests: 11 unparsed: 1
by class: 2xx=6 3xx=1 4xx=1 5xx=3
5xx rate: 27.3%
4 /api/orders
3 /api/checkout
1 /api/orders/1042
[…]
[Pipeline] { (Declarative: Post Actions)
[Pipeline] junit
Recording test results
[Checks API] No suitable checks publisher found.
[Pipeline] archiveArtifacts
Archiving artifacts
Recording fingerprints
[…]
Finished: SUCCESSEverything the wiki page asked a person to do is in there: the exact commit that was built, the tests and their results, the package (logstats-1.tar.gz, archived and fingerprinted so it can be traced later), and a final verdict. It is also permanent: build #1 of this job will show this log until someone deletes it. We will build this exact pipeline step by step in Your First Pipeline.
About the port in the logs
The lab controller behind these articles listens on port 8090 instead of the default 8080. That detail doesn't matter for anything you learn here.
The controller, agents and executors
A Jenkins installation is one controller plus zero or more agents.
- The controller is the Jenkins server process: the web UI, the REST API, the scheduler and queue, the configuration, and the record of every build. It is a Java web application (
jenkins.war). - An agent is a machine (or container) that the controller sends work to. It runs a small Java process that connects to the controller and executes build steps there.
- An executor is one build slot on a node. A node with 2 executors can run 2 builds at once. When all executors are busy, new builds wait in the queue.
- The built-in node is the controller acting as its own agent. It exists on every installation.
You can ask any controller what nodes and executors it has through the REST API. Every page in Jenkins has an /api/json twin, and tree= picks the fields you want:
curl -g -sS -u "admin:$JENKINS_API_TOKEN" "http://localhost:8090/computer/api/json?tree=computer[displayName,numExecutors,offline]" | jq .{
"_class": "hudson.model.ComputerSet",
"computer": [
{
"_class": "hudson.model.Hudson$MasterComputer",
"displayName": "Built-In Node",
"numExecutors": 2,
"offline": false
}
]
}The lab controller has no agents, only the built-in node with 2 executors, which keeps the examples simple. On a real installation, don't run builds on the controller. A build runs as the same operating-system user as Jenkins itself, so any build script can read JENKINS_HOME, including the files that decrypt every stored credential. The usual setup is to set the built-in node's Number of executors to 0 (Manage Jenkins → Nodes → Built-In Node → Configure) and do all work on agents. That is the subject of Agents and Distributed Builds.
Jobs, builds and workspaces
A job (Jenkins also calls it an item or project) is a named, configured piece of work: "test and package logstats", "rotate the staging database password", "run the nightly report". A build is one execution of a job, numbered from 1. Each build gets its own console log, result and timestamps.
Here is the smallest useful job, a freestyle job with one shell step, run from the command line. (jcli is a shell function that runs the Jenkins CLI; the installation article sets it up.)
jcli build hello-freestyle -s -vStarted hello-freestyle #1
Started from command line by admin
Running as SYSTEM
Building in workspace /home/sid/.jenkins/workspace/hello-freestyle
[hello-freestyle] $ /bin/sh -xe /tmp/jenkins5975289855519858437.sh
+ echo Job hello-freestyle, build #1, on node built-in
Job hello-freestyle, build #1, on node built-in
+ whoami
+ echo Running as sid in /home/sid/.jenkins/workspace/hello-freestyle
Running as sid in /home/sid/.jenkins/workspace/hello-freestyle
+ python3 --version
Python 3.12.3
+ date -u +Finished at %H:%M:%S UTC
Finished at 02:42:31 UTC
Finished: SUCCESS
Completed hello-freestyle #1 : SUCCESSThree things in that log are worth knowing from day one:
Running as SYSTEMis Jenkins' internal identity for the build, not the Unix user.whoamishows the shell step really ran assid, the user that started the Jenkins process.- The workspace is the directory a build works in:
$JENKINS_HOME/workspace/<job name>on the built-in node. It is reused by the next build of the same job, which is convenient and also the source of one of the most common Jenkins bugs (stale files from a previous build; the freestyle article shows it happening). - The shell step ran with
/bin/sh -xe:-xechoes each command with a+,-estops at the first failing command. On Ubuntu/bin/shis dash, not Bash.
The job's configuration and its build history live under $JENKINS_HOME/jobs/, as plain files:
ls -l ~/.jenkins/jobs/hello-freestyle
ls -l ~/.jenkins/jobs/hello-freestyle/builds/1total 12
drwxr-xr-x 3 sid sid 4096 Nov 9 21:42 builds
-rw-r--r-- 1 sid sid 806 Nov 9 21:42 config.xml
-rw-r--r-- 1 sid sid 2 Nov 9 21:42 nextBuildNumber
total 12
-rw-r--r-- 1 sid sid 1187 Nov 9 21:42 build.xml
-rw-r--r-- 1 sid sid 6 Nov 9 21:42 changelog.xml
-rw-r--r-- 1 sid sid 893 Nov 9 21:42 logconfig.xml is the job definition (every field you set in the UI ends up here), nextBuildNumber is a counter, and each build directory holds the result (build.xml), the source changes it built (changelog.xml) and the console output (log). Notice the split: the workspace is scratch space that can be wiped at any time, while jobs/ is history you back up.
| Term | What it is | Where you see it |
|---|---|---|
| Controller | The Jenkins server process | The web UI, http://host:8080/ |
| Agent / node | A machine that runs build steps | Manage Jenkins → Nodes |
| Executor | One concurrent build slot on a node | numExecutors in the API; the "Build Executor Status" panel |
| Job / item | A named, configured piece of work | $JENKINS_HOME/jobs/<name>/config.xml |
| Build | One run of a job, numbered | jobs/<name>/builds/<n>/ |
| Workspace | Working directory for a build | $JENKINS_HOME/workspace/<name> |
| Plugin | An add-on that provides features | Manage Jenkins → Plugins |
Plugins: where most features come from
Jenkins core is small. Git support, Pipeline, test-report parsing, credentials binding, timestamps in logs: all plugins. The lab controller has 99 installed, and the ones this series leans on most look like this:
jcli list-plugins | sort | grep -E '^(workflow-aggregator|git |junit|pipeline-model-definition|timestamper)'git Git plugin 5.11.0
junit JUnit Plugin 1458.v38661c0638e2
pipeline-model-definition Pipeline: Declarative 2.2293.v6e7193cec599
timestamper Timestamper 1.30
workflow-aggregator Pipeline 608.v67378e9d3db_1The plugin model is Jenkins' biggest strength and its biggest chore. You can make Jenkins do almost anything, but every plugin is code running inside your controller with full access, which you have to keep updated and compatible with the core version. My rule: install a plugin when it saves real work, and remove the ones nobody uses. The installation article shows how to install plugins from a list so the set is reproducible.
Freestyle jobs and Pipeline jobs
Jenkins has two everyday job types.
A freestyle job is configured entirely in the web UI: pick a source repository, add build steps ("Execute shell"), add post-build actions ("Archive the artifacts", "Publish JUnit test result report"). It is quick to set up, and the configuration lives only inside Jenkins.
A Pipeline job runs a script written in the Pipeline DSL (a Groovy-based language), usually stored in the repository as a file named Jenkinsfile. The build is split into named stages, the script is versioned and code-reviewed with the application, and it can express things freestyle jobs struggle with: parallel branches, approvals, retries, and stages that run on different agents.
| Freestyle job | Pipeline job | |
|---|---|---|
| Defined in | Web UI (stored as config.xml) | Jenkinsfile (Groovy DSL), in the job or in the repo |
| Versioned with the code | No | Yes, with Pipeline script from SCM |
| Structure | Build steps, then post-build actions | Stages and steps, post conditions |
| Parallelism, approvals, retries | Plugins and workarounds | Built in (parallel, input, retry) |
| Survives a controller restart mid-build | No | Yes, Pipeline builds can resume |
| Good for | Small one-off tasks, learning | Anything you build and ship regularly |
We will build both, with the same logstats project, in Freestyle Jobs, Parameters, and Triggers and Your First Pipeline.
Declarative and scripted Pipeline
Pipeline comes in two syntaxes. Declarative is a structured format with fixed sections (pipeline, agent, stages, post). Scripted is plain Groovy with Pipeline steps as function calls. Here is the same two-stage pipeline in each.
pipeline {
agent any
stages {
stage('Build') {
steps {
sh 'python3 --version'
echo "Build ${env.BUILD_NUMBER} running on ${env.NODE_NAME}"
}
}
stage('Test') {
steps {
sh 'python3 -c "assert 2 + 2 == 4" && echo "smoke test passed"'
}
}
}
post {
always {
echo "Result: ${currentBuild.currentResult}"
}
}
}node {
try {
stage('Build') {
sh 'python3 --version'
echo "Build ${env.BUILD_NUMBER} running on ${env.NODE_NAME}"
}
stage('Test') {
sh 'python3 -c "assert 2 + 2 == 4" && echo "smoke test passed"'
}
} finally {
echo "Result: ${currentBuild.currentResult}"
}
}They produce nearly identical logs. The declarative one, trimmed:
Started hello-declarative #1
Started from command line by admin
[Pipeline] Start of Pipeline
[Pipeline] node
Running on Jenkins in /home/sid/.jenkins/workspace/hello-declarative
[Pipeline] {
[Pipeline] stage
[Pipeline] { (Build)
[Pipeline] sh
+ python3 --version
Python 3.12.3
[Pipeline] echo
Build 1 running on built-in
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Test)
[Pipeline] sh
+ python3 -c assert 2 + 2 == 4
+ echo smoke test passed
smoke test passed
[Pipeline] }
[Pipeline] // stage
[Pipeline] stage
[Pipeline] { (Declarative: Post Actions)
[Pipeline] echo
Result: SUCCESS
[…]
Finished: SUCCESSThe scripted run prints the same lines, except that the final echo happens inside the finally block rather than in a separate Declarative: Post Actions stage. The [Pipeline] lines are Jenkins narrating each step it starts and ends; you learn to read past them quickly.
So which should you use? Declarative, almost always. It is easier to read, the post section replaces hand-written try/finally, and Jenkins checks the structure before running anything. If you forget the agent line, nothing runs at all:
Started noagent #1
Started from command line by admin
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
WorkflowScript: 1: Missing required section "agent" @ line 1, column 1.
pipeline {
^
1 error
[…]
Finished: FAILUREDon't overestimate that check, though. When I misspelled echo as ech in the Test stage, the declarative and the scripted versions behaved identically: the Build stage ran, and the build failed only when it reached the typo.
[Pipeline] { (Test)
[Pipeline] }
[Pipeline] // stage
[…]
java.lang.NoSuchMethodError: No such DSL method 'ech' found among steps [archive, bat, build, catchError, checkout, […]
Finished: FAILUREDeclarative validates its own sections, not every step name you type. Scripted Pipeline is still worth recognising because you will meet it in older Jenkinsfiles and in script { } blocks inside declarative ones. Declarative Pipeline in Depth covers when that escape hatch is justified.
Where Jenkins fits next to GitHub Actions and GitLab CI
If your code is on GitHub or GitLab, you already have a CI system built in. It is fair to ask why anyone runs Jenkins in 2026. Here is my honest comparison:
| Jenkins | GitHub Actions | GitLab CI/CD | |
|---|---|---|---|
| Who runs the server | You | GitHub (self-hosted runners optional) | GitLab.com or your own GitLab |
| Pipeline definition | Jenkinsfile (Groovy DSL) | YAML in .github/workflows/ | .gitlab-ci.yml |
| Works with any git host | Yes | Built around GitHub | Built around GitLab |
| Extensibility | Plugins inside the controller | Marketplace actions run in the job | Templates, components, includes |
| Maintenance burden | High: upgrades, plugins, backups, security | Low for hosted runners | Low on GitLab.com, moderate self-managed |
| Approvals, parameters, manual steps | Built in (input, parameters) | Environments with required reviewers | Manual jobs, protected environments |
Jenkins makes sense when you need to run builds somewhere the SaaS runners can't reach (on-premises networks, air-gapped environments, hardware test labs), when you use several source hosts, when you have existing jobs and plugins that encode years of process, or when you want full control over where every byte of your build runs. It costs you real operational work: you own the upgrades, the plugin compatibility, the backups and the security of a server that holds deployment credentials.
If you are a small team with all your code on GitHub and nothing special about where builds run, GitHub Actions is the lower-effort choice, and I wouldn't argue you out of it. The concepts in this series (stages, agents, artifacts, approvals, credentials) carry over directly.
What this path covers
| # | Article | What you will be able to do |
|---|---|---|
| 1 | What Jenkins Is and How It Works | Name the parts and read a build log (this article) |
| 2 | Installing Jenkins | Run Jenkins from the WAR, Docker or packages; secure it; back it up |
| 3 | Freestyle Jobs, Parameters, and Triggers | Build from git, parameterise, schedule and chain jobs |
| 4 | Your First Pipeline | Write a Jenkinsfile, record tests and artifacts, use Replay and the linter |
| 5 | Declarative Pipeline in Depth | Use options, when, parallel, matrix, post, input |
| 6 | Credentials and Secrets | Store and use secrets without leaking them |
| 7 | Agents and Distributed Builds | Move builds off the controller |
| 8 | Jenkins Configuration as Code | Rebuild a controller from YAML |
| 9 | Multibranch Pipelines and Webhooks | Build every branch and pull request automatically |
| 10 | Shared Libraries | Reuse pipeline code across repositories |
| 11 | Capstone: A Build, Test, and Deploy Pipeline | Put it all together |
Where you'll use this
Most Jenkins installations run a mix of these:
- Pull request and branch builds. Every push runs the tests, and the result shows up on the pull request. This is the classic CI use and the reason most teams install a CI server.
- Release pipelines. Build once, test, archive a versioned artifact, deploy to staging, pause for an approval, deploy to production.
- Scheduled operations. Nightly reports, certificate expiry checks, log cleanups, database backups. These are cron jobs with logging, history, notifications and a "run it now" button.
- Infrastructure changes.
terraform planon every change andterraform applybehind an approval; the Terraform path explains why that gate matters.
Here is what a complete release pipeline for logstats looks like in the Stage View once it is built, taken from a real run in Declarative Pipeline in Depth. Each row is a stage, with its result and duration:
curl -sS -u "admin:$JENKINS_API_TOKEN" http://localhost:8090/job/logstats-release/4/wfapi/describe \
| jq -r '.stages[] | "\(.name)\t\(.status)\t\(.durationMillis) ms"'Build and test SUCCESS 296 ms
Build SUCCESS 1223 ms
Checks SUCCESS 257 ms
Unit tests SUCCESS 539 ms
Sample report SUCCESS 680 ms
Deploy to staging SUCCESS 768 ms
Deploy to production SUCCESS 1372 ms
Declarative: Post Actions SUCCESS 246 msEvery concept from this article shows up in that table. A controller scheduled the build, an executor ran it in a workspace, plugins provided the test report and stage view, and a declarative Pipeline defined the stages, including a production stage that waited for a person to click Deploy.
Common mistakes
Querying the API with tree= and getting "bad range in URL". The square brackets in tree=computer[...] are glob syntax to curl:
curl -sS -u "admin:$JENKINS_API_TOKEN" "http://localhost:8090/computer/api/json?tree=computer[displayName,numExecutors,idle,offline]"curl: (3) bad range in URL position 55:
http://localhost:8090/computer/api/json?tree=computer[displayName,numExecutors,idle,offline]
^Add -g (--globoff) so curl passes the brackets through untouched, as in the examples above.
Calling the CLI without credentials. A secured controller treats you as anonymous, which may not even read:
java -jar ~/jenkins-cli.jar list-jobs
ERROR: anonymous is missing the Overall/Read permissionThe exit code was 6. Set JENKINS_USER_ID and JENKINS_API_TOKEN (or pass -auth user:token), as shown in the installation article.
Leaving out a required declarative section. A pipeline block without agent fails before any stage runs, with Missing required section "agent" (the full output is in the declarative section above). Read the WorkflowScript: <line>: part of the message: it points at the exact line. The declarative linter catches this before you even commit.
Summary
- Jenkins automates CI (build and test every change on a clean machine) and CD (package and deploy, often with an approval before production).
- The controller schedules and records builds; agents run them; each executor is one concurrent build slot. Keep builds off the controller in production.
- A job is a configured piece of work and a build is one numbered run of it. Configuration and history live under
$JENKINS_HOME/jobs/; the workspace is reusable scratch space. - Almost every feature is a plugin, so every plugin is something to keep updated.
- Freestyle jobs are configured in the UI; Pipeline jobs run a
Jenkinsfilethat lives with the code. Prefer Pipeline for anything you ship. - Prefer declarative Pipeline. It checks its structure before running, but a misspelled step name still fails only when the build reaches it.
- Every page has an
/api/jsontwin. Usecurl -gwhen the URL containstree=...[...].
Exercises
Using only curl and jq, print each node's display name and number of executors on your controller, one node per line.
Hint
Start from computer/api/json?tree=computer[displayName,numExecutors] and remember -g.
Show Solution
curl -g -sS -u "admin:$JENKINS_API_TOKEN" "http://localhost:8090/computer/api/json?tree=computer[displayName,numExecutors,offline]" | jq .{
"_class": "hudson.model.ComputerSet",
"computer": [
{
"_class": "hudson.model.Hudson$MasterComputer",
"displayName": "Built-In Node",
"numExecutors": 2,
"offline": false
}
]
}To get one line per node, change the jq filter to jq -r '.computer[] | "\(.displayName): \(.numExecutors)"'. A controller with agents lists one entry per agent as well.
Create a freestyle job whose only build step is echo "This is $JOB_NAME build $BUILD_NUMBER". Build it twice, then read the console log of build 2 directly from $JENKINS_HOME without using the web UI or the API.
Show Solution
After two builds, the job directory has one folder per build:
ls ~/.jenkins/jobs/ex-hello/builds
cat ~/.jenkins/jobs/ex-hello/builds/2/log1
2
permalinks
Started from command line by [8mha:////4J23/Twi5fUXvrOD9gS3ZVzYR5nseNS4QHA/V+gbfYTxAAAAlx+LCAAAAAAAAP9b85aBtbiIQTGjNKU4P08vOT+vOD8nVc83PyU1x6OyILUoJzMv2y+/JJUBAhiZGBgqihhk0NSjKDWzXb3RdlLBUSYGJk8GtpzUvPSSDB8G5tKinBIGIZ+sxLJE/ZzEvHT94JKizLx0a6BxUmjGOUNodHsLgAzWEgZu/dLi1CL9xJTczDwAj6GcLcAAAAA=[0madmin
Running as SYSTEM
Building in workspace /home/sid/.jenkins/workspace/ex-hello
[ex-hello] $ /bin/sh -xe /tmp/jenkins11992774692877357126.sh
+ echo This is ex-hello build 2
This is ex-hello build 2
Finished: SUCCESSThe odd first line is a serialized console note: Jenkins embeds markup (here, the link to the user admin) in the raw log. The web UI renders it, and the plain-text view at /job/<name>/2/consoleText strips it. That is why scripts should read logs through consoleText or jcli console rather than the file.
Rewrite this declarative Pipeline in scripted syntax, keeping the behaviour of the post { failure { ... } } block: the message must print only when the stage fails, and the build must still be marked as failed.
pipeline {
agent any
stages {
stage('Report') {
steps {
sh 'df -h / | tail -1'
}
}
}
post {
failure {
echo 'Disk report failed'
}
}
}Hint
post { failure } becomes a catch block. If you catch an exception and don't rethrow it, Jenkins thinks the build succeeded.
Show Solution
node {
try {
stage('Report') {
sh 'df -h / | tail -1'
}
} catch (err) {
echo 'Disk report failed'
throw err
}
}Both versions produced the same stage output when I ran them:
[Pipeline] { (Report)
[Pipeline] sh
+ df -h /
+ tail -1
/dev/sdd 1007G 4.2G 952G 1% /
[Pipeline] }The throw err is the important part: without it the failure is swallowed and the build ends green. This is exactly the bookkeeping that declarative post does for you.
Without opening the UI, find the number and URL of the most recent failed build of a job (the lab used typo-scripted, the job with the ech typo).
Hint
Jobs have permalinks such as lastBuild, lastSuccessfulBuild and lastFailedBuild, and each one has its own /api/json.
Show Solution
curl -g -sS -u "admin:$JENKINS_API_TOKEN" "http://localhost:8090/job/typo-scripted/lastFailedBuild/api/json?tree=number,result,url" | jq .{
"_class": "org.jenkinsci.plugins.workflow.job.WorkflowRun",
"number": 1,
"result": "FAILURE",
"url": "http://localhost:8090/job/typo-scripted/1/"
}Permalinks are how monitoring scripts and dashboards ask "is the last build of X green?" without parsing HTML.
Tested with: Jenkins 2.580.2 (LTS) on OpenJDK 21.0.13 (Temurin), Ubuntu 24.04 (WSL2), November 2026. Every job, log and API response above came from that controller. Jobs were created with the Jenkins CLI from config.xml files rather than by clicking through the web UI; the menu paths named in the text were checked against the same version's pages over HTTP. Long logs are trimmed where marked with […]. The comparison with GitHub Actions and GitLab CI reflects their documented features, not a hands-on benchmark. The echo/ech experiment surprised me: I expected declarative validation to reject the unknown step before the Build stage ran, and it didn't. Paths from the test machine's scratch directories are shown shortened to /home/sid/…. Job, node and credential names are shown without the test run's prefixes.
Written by The Dark Debugger
Engineer documenting the things that took me too long to learn, so they take you less time. Every Jenkins tutorial here is tested end to end before publishing.