Class ECSCloud
- java.lang.Object
-
- hudson.model.AbstractModelObject
-
- hudson.model.Actionable
-
- hudson.slaves.Cloud
-
- com.cloudbees.jenkins.plugins.amazonecs.ECSCloud
-
- All Implemented Interfaces:
ExtensionPoint
,Describable<Cloud>
,ModelObject
,SearchableModelObject
,SearchItem
,AccessControlled
,ModelObjectWithContextMenu
public class ECSCloud extends Cloud
- Author:
- Nicolas De Loof
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ECSCloud.DescriptorImpl
-
Nested classes/interfaces inherited from class hudson.slaves.Cloud
Cloud.CloudState
-
Nested classes/interfaces inherited from interface hudson.ExtensionPoint
ExtensionPoint.LegacyInstancesAreScopedToHudson
-
Nested classes/interfaces inherited from interface jenkins.model.ModelObjectWithContextMenu
ModelObjectWithContextMenu.ContextMenu, ModelObjectWithContextMenu.ContextMenuVisibility, ModelObjectWithContextMenu.MenuItem, ModelObjectWithContextMenu.MenuItemType
-
-
Method Summary
-
Methods inherited from class hudson.slaves.Cloud
all, canProvision, getACL, getDescriptor, getDisplayName, getSearchUrl, getUrl, provision, registerPermissions
-
Methods inherited from class hudson.model.Actionable
addAction, addOrReplaceAction, doContextMenu, getAction, getAction, getActions, getActions, getAllActions, getDynamic, removeAction, removeActions, replaceAction, replaceActions
-
Methods inherited from class hudson.model.AbstractModelObject
getSearch, getSearchIndex, getSearchName, makeSearchIndex, requirePOST, sendError, sendError, sendError, sendError, sendError
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface hudson.security.AccessControlled
checkAnyPermission, checkPermission, hasAnyPermission, hasPermission, hasPermission, hasPermission2
-
-
-
-
Method Detail
-
getByName
@Nonnull public static ECSCloud getByName(@Nonnull String name) throws IllegalArgumentException
- Throws:
IllegalArgumentException
-
getTemplates
@Nonnull public List<ECSTaskTemplate> getTemplates()
-
setTemplates
@DataBoundSetter public void setTemplates(List<ECSTaskTemplate> templates)
-
getCredentialsId
public String getCredentialsId()
-
getCluster
public String getCluster()
-
getRegionName
public String getRegionName()
-
getAssumedRoleArn
public String getAssumedRoleArn()
-
setRegionName
@DataBoundSetter public void setRegionName(String regionName)
-
setAssumedRoleArn
@DataBoundSetter public void setAssumedRoleArn(String assumedRoleArn)
-
getTunnel
public String getTunnel()
-
setTunnel
@DataBoundSetter public void setTunnel(String tunnel)
-
setAllowedOverrides
@DataBoundSetter public void setAllowedOverrides(@Nonnull String allowedOverrides)
-
getAllowedOverrides
@Nonnull public String getAllowedOverrides()
-
isAllowedOverride
public boolean isAllowedOverride(String override)
-
canProvision
public boolean canProvision(Label label)
- Overrides:
canProvision
in classCloud
-
canProvision
public boolean canProvision(String label)
-
getProvisioningCapacity
public int getProvisioningCapacity(int excessWorkload, int onlineExecutors, int connectingExecutors)
-
getTemplate
public ECSTaskTemplate getTemplate(String label)
-
findParentTemplate
public ECSTaskTemplate findParentTemplate(String parentLabel)
Will attempt to find a parent for the template label supplied. If no parent is supplied it will attempt to look for one with a label of 'template-default' and if it still can't find one, it will attempt to find one by name of 'template-default'- Parameters:
parentLabel
- the parent template to find- Returns:
- a task template or potentially null if one can't be determined
-
provision
public Collection<NodeProvisioner.PlannedNode> provision(Label label, int excessWorkload)
-
getSlaveTimeoutInSeconds
public int getSlaveTimeoutInSeconds()
-
setSlaveTimeoutInSeconds
@DataBoundSetter public void setSlaveTimeoutInSeconds(int slaveTimeoutInSeconds)
-
getRetainAgents
public boolean getRetainAgents()
-
setRetainAgents
@DataBoundSetter public void setRetainAgents(boolean retainAgents)
-
getRetentionTimeout
public int getRetentionTimeout()
-
setRetentionTimeout
@DataBoundSetter public void setRetentionTimeout(int retentionTimeout)
-
getTaskPollingIntervalInSeconds
public int getTaskPollingIntervalInSeconds()
-
setTaskPollingIntervalInSeconds
@DataBoundSetter public void setTaskPollingIntervalInSeconds(int taskPollingIntervalInSeconds)
-
getMaxCpu
public int getMaxCpu()
-
setMaxCpu
@DataBoundSetter public void setMaxCpu(int maxCpu)
-
getNumExecutors
public int getNumExecutors()
-
setNumExecutors
@DataBoundSetter public void setNumExecutors(int numExecutors)
-
getMaxMemory
public int getMaxMemory()
-
setMaxMemory
@DataBoundSetter public void setMaxMemory(int maxMemory)
-
getMaxMemoryReservation
public int getMaxMemoryReservation()
-
setMaxMemoryReservation
@DataBoundSetter public void setMaxMemoryReservation(int maxMemoryReservation)
-
getMaxAgents
public int getMaxAgents()
-
setMaxAgents
@DataBoundSetter public void setMaxAgents(int maxAgents)
-
addTemplate
public void addTemplate(ECSTaskTemplate taskTemplate)
-
getRegion
public static com.amazonaws.regions.Region getRegion(String regionName)
-
getJenkinsUrl
public String getJenkinsUrl()
-
setJenkinsUrl
@DataBoundSetter public void setJenkinsUrl(String jenkinsUrl)
-
addDynamicTemplate
public ECSTaskTemplate addDynamicTemplate(ECSTaskTemplate template)
Adds a dynamic task template. Won't be displayed in UI, and persisted separately from the cloud instance. Also creates a task definition for this template, adding the ARN to back to the template so that we can delete the exact task created once complete.- Parameters:
template
- the template to add- Returns:
- the task template with the newly created task definition ARN added
-
removeDynamicTemplate
public void removeDynamicTemplate(ECSTaskTemplate template)
Remove a dynamic task template.- Parameters:
template
- the template to remove
-
-