fix(Jenkins Node): Properly load job parameters#28631
Merged
RomanDavydchuk merged 5 commits intomasterfrom Apr 23, 2026
Merged
Conversation
…with-parameters-operation
Contributor
Performance ComparisonComparing current → latest master → 14-day baseline docker-stats
Idle baseline with Instance AI module loaded
Memory consumption baseline with starter plan resources
How to read this table
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
…with-parameters-operation
Contributor
yehorkardash
left a comment
There was a problem hiding this comment.
Looks good to me, just one clarification question
| continue; | ||
| } | ||
|
|
||
| for (const { name, type } of parameterDefinitions) { |
Contributor
There was a problem hiding this comment.
not sure if Jenkins API may allow having null here, but maybe worth adding guard against null/undefined here
Contributor
Author
There was a problem hiding this comment.
Added Array.isArray check for parameterDefinitions which covers nullish values as well
| for (const { name, type } of parameterDefinitions) { | ||
| const endpoint = `/job/${job}/api/json?tree=actions[parameterDefinitions[*]],property[parameterDefinitions[*]]`; | ||
| const result = await jenkinsApiRequest.call(this, 'GET', endpoint); | ||
| const allParameters = [...(result.actions ?? []), ...(result.property ?? [])]; |
Contributor
There was a problem hiding this comment.
Can Jenkins return both result.actions and result.property leading to duplicate parameters?
Contributor
Author
yehorkardash
approved these changes
Apr 23, 2026
Merged
Contributor
|
Got released with |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
Jenkins can expose build parameters in different places depending on job type and Jenkins/plugin version, so reading only one field is incomplete.
actionsis common for older/freestyle-style jobspropertyis common for Pipeline and newer configurationsParametersDefinitionProperty, just in different parts of the job JSONpropertymay include parameters that are also returned inactionsTesting
Manual
To manually test:
docker run -p 8080:8080 -p 50000:50000 jenkins/jenkins:ltsBefore the fix (no parameters are loaded for the pipeline job):
2026-04-17.20-02-08.mp4
After the fix (parameters are loaded for both pipeline and freestyle jobs):
2026-04-17.20-01-15.mp4
Related Linear tickets, Github issues, and Community forum posts
https://linear.app/n8n/issue/NODE-4823/community-issue-jenkins-trigger-with-parameters-operation-fails-to-pre
Closes #27991
Review / Merge checklist
Backport to Beta,Backport to Stable, orBackport to v1(if the PR is an urgent fix that needs to be backported)