-
Bug
-
Resolution: Fixed
-
Major
-
-
2.2
Configuration
- Pipeline job with parameters
- Execute concurrent builds if necessary: true
- Throttle Concurrent Builds: true
- Prevent multiple jobs with identical parameters from running concurrently: true
Notes
- Job parameters are defined as part of the pipeline setup with the properties command
- This is also an issue when properties are not defined as part of the pipeline setup, and are configured through the UI directly
Problem
When throttling based on one of the job's parameters, the plugin does not prevent multiple builds from running concurrently when the defined parameter is the same.
- duplicates
-
JENKINS-31801 Pipeline Support in Throttle Concurrent Builds
-
- Resolved
-
- relates to
-
JENKINS-37929 WorkUnitContext.actions does not populate for Pipeline steps
-
- Resolved
-
- links to
[JENKINS-37809] Throttling based on parameters does not work with Pipeline jobs
Description |
Original:
h3. Configuration # Pipeline job with parameters # Execute concurrent builds if necessary: true # Throttle Concurrent Builds: true # Prevent multiple jobs with identical parameters from running concurrently: true h3. Notes - Job parameters are defined as part of the pipeline setup with the {{properties}} command h3. Problem When throttling based on one of the job's parameters, the plugin does not prevent multiple builds from running concurrently when the defined parameter is the same. |
New:
h3. Configuration # Pipeline job with parameters # Execute concurrent builds if necessary: true # Throttle Concurrent Builds: true # Prevent multiple jobs with identical parameters from running concurrently: true h3. Notes - Job parameters are defined as part of the pipeline setup with the {{properties}} command h3. Problem When throttling based on one of the job's parameters, the plugin does not prevent multiple builds from running concurrently when the defined parameter is the same. |
Description |
Original:
h3. Configuration # Pipeline job with parameters # Execute concurrent builds if necessary: true # Throttle Concurrent Builds: true # Prevent multiple jobs with identical parameters from running concurrently: true h3. Notes - Job parameters are defined as part of the pipeline setup with the {{properties}} command h3. Problem When throttling based on one of the job's parameters, the plugin does not prevent multiple builds from running concurrently when the defined parameter is the same. |
New:
h3. Configuration # Pipeline job with parameters # Execute concurrent builds if necessary: true # Throttle Concurrent Builds: true # Prevent multiple jobs with identical parameters from running concurrently: true h3. Notes - Job parameters are defined as part of the pipeline setup with the {{properties}} command - This is also an issue when properties are not defined as part of the pipeline setup, and are configured through the UI directly h3. Problem When throttling based on one of the job's parameters, the plugin does not prevent multiple builds from running concurrently when the defined parameter is the same. |
Link |
New:
This issue relates to |
Labels | New: pipeline |
Issue Type | Original: Bug [ 1 ] | New: New Feature [ 2 ] |
Link |
New:
This issue duplicates |
Resolution | New: Duplicate [ 3 ] | |
Status | Original: Open [ 1 ] | New: Resolved [ 5 ] |
I did some more digging on the issue and it looks like problem is in the getParametersFromWorkUnit() method. On Freestyle jobs, the conditional that checks unit.context.actions gets populated with values, but for Pipeline jobs it does not.
The WorkUnit object that is passed to getParametersFromWorkUnit() for a normal job looks like this:
, where "Working" is the name of the job. For Pipeline jobs, it looks like
, where "Throttle-this" is the name of the job and "#11" is the build number.
To try and summarize:
Freestyle jobs where the plugin works:
Pipeline jobs where the plugin does not work: