-
Bug
-
Resolution: Unresolved
-
Major
-
Jenkins LTS version: 2.479.1
Operating System: Ubuntu 22
We have 155 plugins installed, including "Global Variable String Parameter"
Global variables are not being set correctly when manually triggering parameterized freestyle jobs. However, the behavior is correct when the job is triggered by a timer.
Steps to reproduce:
- Set a global variable (e.g., VAR1) in Jenkins configuration. ( "Manage Jenkins" -> "System" -> "Global Properties" -> "Environment variables" -> Add VAR1)
- Create a freestyle job with a String or Global variable parameter named VAR1 (the same name as the global variable).
- Set the default value of the parameter VAR1 to ${VAR1}.
- Optionally create a "Execute shell" build step and log the value: echo VAR1 = ${VAR1}
- Run the job manually.
- Set up a timer trigger for the same job and let it run automatically.
- Check the parameters of the build/console log
Expected behavior:
The job should use the global variable value if the parameter is not changed, or the user-provided value if changed, regardless of how the job is triggered (manually or by timer).
Actual behavior:
- When triggered manually: The variable is not set correctly, resulting in an incorrect value ("${VAR1}" in the example).
- When triggered by timer: The global variable parameter is replaced with the correct global variable content.
This inconsistency in behavior between manual and timed triggers began after updating Jenkins from version 2.462.3 to 2.479.1. Although all plugins were updated later, the issue does not appear to be related to the plugins.
The issue started on November 4, 2024. Before this date, both trigger methods worked correctly.
Additional Information:
- No changes were made to job configurations or global settings around the time this issue started occurring (but we do not know when it started because we usually not run jobs manually).
- The discrepancy between manual and timed triggers suggests a potential issue with how parameters are processed in different triggering scenarios.