-
Bug
-
Resolution: Cannot Reproduce
-
Minor
The helptext is at odds with what gets generated by the Snippet Generator (see screenshot).
node { sshagent (credentials: ['deploy-dev']) { sh 'ssh -o StrictHostKeyChecking=no -l cloudbees 192.168.1.106 uname -a' } }Multiple credentials could be passed in the array but it is not supported using Snippet Generator.
This would be useful, since I have a staging and a production Jenkins master and I would like to refer to the credential by name instead of ID so I can use it between hosts. The snippet generated is with the ID, and only that will work it seems:
sshagent(['05917262-0ebf-4491-bc84-5029e36ad0e8']) { // some block }
If I attempt to use the credentials: ['foo'] syntax, my job will fail:
FATAL: [ssh-agent] Could not find specified credentials
[ssh-agent] Looking for ssh-agent implementation...
[ssh-agent] Java/JNR ssh-agent
[ssh-agent] Started.
- is related to
-
JENKINS-32102 Only credentials added via the snippet generator are usable
-
- Resolved
-
Code changed in jenkins
User: R. Tyler Croy
Path:
Jenkinsfile
http://jenkins-ci.org/commit/jenkins.io/ff3bc09b643da104c514798098a735f8fff591b3
Log:
Add support for deploying the built zip out to the beta site
The following tickets were created as a result of this experimentation:
JENKINS-32101JENKINS-32102