File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -70,6 +70,7 @@ ebstemplate=""
7070# AWS_S3_BUCKET=""
7171# AWS_S3_SOURCE_SYNC_PATH=""
7272CFCACHE=" false"
73+ AWS_CLOUD_FRONT_ID=" "
7374
7475# Variables for Lambda
7576# AWS_LAMBDA_DEPLOY_TYPE=""
@@ -696,6 +697,18 @@ deploy_s3bucket() {
696697 done ;
697698}
698699
700+ invalidate_cf_cache ()
701+ {
702+ if [ " $CFCACHE " = " true" ]; then
703+ if [ -z $AWS_CLOUD_FRONT_ID ]; then
704+ echo " Based on header applicaiton has invalidated"
705+ echo " Skipped which is based on AWS cloudfront ID.Kindly raise request to configure cloud front ID in deployment configuration"
706+ else
707+ aws cloudfront create-invalidation --distribution-id $AWS_CLOUD_FRONT_ID --paths ' /*'
708+ fi
709+ fi
710+ }
711+
699712download_envfile ()
700713{
701714 Buffer_seclist=$( echo $SEC_LIST | sed ' s/,/ /g' )
@@ -1127,6 +1140,7 @@ main()
11271140 if [ " $DEPLOYMENT_TYPE " == " CFRONT" ]
11281141 then
11291142 deploy_s3bucket
1143+ invalidate_cf_cache
11301144 fi
11311145
11321146 if [ " $DEPLOYMENT_TYPE " == " LAMBDA" ]
You can’t perform that action at this time.
0 commit comments