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=""
70
70
# AWS_S3_BUCKET=""
71
71
# AWS_S3_SOURCE_SYNC_PATH=""
72
72
CFCACHE=" false"
73
+ AWS_CLOUD_FRONT_ID=" "
73
74
74
75
# Variables for Lambda
75
76
# AWS_LAMBDA_DEPLOY_TYPE=""
@@ -696,6 +697,18 @@ deploy_s3bucket() {
696
697
done ;
697
698
}
698
699
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
+
699
712
download_envfile ()
700
713
{
701
714
Buffer_seclist=$( echo $SEC_LIST | sed ' s/,/ /g' )
@@ -1127,6 +1140,7 @@ main()
1127
1140
if [ " $DEPLOYMENT_TYPE " == " CFRONT" ]
1128
1141
then
1129
1142
deploy_s3bucket
1143
+ invalidate_cf_cache
1130
1144
fi
1131
1145
1132
1146
if [ " $DEPLOYMENT_TYPE " == " LAMBDA" ]
You can’t perform that action at this time.
0 commit comments