---
title: Jenkins
description: Monitoring of Jenkins jobs and builds in Pipedash on a self-hosted server, with parameter discovery for triggers, build cancel and console logs.
---

The Jenkins plugin (`jenkins`) monitors selected jobs or every supported job on a Jenkins server. It reads the last build of each job, loads build history, starts builds with the job's parameters and stops running builds. It also shows build console logs inside Pipedash.

## Requirements

The plugin authenticates with the Jenkins username and an API token instead of the account password. Pipedash sends both as HTTP Basic credentials. Jenkins has no optional scopes.

Jenkins answers a rejected username or token with HTTP 401. Pipedash reports it as an authentication error and does not retry the request. HTTP 403 shows as permission denied.

## Configuration

<Screenshot src="provider-jenkins" variant="dialog" alt="Add provider dialog with Jenkins credential fields" caption="Jenkins asks for the server URL, the username and an API token." />

| Key | Type | Required | Default | Description |
|---|---|---|---|---|
| `server_url` | Text | Yes | None | The Jenkins server URL, for example `https://jenkins.example.com`. |
| `username` | Text | Yes | None | The Jenkins username. |
| `token` | Password | Yes | None | Jenkins API token instead of the account password. |
| `follow_all_jobs` | Boolean | No | `false` | The "Follow all jobs" switch. Monitors every supported job the account can read. Turning it off restores manual selection. |
| `status_page_url` | Text | No | None | `https` address of a Statuspage site for this instance. Pipedash reads `/api/v2/summary.json` from it. |

The config table of the TOML file also takes `selected_items`, a comma-separated list of job paths. A job inside a folder uses a slash, for example `team/service-build`. A branch of a multibranch project uses the project and branch name, for example `app/main`.

Use the job name Jenkins returns for a multibranch branch. Keep an encoded slash inside that name, for example `app/feature%2Fnext`. A literal slash separates job-path segments.

The status page feeds the provider health alerts. See [provider health](/docs/features/provider-health). A `status_page_url` that is not an `https` URL without credentials, query or fragment fails the provider setup. Plain `http` works only for `127.0.0.1` and `[::1]`.

## Base URL

Jenkins has no default host, so `server_url` is required. Pipedash uses it as given and adds no API prefix. A trailing slash is ignored.

## Pipeline discovery

Discovery walks the server from the root. It opens folders and multibranch projects and lists pipeline jobs and freestyle jobs. Other item types are skipped. Discovery walks the job tree again on each request. Large servers can take longer to list.

A multibranch project itself does not appear in the picker. Each of its branch jobs appears as `project/branch`.

Jenkins has no organizations, so the picker shows one placeholder named Jenkins Server. The organization column shows the first path segment of each job and the repository column shows the rest. A job at the root has the organization `(root)`. Search matches name, ID and description.

With `follow_all_jobs` off, Pipedash shows the last build of each job in `selected_items`. A missing key reports `No jobs selected`. An empty selection reports `No jobs configured`.

A job that fails with a non-transient error, for example a missing job, is skipped and the rest still appear. If every job fails, Pipedash reports the first error. A network error, a rate limit or an HTTP `5xx` response fails the whole refresh.

### Follow all jobs

<Screenshot src="provider-jenkins-follow-all-jobs" variant="dialog" alt="Jenkins provider step with Advanced settings open and Follow all jobs turned on" caption="Follow all jobs sits under Advanced settings. It discovers supported jobs on each refresh and keeps the saved manual selection." />

"Follow all jobs" is off by default. Turning it on monitors every supported job the account can read. Pipedash ignores `selected_items` while the switch is on.

Each refresh discovers jobs from the server root. It opens folders and multibranch projects and reads pipeline jobs (`WorkflowJob`) and freestyle jobs (`FreeStyleProject`). New jobs and new multibranch branch jobs appear after Jenkins exposes them and Pipedash refreshes. Unsupported item types stay out.

The plugin sets no job-count or folder-depth limit. It refreshes up to 8 jobs concurrently. A failed request while listing a folder fails the whole discovery.

