Class SSHUserPrivateKeyBinding
- java.lang.Object
-
- hudson.model.AbstractDescribableImpl<MultiBinding<C>>
-
- org.jenkinsci.plugins.credentialsbinding.MultiBinding<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>
-
- org.jenkinsci.plugins.credentialsbinding.impl.SSHUserPrivateKeyBinding
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<MultiBinding<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>>
public class SSHUserPrivateKeyBinding extends MultiBinding<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
SSHUserPrivateKeyBinding.DescriptorImpl
-
Nested classes/interfaces inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
MultiBinding.MultiEnvironment, MultiBinding.NullUnbinder, MultiBinding.Unbinder
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Field Summary
Fields Modifier and Type Field Description String
keyFileVariable
String
passphraseVariable
String
usernameVariable
-
Constructor Summary
Constructors Constructor Description SSHUserPrivateKeyBinding(String keyFileVariable, String credentialsId)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description MultiBinding.MultiEnvironment
bind(Run<?,?> build, FilePath workspace, Launcher launcher, TaskListener listener)
Sets up bindings for a build.String
getPassphraseVariable()
String
getUsernameVariable()
void
setPassphraseVariable(String passphraseVariable)
void
setUsernameVariable(String usernameVariable)
protected Class<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>
type()
Type token.Set<String>
variables(Run<?,?> build)
Defines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues()
, particularly any that might be sensitive.-
Methods inherited from class org.jenkinsci.plugins.credentialsbinding.MultiBinding
getCredentials, getCredentialsId, getDescriptor, variables
-
-
-
-
Method Detail
-
setUsernameVariable
@DataBoundSetter public void setUsernameVariable(@CheckForNull String usernameVariable)
-
getUsernameVariable
@CheckForNull public String getUsernameVariable()
-
setPassphraseVariable
@DataBoundSetter public void setPassphraseVariable(@CheckForNull String passphraseVariable)
-
getPassphraseVariable
@CheckForNull public String getPassphraseVariable()
-
type
protected Class<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey> type()
Description copied from class:MultiBinding
Type token.- Specified by:
type
in classMultiBinding<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>
-
variables
public Set<String> variables(@NonNull Run<?,?> build) throws CredentialNotFoundException
Description copied from class:MultiBinding
Defines keys expected to be set inMultiBinding.MultiEnvironment.getSecretValues()
, particularly any that might be sensitive.- Overrides:
variables
in classMultiBinding<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>
- Throws:
CredentialNotFoundException
-
bind
public MultiBinding.MultiEnvironment bind(@NonNull Run<?,?> build, FilePath workspace, Launcher launcher, @NonNull TaskListener listener) throws IOException, InterruptedException
Description copied from class:MultiBinding
Sets up bindings for a build.- Specified by:
bind
in classMultiBinding<com.cloudbees.jenkins.plugins.sshcredentials.SSHUserPrivateKey>
- Parameters:
build
- The build. Cannot be nullworkspace
- The workspace - can be null ifBindingDescriptor.requiresWorkspace()
is false.launcher
- The launcher - can be null ifBindingDescriptor.requiresWorkspace()
is false.listener
- The task listener. Cannot be null.- Returns:
- The configured
MultiBinding.MultiEnvironment
- Throws:
IOException
InterruptedException
-
-