23e6f39287
There are cases when you want SSH Agent plugin to just start and stop an SSH agent during the build, without adding any keys automatically. One of such cases is when you want to use an SSH key stored on a SmartCard -like device, such as NitroKey HSM. So far, when the "users" property was set to an empty list then the output XML markup didn't contain the <credentialIds/> tag and the plugin was then crashing with NullPointerException. Also, when the "users" property was set to a list with just one value then the output XML markup was always generated in the "old style" format (matching plugin versions < 1.5, so like almost 8 years old). With this change, when using the "users" property the markup is generated based on the actual plugin version installed in Jenkins. More importantly, the generated markup is now properly handled by the plugin, no matter if the input is an empty list or a list with one or more entries. Finally, fixed the parent of the <ignoreMissing> tag, which was wrongly put under <credentialIds> tag when generating the "new style" markup (1.5+), while it should simply be a top-level tag, laying next to <credentialIds>, as in the corresponding implementation class [1]. This means the "ignore-missing-credentials" property was broken when the "users" property was set to a list with more than one entry and it's now fixed. [1] https://github.com/jenkinsci/ssh-agent-plugin/blob/ssh-agent-1.5/src/main/java/com/cloudbees/jenkins/plugins/sshagent/SSHAgentBuildWrapper.java#L83 Change-Id: Ife5a08739da9ea1130f0ea7daa08c16675f6c75d
4 lines
53 B
YAML
4 lines
53 B
YAML
wrappers:
|
|
- ssh-agent-credentials:
|
|
users: []
|