jenkins-job-builder/tests/wrappers
Ken Dreyer 787164e09a wrappers: omit blank settings for ssh-user-private-key credential
For the ssh-user-private-key credential-wrapper, the "key-file-variable"
setting is mandatory, but the "username-variable" and
"passphrase-variable" settings are optional.

Prior to this commit, if a user omitted "username-variable" or
"passphrase-variable" settings, JJB would write empty
<usernameVariable/> or <passphraseVariable/> entries. When both were
empty, the credentials-binding plugin would crash with an error:

  IllegalArgumentException("Cannot use the same key in both secretValues and publicValues")

To resolve this, do not write XML entries for these optional parameters
when the user does not specify them.

Add a minimal test case reproducer.

Change-Id: I94a4437eee6a8fdaf655c1a3bf69d46844b225bc
2022-06-09 16:37:50 -04:00
..
fixtures wrappers: omit blank settings for ssh-user-private-key credential 2022-06-09 16:37:50 -04:00
__init__.py update doc and add new JJB unit tests 2013-11-22 17:51:17 +00:00
test_wrappers.py Auto-generated output from python-black 2019-09-09 19:23:24 +01:00