Jenkins Community Node icon

Jenkins Community Node

Jenkins Node

Overview

This node integrates with Jenkins, a popular automation server used for continuous integration and delivery. Specifically, the "Get Last Successful Build" operation under the "Build Management" resource retrieves details about the most recent successful build of a specified Jenkins job.

Common scenarios where this node is beneficial include:

  • Monitoring the status of the latest successful build to trigger downstream processes.
  • Fetching build metadata for reporting or auditing purposes.
  • Automating deployment pipelines that depend on successful builds.

For example, after a Jenkins job completes successfully, you can use this node to fetch its details and then notify a team via email or update a dashboard.

Properties

Name Meaning
Job Name The exact name of the Jenkins job for which you want to retrieve the last successful build. This is a required string input.

Output

The output is a JSON object containing detailed information about the last successful build of the specified Jenkins job. This typically includes fields such as build number, status, timestamps, duration, and other metadata provided by Jenkins' API.

Example structure (simplified):

{
  "actions": [...],
  "artifacts": [...],
  "building": false,
  "description": null,
  "displayName": "#42",
  "duration": 123456,
  "estimatedDuration": 120000,
  "executor": null,
  "fullDisplayName": "jobName #42",
  "id": "42",
  "number": 42,
  "result": "SUCCESS",
  "timestamp": 1616161616161,
  "url": "http://jenkins/job/jobName/42/"
}

No binary data is output for this operation.

Dependencies

  • Requires an active Jenkins server accessible via its base URL.
  • Needs an API authentication token or credentials configured in n8n to authenticate requests to Jenkins.
  • The node uses HTTP requests authenticated with these credentials to interact with Jenkins REST API endpoints.

Troubleshooting

  • No credentials found: Ensure that valid Jenkins API credentials are configured in n8n before running the node.
  • Job not found or invalid job name: Verify that the "Job Name" property exactly matches an existing Jenkins job.
  • Network errors or timeouts: Confirm that the Jenkins server URL is reachable from the n8n instance and that there are no firewall restrictions.
  • Permission denied errors: Check that the API token or credentials have sufficient permissions to access job and build information.
  • Unexpected response format: If Jenkins is customized or uses plugins altering API responses, some fields might differ or be missing.

Links and References

Discussion