Pipedash keeps the saved manual selection when automatic monitoring is enabled. Turning the switch off restores that selection. Without a saved selection, the app requires a selection and reports "Please select at least one pipeline".

## Run history

Pipedash asks Jenkins for the builds of a job in one request, from the newest build up to the number the history view needs. The requested count grows as you browse older pages and can exceed 1000 builds. Run details and the Logs tab read a build by its number, so they work for any build Jenkins still keeps.

## Trigger parameters

Pipedash reads the job's parameter definitions and turns each one into a trigger field. No field is required. Each field takes the parameter name as label and the Jenkins description.

| Jenkins parameter | Trigger field |
|---|---|
| Boolean parameter | Boolean, default `false` unless the job sets one |
| Choice, cascade choice or dynamic reference parameter with choices | Choice, using the default rules below |
| Any other parameter | String, with Jenkins's default when that value is a string |

For choices, Pipedash removes the `:selected` suffix and keeps the first occurrence of each value. The default is the first kept choice marked `:selected`, then Jenkins's string default, then the first kept choice.

A job without parameters starts through the `build` endpoint. A job with parameters starts through `buildWithParameters`, and Jenkins applies its own defaults to every field the trigger leaves out.

## Cancel

Pipedash stops the build through the Jenkins API, using the run number as the build number.

## Run logs

The Logs tab of the run details shows one entry per build, named after the build, for example the full display name Jenkins reports. A job in a folder or a branch of a multibranch project works the same way. Pipedash reads the console with `GET <build url>/logText/progressiveText?start=N`. A download stops with an error when no data arrives for 60 seconds, and after 15 minutes in total.

Jenkins logs stream while a build runs. With the dialog open, Pipedash reads the console of a running build about every 2 seconds. It sends the offset it has read and appends the new text that Jenkins returns. When Jenkins reports a smaller `X-Text-Size` than the saved offset, Pipedash replaces the cached console with the text in that response. When Jenkins sends no `X-Text-Size` on a resumed read, the read fails with "Jenkins did not report the console text size". Pipedash reads the build state again every 5 seconds while the build runs. When Jenkins answers `404` or `410`, for example after the build was discarded, the tab shows "The provider no longer has this log. It may have expired."

Pipeline consoles show each stage as a section. `[Pipeline] { (Stage)` starts a section named after the stage, which starts closed, and `[Pipeline] // stage` ends it. Sections do not nest, so a stage that contains other stages ends its section when the first inner stage starts. Parallel branches do not start sections. The lines `ERROR: …`, `Finished: FAILURE` and `Finished: UNSTABLE` show as errors, and Pipedash does not guess other lines as errors. `[Pipeline] sh` lines and lines that start with `+ ` show as commands. Freestyle consoles have no sections. Pipedash reads no timestamps from console lines. The [Run logs](/docs/features/run-logs) page covers the viewer.

## TOML example

The server address goes in `server_url`, not `base_url`.

```toml
[providers.jenkins-legacy]
name = "Jenkins Legacy"
type = "jenkins"
token = "${JENKINS_TOKEN}"
refresh_interval = 60

[providers.jenkins-legacy.config]
server_url = "https://jenkins.company.com"
username = "${JENKINS_USER}"
selected_items = "legacy-app-build,legacy-app-deploy"
```

For automatic monitoring, add this key to `[providers.jenkins-legacy.config]`:

```toml
follow_all_jobs = "true"
```

`selected_items` can stay in the same table as the saved manual selection. Automatic monitoring ignores it.

## Status mapping

A build that Jenkins reports as building is always `running`. Otherwise Pipedash maps the build result.

| Pipedash status | Jenkins state |
|---|---|
| `success` | `SUCCESS` |
| `failed` | `FAILURE`, `UNSTABLE` |
| `running` | Building, or no result yet |
| `pending` | Any other result, or a job with no build yet |
| `cancelled` | `ABORTED` |
| `skipped` | `NOT_BUILT` |
