@Mojo(name="replace-environment") public class ReplaceEnvironmentMojo extends CreateEnvironmentMojo
AbstractNeedsEnvironmentMojo.ConfigurableOptionSetting
BEANSTALK_TAG_PREFIX, environmentName
applicationName, BEANSTALKX_PREFIX, COMMON_PARAMETERS, COS_COMPARATOR, curEnv, environmentRef, project
endpointUrl
Constructor and Description |
---|
ReplaceEnvironmentMojo() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
containsNamedEnvironment(String environmentName)
Boolean predicate for named environment
|
protected Object |
executeInternal() |
protected String |
formatAndTruncate(String mask,
int maxLen,
Object... args)
Elastic Beanstalk Contains a Max EnvironmentName Limit.
|
protected String |
getCNamePrefixToCreate()
Creates a cname prefix if needed, or returns the desired one
|
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription |
getEnvironmentFor(String applicationName,
String cnamePrefix)
Returns the environment description matching applicationName and environmentRef
|
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription |
handleResults(Collection<com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription> environments) |
protected boolean |
hasEnvironmentFor(String applicationName,
String cnamePrefix)
Boolean predicate for environment existence
|
void |
sleepInterval(int pollInterval) |
protected void |
swapEnvironmentCNames(String newEnvironmentId,
String curEnvironmentId,
String cnamePrefix,
com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription newEnv)
Swaps environment cnames
|
protected void |
terminateEnvironment(String environmentId)
Terminates and waits for an environment
|
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription |
waitForEnvironment(String environmentId)
Waits for an environment to get ready.
|
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription |
waitForGreenEnvironment(String environmentId)
TODO: What is Coffee anyway?
Waits for an environment to become green.
|
configure, createEnvironment, projectTags
getEnvironmentsFor, introspectOptionSettings, lookupVersionLabel, waitForNotUpdating
ensureSuffixStripped, getConfigurationTemplates, getOptionSettings, getOptionsToRemove, getService, handleNonSingle, harmfulOptionSettingP, lookupEnvironment, lookupSolutionStack, lookupTemplateName
contextualize, createServiceFor, displayResults, execute, exposeSettings, getAWSCredentials, getClientConfiguration, getClientFactory, getProperties, getRegion, getUserAgent, handleException, isVerbose, setupService, setupVersion
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription handleResults(Collection<com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription> environments) throws org.apache.maven.plugin.MojoExecutionException
handleResults
in class AbstractBeanstalkMojo
org.apache.maven.plugin.MojoExecutionException
protected Object executeInternal() throws Exception
executeInternal
in class CreateEnvironmentMojo
Exception
public void sleepInterval(int pollInterval)
protected void swapEnvironmentCNames(String newEnvironmentId, String curEnvironmentId, String cnamePrefix, com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription newEnv) throws org.apache.maven.plugin.AbstractMojoExecutionException
newEnvironmentId
- environment idcurEnvironmentId
- environment idorg.apache.maven.plugin.AbstractMojoExecutionException
protected void terminateEnvironment(String environmentId) throws org.apache.maven.plugin.AbstractMojoExecutionException
environmentId
- environment id to terminateorg.apache.maven.plugin.AbstractMojoExecutionException
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription waitForEnvironment(String environmentId) throws org.apache.maven.plugin.AbstractMojoExecutionException
environmentId
- environmentId to wait fororg.apache.maven.plugin.AbstractMojoExecutionException
protected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription waitForGreenEnvironment(String environmentId) throws org.apache.maven.plugin.AbstractMojoExecutionException
environmentId
- environmentId to wait fororg.apache.maven.plugin.AbstractMojoExecutionException
protected String getCNamePrefixToCreate()
protected boolean hasEnvironmentFor(String applicationName, String cnamePrefix)
applicationName
- application namecnamePrefix
- cname prefixprotected com.amazonaws.services.elasticbeanstalk.model.EnvironmentDescription getEnvironmentFor(String applicationName, String cnamePrefix)
applicationName
- application namecnamePrefix
- cname prefixprotected String formatAndTruncate(String mask, int maxLen, Object... args)
mask
- String.format MaskmaxLen
- Maximum Lengthargs
- String.format argsprotected boolean containsNamedEnvironment(String environmentName)
environmentName
- environment nameCopyright © 2011–2019 ingenieux. All rights reserved.