Jenkins
Connects to a Jenkins server's REST API. An agent can trigger builds, check build status and logs, list jobs, and inspect the build queue.
Add to an agent node's tools array with _node_type: "tool-jenkins". See Connector Reference — How connectors are used.
Authentication
| Field | Required | Description |
|---|---|---|
base_url | Yes | Base URL of the Jenkins server (e.g. https://jenkins.example.com). |
user | No | Jenkins username, combined with api_token to form HTTP Basic auth credentials. |
api_token | No | Jenkins API token, combined with user to form HTTP Basic auth credentials. |
{
"name": "jenkins",
"_node_type": "tool-jenkins",
"base_url": "https://jenkins.example.com",
"user": "ci-bot",
"api_token": "{{ secret.JENKINS_API_TOKEN }}"
}
Tools
jenkins_trigger
Trigger a Jenkins build job, optionally with parameters.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job | string | Yes | Jenkins job name or path e.g. my-job or folder/my-job |
params | string | No | Build parameters as key=value&key2=value2 |
Returns: A confirmation message that the build was triggered, suggesting use of jenkins_status to check progress.
jenkins_status
Get the status and result of a Jenkins build.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job | string | Yes | Jenkins job name |
number | number | No | Build number (0 = latest) |
Returns: A line with the build number, result, duration (ms), and URL.
jenkins_list_jobs
List Jenkins jobs in a folder or at root.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
folder | string | No | Folder path (empty for root) |
Returns: A newline-separated list of <job name> <status color> lines.
jenkins_logs
Get console log output from a Jenkins build.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
job | string | Yes | Job name |
number | number | No | Build number (0 = latest) |
Returns: The build's console text, truncated to the last 5000 characters (prefixed with ...(truncated)...) if longer.
jenkins_queue
List builds currently waiting in the Jenkins build queue.
No parameters.
Returns: A newline-separated list of - <task name> (why: <reason>) lines, or "Build queue is empty.".