Reference · Tools

Jenkins

Manage Jenkins CI/CD jobs, trigger builds, control instance state, and retrieve build history.

Action Development v1

The Jenkins node triggers builds — with or without parameters — manages jobs, retrieves build history and can control the instance itself. A typical build is kicking off a deployment job when a release is approved and reporting the outcome back to the approval thread.

Node type
Action
Parameters
16
Outputs
Output, Error
Credentials
Jenkins API

Jenkins

Trigger builds, manage jobs, and control a Jenkins CI/CD server.

Overview

Jenkins is an open-source automation server for CI/CD pipelines. This tool interacts with a Jenkins server via its REST API using Basic Authentication (username + API token). It supports triggering jobs (with or without parameters), copying/creating jobs, managing the Jenkins instance (restart, shutdown, quiet down), and listing build history for jobs.

Category: Development
Tool Name: jenkins
Version: 1

Appearance: Icon: si-jenkins | Color: #D33833

Node Type

Action — processes input items and produces output

Input / Output

DirectionPort(s)
InputInput
OutputOutput, Error

Credentials

This tool requires Jenkins API credentials. See the Credentials Guide for setup instructions.

Resources

ResourceValue
Buildbuild
Instanceinstance
Jobjob

Operations

Each resource offers its own set of operations.

ResourceOperationValueDescription
BuildGet ManygetAllList builds for a job
InstanceCancel Quiet DowncancelQuietDownCancel quiet down state
InstanceQuiet DownquietDownPut Jenkins in quiet mode, no builds can be started, Jenkins is ready for shutdown
InstanceRestartrestartRestart Jenkins immediately on environments where it is possible
InstanceSafely RestartsafeRestartRestart Jenkins once no jobs are running on environments where it is possible
InstanceSafely ShutdownsafeExitShutdown once no jobs are running
InstanceShutdownexitShutdown Jenkins immediately
JobCopycopyCopy a specific job
JobCreatecreateCreate a new job
JobTriggertriggerTrigger a specific job
JobTrigger with ParameterstriggerParamsTrigger a specific job with parameters

Parameters

The Instance operations Cancel Quiet Down, Restart, Safely Restart, Safely Shutdown and Shutdown take no parameters of their own — see All Operations.

Build: Get Many

ParameterTypeRequiredDefaultDescription
Job NamestringYesName of the Jenkins job to list builds for. Find in your Jenkins dashboard URL: {baseUrl}/job/{jobName}/ Supports expressions.
Return AllbooleanNofalseWhether to return all results or only up to a given limit.
LimitnumberNo50Max number of results to return. (shown when Return All is false)

Instance: Quiet Down

ParameterTypeRequiredDefaultDescription
ReasonstringNoFreeform reason for quiet down mode. Supports expressions.

Job: Copy

ParameterTypeRequiredDefaultDescription
Job NamestringYesName of the Jenkins job. Find in your Jenkins dashboard URL: {baseUrl}/job/{jobName}/ Supports expressions.
New Job NamestringYesName of the new Jenkins job. Supports expressions.

Job: Create

ParameterTypeRequiredDefaultDescription
New Job NamestringYesName of the new Jenkins job. Supports expressions.
XMLstringYesXML of Jenkins job config. To get the XML of an existing job, add “config.xml” to the end of the job URL. Supports expressions.

Job: Trigger

ParameterTypeRequiredDefaultDescription
Job NamestringYesName of the Jenkins job. Find in your Jenkins dashboard URL: {baseUrl}/job/{jobName}/ Supports expressions.

Job: Trigger with Parameters

ParameterTypeRequiredDefaultDescription
Job NamestringYesName of the Jenkins job. Find in your Jenkins dashboard URL: {baseUrl}/job/{jobName}/ Supports expressions.
ParametersfixedCollectionYes{}Parameters for the Jenkins job build.
— NamestringNoParameter name as defined in the Jenkins job configuration. Supports expressions.
— ValuestringNoParameter value to pass to the build. Supports expressions like {{ $json.version }}.

All Operations

ParameterTypeRequiredDefaultDescription
Max ConcurrencynumberNo10Maximum number of items to process concurrently.

Output Data

Results are merged onto the input item’s JSON — incoming fields pass through and stay addressable downstream, and binary data is forwarded unchanged.

Resource / OperationOutput
Job trigger, triggerParams, copy, createOne item with success: true added.
Instance quietDown, cancelQuietDown, restart, safeRestart, exit, safeExitOne item with success: true added.
Build getAllFans out — one output item per build, each carrying that build’s own fields merged onto the input item’s JSON. A job with no builds produces no output items at all.

Build fields come straight from the Jenkins API — reference them downstream by expression, e.g. {{ $json.number }} or {{ $json.url }}.

Triggering reports acceptance, not completion. A successful trigger means Jenkins queued the build; it carries no build number and does not wait for the build to finish. Poll with a Build getAll afterwards if you need the result.

Usage Examples

  • Trigger a Jenkins build job
  • Trigger a parameterized Jenkins build
  • Copy an existing Jenkins job
  • Create a new Jenkins job from XML config
  • List recent builds for a Jenkins job
  • Safely restart the Jenkins server
  • Put Jenkins in quiet down mode

