Actions16
- Build Management Actions
- Job Management Actions
Overview
This node integrates with Jenkins, a popular automation server used for continuous integration and continuous delivery (CI/CD). Specifically, the Build Management resource with the Get Last Build operation retrieves details about the most recent build of a specified Jenkins job.
Typical use cases include:
- Monitoring the status and metadata of the latest build in a Jenkins pipeline.
- Triggering workflows based on the outcome or details of the last build.
- Fetching build information to display in dashboards or reports.
For example, you might use this node to automatically fetch the last build's result after a deployment job finishes, enabling conditional logic in your automation workflow depending on success or failure.
Properties
Name | Meaning |
---|---|
Job Name | The exact name of the Jenkins job whose last build details you want to retrieve. This is a required string input. |
Output
The node outputs JSON data representing the details of the last build of the specified Jenkins job. The structure corresponds to the Jenkins API response for the endpoint /job/{jobName}/lastBuild/api/json
. Typical fields include build number, status, timestamps, duration, result, and other metadata related to the build.
No binary data output is produced by this operation.
Example output snippet (simplified):
{
"actions": [...],
"artifacts": [...],
"building": false,
"description": null,
"duration": 12345,
"estimatedDuration": 12000,
"executor": null,
"fullDisplayName": "example-job #42",
"id": "42",
"number": 42,
"result": "SUCCESS",
"timestamp": 1616161616161,
"url": "http://jenkins.example.com/job/example-job/42/"
}
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 Jenkins API credentials are properly set up and linked to the node.
- HTTP errors (e.g., 404 Not Found): Verify that the Jenkins base URL and job name are correct and that the job exists.
- Permission denied or authentication failures: Check that the API token or user has sufficient permissions to access job/build information.
- Empty or unexpected output: Confirm that the job has at least one build; otherwise, the last build endpoint may return no data.