-
Notifications
You must be signed in to change notification settings - Fork 695
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[JENKINS-74836] Allow using a file based ssh credential via system property #1003
[JENKINS-74836] Allow using a file based ssh credential via system property #1003
Conversation
feedback addressed @jglick , i am fixing up the testing now |
Co-authored-by: Jesse Glick <jglick@cloudbees.com>
pr feedback Co-authored-by: Antonio Muniz <amuniz@users.noreply.github.com>
329e698
to
8c68a51
Compare
@fcojfernandez i believe this is ready for your review |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it be possible to have more tests? Something to test what prevails if the user includes the credentials but the system property is overriding the value
Co-authored-by: Francisco Javier Fernandez <31063239+fcojfernandez@users.noreply.github.com>
added screenshot and validated manually again as awell @fcojfernandez |
JENKINS-74836
For some use cases it may not be desirable to create a Jenkins ssh credential to use for connecting to agents, as this credential may be visible to users in the ux, or you may find it easier to manage this private key as a mounted k8s secret.
To enable this functionality simply define a new
System.property
as follows:SSH_KEY_PAIR_PRIVATE_KEY_FILE=/path/to/plaintext/private_key.pem
If this system property is defined then any credential configured in the cloud config page will be ignored.
configuration validation has also been updated to support the new feature:
file based key, no jenkins credentials - form validation
`file based key, no jenkins credentials - test connection
file based key, jenkins credentials selected - form validation
file based key, jenkins credentials selected - test connection
Testing done
Submitter checklist