-
-
Notifications
You must be signed in to change notification settings - Fork 134
Description
Jenkins and plugins versions report
Environment
Jenkins Version: 2.541.1
Git Parameter Plugin Version: 462.vdcf3df2ed2ca_
When using a Pipeline job configured as “Pipeline script from SCM”, the Git Parameter plugin fails to load branches for a parameter that specifies a different repository via useRepository.
The job SCM is configured with Repository A.
Two parameters (BRANCH, ANSIBLE_BRANCH) work correctly when useRepository is empty.
A third parameter (PYLIB_BRANCH) is configured with:
type: PT_BRANCH
useRepository: ssh://git@:/.git
Result:
The dropdown shows “failed to load” (or remains empty).
No branches from Repository B are displayed.
If useRepository is cleared, the parameter works — but it loads branches from Repository A instead of Repository B.
What Operating System are you using (both controller, and any agents involved in the problem)?
AWS EC2 Instance Jenkins master + slave
Amazon Linux 2023 Type t2
Reproduction steps
- Create a pipeline having 2+ git params
- Say param BRANCH_A points to auto-skoda repo specify useRepository auto-skoda
- Say param BRANCH_B points to auto-toyota repo specify useRepository auto-toyota
- Use Jenkinsfile from repo auto-skoda
- See the params loaded in BRANCH_B
Expected Results
When useRepository is set to a valid Git repository URL, the plugin should fetch and display branches from that repository, even if the job’s primary SCM is configured with a different repository.
Actual Results
It's failed to load list of branches present in repo auto-toyota, shows only default passed branch
Error in redcolour on console
The default value has been returned
No Git repository configured in SCM configuration or plugin is configured wrong
Option 'Use repository' is set as: 'ssh://git@stash.abcde.com:099/london/auto-toyota.git'
Please check the configuration
Anything else?
No response
Are you interested in contributing a fix?
No response