Example Configuration

Trigger a job:

{
  "type": "jenkins",
  "parameters": {
    "resource": "job",
    "operation": "trigger",
    "job": "my-build-job"
  }
}

Trigger a parameterized job:

{
  "type": "jenkins",
  "parameters": {
    "resource": "job",
    "operation": "triggerParams",
    "job": "my-parameterized-job",
    "param": {
      "params": [
        { "name": "BRANCH_NAME", "value": "main" },
        { "name": "BUILD_TYPE", "value": "release" }
      ]
    }
  }
}

Copy an existing job:

{
  "type": "jenkins",
  "parameters": {
    "resource": "job",
    "operation": "copy",
    "job": "existing-job",
    "newJob": "copied-job"
  }
}

Create a job from its XML config:

{
  "type": "jenkins",
  "parameters": {
    "resource": "job",
    "operation": "create",
    "newJob": "new-build-job",
    "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?><project></project>"
  }
}

Put Jenkins into quiet mode with a reason:

{
  "type": "jenkins",
  "parameters": {
    "resource": "instance",
    "operation": "quietDown",
    "reason": "Maintenance window for security updates"
  }
}

Cancel quiet mode:

{
  "type": "jenkins",
  "parameters": {
    "resource": "instance",
    "operation": "cancelQuietDown"
  }
}

Restart once the running builds have finished:

{
  "type": "jenkins",
  "parameters": {
    "resource": "instance",
    "operation": "safeRestart"
  }
}

Shut down immediately:

{
  "type": "jenkins",
  "parameters": {
    "resource": "instance",
    "operation": "exit"
  }
}

List every build of a job:

{
  "type": "jenkins",
  "parameters": {
    "resource": "build",
    "operation": "getAll",
    "job": "my-project-build",
    "returnAll": true
  }
}

List the ten most recent builds:

{
  "type": "jenkins",
  "parameters": {
    "resource": "build",
    "operation": "getAll",
    "job": "my-project-build",
    "returnAll": false,
    "limit": 10
  }
}

Trigger a deployment with environment-specific parameters:

{
  "type": "jenkins",
  "parameters": {
    "resource": "job",
    "operation": "triggerParams",
    "job": "deploy-to-staging",
    "param": {
      "params": [
        { "name": "ENVIRONMENT", "value": "staging" },
        { "name": "VERSION", "value": "{{ $json.version }}" },
        { "name": "NOTIFY_SLACK", "value": "true" }
      ]
    },
    "maxConcurrency": 5
  }
}

Pull the last 50 builds for monitoring:

{
  "type": "jenkins",
  "parameters": {
    "resource": "build",
    "operation": "getAll",
    "job": "nightly-integration-tests",
    "returnAll": false,
    "limit": 50,
    "maxConcurrency": 3
  }
}

Clone a template job into a new one:

{
  "type": "jenkins",
  "parameters": {
    "resource": "job",
    "operation": "copy",
    "job": "template-nodejs-build",
    "newJob": "new-microservice-build"
  }
}

Error Handling

ModeBehavior
stopHalts workflow on first error
continueSkips failed items, passes successful ones through
errorPortRoutes failed items to Error output port

Tips

Trigger Jenkins CI/CD builds, manage jobs, control instance state, and retrieve build history via the Jenkins REST API.

Behavior notes

  • Instance operations can shut Jenkins down and make it unresponsive. Some of them may not be available depending on how your instance is hosted. Treat Restart, Safely Restart, Shutdown and Safely Shutdown as production-affecting actions.
  • The job must be set up to accept parameters before Trigger with Parameters will work. Parameter names have to match the names declared in the job configuration; unknown names are ignored by Jenkins.
  • Get the XML for Create from an existing job by adding config.xml to the end of that job’s URL, then edit it to taste.
  • Copy needs both names. Job Name is the source job to copy from and New Job Name is the job to create.
  • Job names come from the dashboard URL, in the form {baseUrl}/job/{jobName}/. Jobs inside folders need the path Jenkins shows there.
  • Return All lists every build Jenkins reports for the job; with it off, the list is capped at Limit, newest first.

Frequently asked questions

Are the instance operations safe to run?

Treat them as production-affecting. Restart, Safely Restart, Shutdown and Safely Shutdown can make Jenkins unresponsive, and some may not be available depending on how your instance is hosted.

Why are my build parameters ignored?

The job must be configured to accept parameters before Trigger with Parameters works, and the names must match those declared in the job configuration. Jenkins silently ignores unknown parameter names.

Can I read past builds?

Yes — build history retrieval is supported, so a workflow can check whether the last run succeeded before deciding to trigger another.

Which credential does it use?

A Jenkins API credential with permission for the jobs and instance operations you intend to use.

Build with the Jenkins node

Drop it into a workflow, wire it to an agent, or call it on a schedule. You'll need Jenkins API credentials first.

Open BusyBot

Last updated . Spotted something wrong? Tell us.