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
- Author:
- Nicolas De Loof
-
Nested Class Summary
Nested ClassesNested 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
Constructors -
Method Summary
Modifier and TypeMethodDescriptionaddDynamicTemplate(ECSTaskTemplate template) Adds a dynamic task template.voidaddTemplate(ECSTaskTemplate taskTemplate) booleancanProvision(Label label) booleancanProvision(String label) findParentTemplate(String parentLabel) Will attempt to find a parent for the template label supplied.static ECSCloudintintintintintintgetProvisioningCapacity(int excessWorkload, int onlineExecutors, int connectingExecutors) static com.amazonaws.regions.RegionbooleanintintintgetTemplate(String label) booleanisAllowedOverride(String override) isCustomTaskDefinition(String label) voidremoveDynamicTemplate(ECSTaskTemplate template) Remove a dynamic task template.voidsetAllowedOverrides(String allowedOverrides) voidsetAssumedRoleArn(String assumedRoleArn) voidsetJenkinsUrl(String jenkinsUrl) voidsetMaxAgents(int maxAgents) voidsetMaxCpu(int maxCpu) voidsetMaxMemory(int maxMemory) voidsetMaxMemoryReservation(int maxMemoryReservation) voidsetNumExecutors(int numExecutors) voidsetRegionName(String regionName) voidsetRetainAgents(boolean retainAgents) voidsetRetentionTimeout(int retentionTimeout) voidsetSlaveTimeoutInSeconds(int slaveTimeoutInSeconds) voidsetTaskPollingIntervalInSeconds(int taskPollingIntervalInSeconds) voidsetTemplates(List<ECSTaskTemplate> templates) voidMethods inherited from class hudson.slaves.Cloud
all, canProvision, doConfigSubmit, doDoDelete, getACL, getDescriptor, getDisplayName, 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, hasPermission2
-
Constructor Details
-
ECSCloud
-
ECSCloud
-
-
Method Details
-
getByName
- Throws:
IllegalArgumentException
-
getTemplates
-
setTemplates
-
getCredentialsId
-
getCluster
-
getRegionName
-
getAssumedRoleArn
-
setRegionName
-
setAssumedRoleArn
-
getTunnel
-
setTunnel
-
setAllowedOverrides
-
getAllowedOverrides
-
isAllowedOverride
-
isCustomTaskDefinition
-
canProvision
- Overrides:
canProvisionin classCloud
-
canProvision
-
getProvisioningCapacity
public int getProvisioningCapacity(int excessWorkload, int onlineExecutors, int connectingExecutors) -
getTemplate
-
findParentTemplate
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
-
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
-
getRegion
-
getJenkinsUrl
-
setJenkinsUrl
-
addDynamicTemplate
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
Remove a dynamic task template.- Parameters:
template- the template to remove
-