public class DigitalOceanCloud
extends hudson.slaves.Cloud
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
| Modifier and Type | Class and Description |
|---|---|
static class |
DigitalOceanCloud.ConverterImpl |
static class |
DigitalOceanCloud.DescriptorImpl |
| Constructor and Description |
|---|
DigitalOceanCloud(String name,
String authToken,
String privateKey,
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
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
canProvision(hudson.model.Label label) |
com.myjeeva.digitalocean.impl.DigitalOceanClient |
getApiClient() |
String |
getAuthToken() |
Integer |
getConnectionRetryWait() |
int |
getInstanceCap() |
String |
getName() |
String |
getPrivateKey() |
int |
getSshKeyId() |
List<SlaveTemplate> |
getTemplates() |
Integer |
getTimeoutMinutes() |
Boolean |
getUsePrivateNetworking() |
Collection<hudson.slaves.NodeProvisioner.PlannedNode> |
provision(hudson.model.Label label,
int excessWorkload)
The actual logic for provisioning a new droplet when it's needed by Jenkins.
|
all, checkPermission, getACL, getDescriptor, getDisplayName, getSearchUrl, hasPermission@DataBoundConstructor public DigitalOceanCloud(String name, String authToken, String privateKey, String sshKeyId, String instanceCap, Boolean usePrivateNetworking, String timeoutMinutes, String connectionRetryWait, List<? extends SlaveTemplate> templates)
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 cloudpublic Collection<hudson.slaves.NodeProvisioner.PlannedNode> provision(hudson.model.Label label, int excessWorkload)
provision in class hudson.slaves.Cloudlabel - name of the fieldexcessWorkload - if the workload can be overloadedpublic boolean canProvision(hudson.model.Label label)
canProvision in class hudson.slaves.Cloudpublic String getName()
public String getAuthToken()
public String getPrivateKey()
public int getSshKeyId()
public int getInstanceCap()
public com.myjeeva.digitalocean.impl.DigitalOceanClient getApiClient()
public List<SlaveTemplate> getTemplates()
public Integer getTimeoutMinutes()
public Integer getConnectionRetryWait()
public Boolean getUsePrivateNetworking()
Copyright © 2016–2019. All rights reserved.