Class CloudFrontInvalidationProcessor
java.lang.Object
org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
org.craftercms.deployer.impl.processors.aws.CloudFrontInvalidationProcessor
- All Implemented Interfaces:
DeploymentProcessor
,InitializableByConfigBean
,org.springframework.beans.factory.Aware
,org.springframework.beans.factory.BeanNameAware
Implementation of
DeploymentProcessor
that invalidates the changed
files in the given AWS Cloudfront distributions.
Can be configured with the following YAML properties:
- distributions: List of distributions ids
- Author:
- joseross
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected AwsClientBuilderConfigurer
Helper class the configures credentials and other properties for aAmazonCloudFront
client.protected static final String
protected String[]
List of distribution idsFields inherited from class org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
FAIL_DEPLOYMENT_CONFIG_KEY, failDeploymentOnFailure
Fields inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
alwaysRun, env, excludeFiles, includeFiles, JUMPING_TO_PARAM_NAME, jumpTo, label, name, siteName, targetId
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected com.amazonaws.services.cloudfront.AmazonCloudFront
Builds theAmazonCloudFront
client.protected void
Allows extending classes perform any custom cleanupprotected void
doInit
(org.apache.commons.configuration2.Configuration config) Allows extending classes perform any custom initializationprotected ChangeSet
doMainProcess
(Deployment deployment, ProcessorExecution execution, ChangeSet filteredChangeSet, ChangeSet originalChangeSet) Methods inherited from class org.craftercms.deployer.impl.processors.AbstractMainDeploymentProcessor
doExecute, failDeploymentOnProcessorFailure, init, shouldExecute
Methods inherited from class org.craftercms.deployer.impl.processors.AbstractDeploymentProcessor
destroy, execute, getFilteredChangeSet, isJumpToActive, isPostDeployment, setBeanName, setEnv, setSiteName, setTargetId, shouldIncludeFile, startJumpTo, supportsMode
-
Field Details
-
CONFIG_KEY_DISTRIBUTIONS
- See Also:
-
builderConfigurer
Helper class the configures credentials and other properties for aAmazonCloudFront
client. -
distributions
List of distribution ids
-
-
Constructor Details
-
CloudFrontInvalidationProcessor
public CloudFrontInvalidationProcessor()
-
-
Method Details
-
doInit
protected void doInit(org.apache.commons.configuration2.Configuration config) throws org.craftercms.commons.config.ConfigurationException Allows extending classes perform any custom initialization- Specified by:
doInit
in classAbstractDeploymentProcessor
- Parameters:
config
- the bean's configuration- Throws:
org.craftercms.commons.config.ConfigurationException
- if there's configuration related exception
-
doMainProcess
protected ChangeSet doMainProcess(Deployment deployment, ProcessorExecution execution, ChangeSet filteredChangeSet, ChangeSet originalChangeSet) throws DeployerException Performs the actual work of processing the files in theChangeSet
, it is also possible to return a newChangeSet
to be used for the following processors in the pipeline- Specified by:
doMainProcess
in classAbstractMainDeploymentProcessor
- Parameters:
deployment
- the current deploymentexecution
- the current executionfilteredChangeSet
- the filtered change set (as returned byAbstractDeploymentProcessor.getFilteredChangeSet(ChangeSet)
)originalChangeSet
- the original change set (as returned by the previous processors in the pipeline)- Returns:
- a new
ChangeSet
or null - Throws:
DeployerException
- if there is any error processing theChangeSet
-
buildClient
protected com.amazonaws.services.cloudfront.AmazonCloudFront buildClient()Builds theAmazonCloudFront
client. -
doDestroy
Allows extending classes perform any custom cleanup- Specified by:
doDestroy
in classAbstractDeploymentProcessor
- Throws:
DeployerException
- if an error occurs
-