Class SSHAgentBuildWrapper
java.lang.Object
hudson.model.AbstractDescribableImpl<BuildWrapper>
hudson.tasks.BuildWrapper
com.cloudbees.jenkins.plugins.sshagent.SSHAgentBuildWrapper
- All Implemented Interfaces:
ExtensionPoint
,Describable<BuildWrapper>
A build wrapper that provides an SSH agent using supplied credentials
-
Nested Class Summary
Modifier and TypeClassDescriptionstatic class
A value object to make it possible to pass back multiple credentials via the UI.static class
Our descriptor.Nested classes/interfaces inherited from class hudson.tasks.BuildWrapper
BuildWrapper.Environment
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Constructor Summary
ConstructorDescriptionSSHAgentBuildWrapper
(SSHAgentBuildWrapper.CredentialHolder[] credentialHolders, boolean ignoreMissing) Constructs a new instance.SSHAgentBuildWrapper
(String user) Deprecated.SSHAgentBuildWrapper
(List<String> credentialIds, boolean ignoreMissing) Constructs a new instance. -
Method Summary
Modifier and TypeMethodDescriptionstatic String
description
(com.cloudbees.plugins.credentials.common.StandardUsernameCredentials c) Helper method that returns a safe description of aStandardUsernameCredentials
.Returns the value objects used to hold the credential ids.Gets theIdCredentials.getId()
s of the credentials to use.getUser()
Deprecated.boolean
Whentrue
then any missing credentials will be ignored.void
preCheckout
(AbstractBuild build, Launcher launcher, BuildListener listener) setUp
(AbstractBuild build, Launcher launcher, BuildListener listener) Methods inherited from class hudson.tasks.BuildWrapper
all, decorateLauncher, decorateLogger, getProjectAction, getProjectActions, makeBuildVariables, makeSensitiveBuildVariables, setUp
Methods inherited from class hudson.model.AbstractDescribableImpl
getDescriptor
-
Constructor Details
-
SSHAgentBuildWrapper
Deprecated.Constructs a new instance.- Parameters:
user
- theIdCredentials.getId()
of the credentials to use.
-
SSHAgentBuildWrapper
@DataBoundConstructor public SSHAgentBuildWrapper(SSHAgentBuildWrapper.CredentialHolder[] credentialHolders, boolean ignoreMissing) Constructs a new instance.- Parameters:
credentialHolders
- theSSHAgentBuildWrapper.CredentialHolder
s of the credentials to use.ignoreMissing
-true
missing credentials will not cause a build failure.- Since:
- 1.5
-
SSHAgentBuildWrapper
Constructs a new instance.- Parameters:
credentialIds
- theIdCredentials.getId()
s of the credentials to use.ignoreMissing
-true
missing credentials will not cause a build failure.- Since:
- 1.5
-
-
Method Details
-
getUser
Deprecated.Gets theIdCredentials.getId()
of the credentials to use.- Returns:
- the
IdCredentials.getId()
of the credentials to use.
-
getCredentialIds
Gets theIdCredentials.getId()
s of the credentials to use.- Returns:
- the
IdCredentials.getId()
s of the credentials to use. - Since:
- 1.5
-
isIgnoreMissing
public boolean isIgnoreMissing()Whentrue
then any missing credentials will be ignored. Whenfalse
then the build will be failed if any of the required credentials cannot be resolved.- Returns:
true
missing credentials will not cause a build failure.
-
getCredentialHolders
Returns the value objects used to hold the credential ids.- Returns:
- the value objects used to hold the credential ids.
- Since:
- 1.5
-
preCheckout
public void preCheckout(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException - Overrides:
preCheckout
in classBuildWrapper
- Throws:
IOException
InterruptedException
-
setUp
public BuildWrapper.Environment setUp(AbstractBuild build, Launcher launcher, BuildListener listener) throws IOException, InterruptedException - Overrides:
setUp
in classBuildWrapper
- Throws:
IOException
InterruptedException
-
description
@NonNull public static String description(@NonNull com.cloudbees.plugins.credentials.common.StandardUsernameCredentials c) Helper method that returns a safe description of aStandardUsernameCredentials
.- Parameters:
c
- the credentials.- Returns:
- the description.
-
SSHAgentBuildWrapper(java.util.List,boolean)