Package com.dubture.jenkins.digitalocean
Class DigitalOceanCloud
java.lang.Object
hudson.model.AbstractModelObject
hudson.model.Actionable
hudson.slaves.Cloud
com.dubture.jenkins.digitalocean.DigitalOceanCloud
- All Implemented Interfaces:
ExtensionPoint,Describable<Cloud>,ModelObject,SearchableModelObject,SearchItem,AccessControlled,ModelObjectWithContextMenu
The
DigitalOceanCloud contains the main configuration values for running
slaves on DigitalOcean, e.g. apiKey/clientId to connect to the API.
The provision(hudson.model.Label, int) method will be called
by Jenkins as soon as a new slave needs to be provisioned.
The number of
- Author:
- robert.gruendler@dubture.com
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic final classstatic final classNested classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudStateNested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudsonNested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType -
Field Summary
-
Constructor Summary
ConstructorsConstructorDescriptionDigitalOceanCloud(String name, String sshKeyId, String instanceCap, Boolean usePrivateNetworking, String timeoutMinutes, String connectionRetryWait, List<? extends SlaveTemplate> templates) Constructor parameters are injected via jelly in the jenkins global configurationDigitalOceanCloud(String name, String authToken, String privateKey, String sshKeyId, String instanceCap, Boolean usePrivateNetworking, String timeoutMinutes, String connectionRetryWait, List<? extends SlaveTemplate> templates) Deprecated. -
Method Summary
Modifier and TypeMethodDescriptionbooleancanProvision(Label label) com.myjeeva.digitalocean.impl.DigitalOceanClientDeprecated.static StringgetAuthTokenFromCredentialId(String credentialId) intgetName()Deprecated.usegetPrivateKey()static StringgetPrivateKeyFromCredentialId(String credentialId) intstatic StringmigrateAuthTokenToCredential(String displayName, String authToken) static StringmigratePrivateSshKeyToCredential(String displayName, String privateKey) The actual logic for provisioning a new droplet when it's needed by Jenkins.protected ObjectvoidsetAuthToken(String credential) Deprecated.voidsetAuthTokenCredentialId(String credentialId) voidsetPrivateKey(String credential) Deprecated.voidsetPrivateKeyCredentialId(String credentialId) Methods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDescriptor, getIcon, getIconAltText, getIconClassName, getSearchUrl, getUrl, provision, reconfigure, reconfigure, registerPermissionsMethods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, getDynamic, removeAction, removeActions, replaceAction, replaceActionsMethods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError, sendError, sendError, sendErrorMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2Methods inherited from interface hudson.search.SearchItem
getSearchIcon
-
Constructor Details
-
DigitalOceanCloud
@Deprecated public DigitalOceanCloud(String name, String authToken, String privateKey, String sshKeyId, String instanceCap, Boolean usePrivateNetworking, String timeoutMinutes, String connectionRetryWait, List<? extends SlaveTemplate> templates) Deprecated.Constructor parameters are injected via jelly in the jenkins global configuration- Parameters:
name- A name associated with this cloud configurationauthToken- A DigitalOcean V2 API authentication token, generated on their website.privateKey- An RSA private key in text formatsshKeyId- An identifier (name) for an SSH key known to DigitalOceaninstanceCap- the maximum number of instances that can be startedusePrivateNetworking- Whether to use private networking to connect to the cloud.timeoutMinutes- the timeout in minutes.connectionRetryWait- the time to wait for SSH connections to worktemplates- the templates for this cloud
-
DigitalOceanCloud
@DataBoundConstructor public DigitalOceanCloud(String name, String sshKeyId, String instanceCap, Boolean usePrivateNetworking, String timeoutMinutes, String connectionRetryWait, List<? extends SlaveTemplate> templates) Constructor parameters are injected via jelly in the jenkins global configuration- Parameters:
name- A name associated with this cloud configurationsshKeyId- An identifier (name) for an SSH key known to DigitalOceaninstanceCap- the maximum number of instances that can be startedusePrivateNetworking- Whether to use private networking to connect to the cloud.timeoutMinutes- the timeout in minutes.connectionRetryWait- the time to wait for SSH connections to worktemplates- the templates for this cloud
-
-
Method Details
-
setPrivateKeyCredentialId
-
setPrivateKey
Deprecated.- Since:
- 1.2.0
-
getPrivateKey
Deprecated.usegetPrivateKey()- Since:
- 1.2.0
-
getPrivateKeyCredentialId
-
setAuthToken
Deprecated.- Since:
- 1.2.0
-
setAuthTokenCredentialId
-
getAuthTokenCredentialId
-
getAuthToken
Deprecated.- Since:
- 1.2.0
-
getDisplayName
- Specified by:
getDisplayNamein interfaceModelObject- Overrides:
getDisplayNamein classCloud
-
provision
The actual logic for provisioning a new droplet when it's needed by Jenkins. -
canProvision
- Overrides:
canProvisionin classCloud
-
getName
-
getAuthTokenFromCredentialId
-
getPrivateKeyFromCredentialId
-
getSshKeyId
public int getSshKeyId() -
getInstanceCap
public int getInstanceCap() -
getApiClient
public com.myjeeva.digitalocean.impl.DigitalOceanClient getApiClient() -
getTemplates
-
getTimeoutMinutes
-
getConnectionRetryWait
-
getUsePrivateNetworking
-
migratePrivateSshKeyToCredential
-
migrateAuthTokenToCredential
-
readResolve
-
getAuthTokenCredentialId()