-
Bug
-
Resolution: Not A Defect
-
Major
-
None
-
Jenkins v2.13
I found this while filing JENKINS-37809. It seems like WorkUnitContext objects created by Pipeline steps do not have their parameters storied in the .actions field. The plugin works by calling getCurrentWorkUnit() on a node's Executor, uses that WorkUnit's .context to get the WorkUnitContext object, then gets its parameters by referencing the .actions field. That field is populated for builds running on executors for Freestyle jobs, but does not for Pipeline jobs.
I don't really know much Java or understand the internal workings of Jenkins, so I'm afraid I can't supply much more detail than that. I put as many relevant details as I could in JENKINS-37809 and decided to file a bug with the main pipeline component, as it seems like that is where the underlying issue exists.
Thanks!
- relates to
-
JENKINS-37809 Throttling based on parameters does not work with Pipeline jobs
-
- Resolved
-
A Pipeline node block creates a PlaceholderTask, which is distinct from the WorkflowJob that represents the project as a whole. I am not sure which Action you are looking for specifically, but I would not expect there to be any here. ParametersAction would be associated with the WorkflowRun, not a PlaceholderExecutable within it. Anyway it seems dubious that this is really what you should be basing decisions on. I am not sure what the freestyle feature is intended to accomplish but it possibly does not translate.