Invalidating Cloudfront Cache
As part of any deployment to websites hosted behind Amazon Cloudfront, it's useful to invalidate cache right after deployment to eliminate any cache issues. This can be accomplished with a simple job:
aws_params: &aws_paramsAWS_ACCESS_KEY_ID: ((aws_access))AWS_SECRET_ACCESS_KEY: ((aws_secret))AWS_DEFAULT_REGION: us-west-2jobs:- name: invalidate-cacheplan:- task: cloudfront-invalidateconfig:platform: linuximage_resource:type: docker-imagesource:repository: oozie/vmware-awsparams:<<: *aws_paramsrun:path: /bin/bashargs:- -c- |aws cloudfront create-invalidation \--distribution-id E32XS6HDPKMNEI --paths "/*"