Class ECSCloud

All Implemented Interfaces:
ExtensionPoint, Describable<Cloud>, ModelObject, SearchableModelObject, SearchItem, AccessControlled, ModelObjectWithContextMenu

public class ECSCloud extends Cloud
Author:
Nicolas De Loof
  • Constructor Details

  • Method Details

    • 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)
    • isCustomTaskDefinition

      public String isCustomTaskDefinition(String label)
    • canProvision

      public boolean canProvision(Label label)
      Overrides:
      canProvision in class Cloud
    • 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)
      Overrides:
      provision in class Cloud
    • 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