Class BaseSshTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
- java.lang.Object
-
- com.atlassian.bamboo.specs.api.builders.EntityPropertiesBuilder<P>
-
- com.atlassian.bamboo.specs.api.builders.task.Task<T,E>
-
- com.atlassian.bamboo.specs.builders.task.BaseSshTask<T,E>
-
public abstract class BaseSshTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties> extends Task<T,E>
-
-
Field Summary
Fields Modifier and Type Field Description protected BaseSshTaskProperties.AuthenticationTypeauthenticationTypeprotected @Nullable java.lang.StringhostFingerprintprotected java.util.List<java.lang.String>hostsprotected @Nullable java.lang.Stringkeyprotected @Nullable java.lang.Stringpassphraseprotected @Nullable java.lang.Stringpasswordprotected intportprotected @Nullable SharedCredentialsIdentifierPropertiessharedCredentialsprotected java.lang.Stringusername-
Fields inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
conditions, description, requirements, taskEnabled
-
-
Constructor Summary
Constructors Constructor Description BaseSshTask()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description TauthenticateWithKey(@NotNull java.lang.String key)Authenticate with key (without passphrase).TauthenticateWithKey(@NotNull java.nio.file.Path keyPath)Authenticate with key (without passphrase).TauthenticateWithKeyWithPassphrase(@NotNull java.lang.String key, @NotNull java.lang.String passphrase)Authenticate with key with passphrase.TauthenticateWithKeyWithPassphrase(@NotNull java.nio.file.Path keyPath, @NotNull java.lang.String passphrase)Authenticate with key with passphrase.TauthenticateWithPassword(@NotNull java.lang.String password)Authenticate with password associated with usernameusername(String).TauthenticateWithSshSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials)TauthenticateWithUsernamePasswordSharedCredentials(@NotNull SharedCredentialsIdentifier sharedCredentials)booleanequals(java.lang.Object o)inthashCode()Thost(@NotNull java.lang.String host)Hostname or IP address of the remote host.Thost(@NotNull java.lang.String... host)Hostnames or IP addresses of the remote hosts.ThostFingerprint(@NotNull java.lang.String hostFingerprint)Set public key fingerprint.Tport(int port)Set the port number of the remote host that is used for the SSH connection.TportDefault()Set the port number of the remote host to the default value (22).Tusername(@NotNull java.lang.String username)Username you want to use to access the remote host.-
Methods inherited from class com.atlassian.bamboo.specs.api.builders.task.Task
build, conditions, description, enabled, requirements, toString
-
-
-
-
Field Detail
-
hosts
protected java.util.List<java.lang.String> hosts
-
username
protected java.lang.String username
-
authenticationType
protected BaseSshTaskProperties.AuthenticationType authenticationType
-
password
@Nullable protected @Nullable java.lang.String password
-
key
@Nullable protected @Nullable java.lang.String key
-
passphrase
@Nullable protected @Nullable java.lang.String passphrase
-
hostFingerprint
@Nullable protected @Nullable java.lang.String hostFingerprint
-
port
protected int port
-
sharedCredentials
@Nullable protected @Nullable SharedCredentialsIdentifierProperties sharedCredentials
-
-
Method Detail
-
host
public T host(@NotNull @NotNull java.lang.String host)
Hostname or IP address of the remote host.
-
host
public T host(@NotNull @NotNull java.lang.String... host)
Hostnames or IP addresses of the remote hosts.
-
username
public T username(@NotNull @NotNull java.lang.String username)
Username you want to use to access the remote host.
-
authenticateWithPassword
public T authenticateWithPassword(@NotNull @NotNull java.lang.String password)
Authenticate with password associated with usernameusername(String).
-
authenticateWithKeyWithPassphrase
public T authenticateWithKeyWithPassphrase(@NotNull @NotNull java.lang.String key, @NotNull @NotNull java.lang.String passphrase)
Authenticate with key with passphrase.- Parameters:
key- - SSH private keypassphrase- - SSH passphrase
-
authenticateWithKeyWithPassphrase
public T authenticateWithKeyWithPassphrase(@NotNull @NotNull java.nio.file.Path keyPath, @NotNull @NotNull java.lang.String passphrase)
Authenticate with key with passphrase.- Parameters:
keyPath- - path to SSH private keypassphrase- - SSH passphrase
-
authenticateWithKey
public T authenticateWithKey(@NotNull @NotNull java.lang.String key)
Authenticate with key (without passphrase).- Parameters:
key- - SSH private key
-
authenticateWithKey
public T authenticateWithKey(@NotNull @NotNull java.nio.file.Path keyPath)
Authenticate with key (without passphrase).- Parameters:
keyPath- - path to SSH private key
-
authenticateWithSshSharedCredentials
public T authenticateWithSshSharedCredentials(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentials)
-
authenticateWithUsernamePasswordSharedCredentials
public T authenticateWithUsernamePasswordSharedCredentials(@NotNull @NotNull SharedCredentialsIdentifier sharedCredentials)
-
hostFingerprint
public T hostFingerprint(@NotNull @NotNull java.lang.String hostFingerprint)
Set public key fingerprint.
-
port
public T port(int port)
Set the port number of the remote host that is used for the SSH connection. The default value is 22.- See Also:
portDefault()
-
portDefault
public T portDefault()
Set the port number of the remote host to the default value (22).- See Also:
portDefault()
-
equals
public boolean equals(java.lang.Object o)
- Overrides:
equalsin classTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
-
hashCode
public int hashCode()
- Overrides:
hashCodein classTask<T extends BaseSshTask<T,E>,E extends BaseSshTaskProperties>
-
-