Class ExecRemoteAgentFactory
- java.lang.Object
-
- com.cloudbees.jenkins.plugins.sshagent.RemoteAgentFactory
-
- com.cloudbees.jenkins.plugins.sshagent.exec.ExecRemoteAgentFactory
-
- All Implemented Interfaces:
ExtensionPoint
@Extension public class ExecRemoteAgentFactory extends RemoteAgentFactory
A factory that uses the native SSH agent installed on a remote system. SSH agent has to be in PATH environment variable.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
-
Constructor Summary
Constructors Constructor Description ExecRemoteAgentFactory()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDisplayName()
The display name of the factory.boolean
isSupported(Launcher launcher, TaskListener listener)
Checks if the supplied launcher is supported by this factory.RemoteAgent
start(LauncherProvider launcherProvider, TaskListener listener, FilePath temp)
Start a ssh-agent on the specified launcher.
-
-
-
Method Detail
-
getDisplayName
public String getDisplayName()
The display name of the factory.- Specified by:
getDisplayName
in classRemoteAgentFactory
- Returns:
- The display name of the factory.
-
isSupported
public boolean isSupported(Launcher launcher, TaskListener listener)
Checks if the supplied launcher is supported by this factory.- Specified by:
isSupported
in classRemoteAgentFactory
- Parameters:
launcher
- the launcher on which the factory would be asked to start a ssh-agent.listener
- a listener in case any user diagnostics are to be printed.- Returns:
false
if the factory does not want to try and start an ssh-agent on the launcher.
-
start
public RemoteAgent start(LauncherProvider launcherProvider, TaskListener listener, FilePath temp) throws Throwable
Start a ssh-agent on the specified launcher.- Specified by:
start
in classRemoteAgentFactory
- Parameters:
launcherProvider
- provides launchers on which to start a ssh-agent.listener
- a listener for any diagnostics.temp
- a temporary directory to use; null if unspecified- Returns:
- the agent.
- Throws:
Throwable
- if the agent cannot be started.
-
-