File tree Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Expand file tree Collapse file tree 4 files changed +18
-5
lines changed Original file line number Diff line number Diff line change 1
- FROM amazon/aws-cli:2.8.9
1
+ FROM amazon/aws-cli:2.8.11
2
2
3
3
ADD entrypoint.sh /entrypoint.sh
4
4
ENTRYPOINT ["/entrypoint.sh" ]
Original file line number Diff line number Diff line change 51
51
| S3_DESTINATION_DIR | false (defaults to S3 root) | Path to folder in a S3 bucket |
52
52
| CLOUDFRONT_DISTRIBUTION_ID | false | Your CloudFront distribution |
53
53
| CLOUDFRONT_PATHS | false (defaults to /*) | The paths to invalidate (relative to the distribution) |
54
- | USE_GZIP | false (defaults to false) | Use gzip for upload |
54
+ | USE_GZIP_COMPRESSION | false (defaults to false) | Use gzip for upload |
Original file line number Diff line number Diff line change @@ -12,3 +12,4 @@ services:
12
12
- S3_SOURCE_DIR
13
13
- CLOUDFRONT_DISTRIBUTION_ID
14
14
- CLOUDFRONT_PATHS
15
+ - USE_GZIP_COMPRESSION
Original file line number Diff line number Diff line change @@ -29,12 +29,24 @@ if [ -z "$S3_SOURCE_DIR" ]; then
29
29
exit 1
30
30
fi
31
31
32
- if [ " $USE_GZIP " = true ]; then
32
+ if [ " $USE_GZIP_COMPRESSION " = true ]; then
33
33
echo " Gzipping files..."
34
- find " $PWD /$S3_SOURCE_DIR " -type f -exec gzip " {}" \; -exec mv " {}.gz" " {}" \;
34
+ echo " ./$S3_SOURCE_DIR "
35
+ echo " $PWD /$S3_SOURCE_DIR "
36
+ echo " $( pwd) /S3_SOURCE_DIR"
37
+
38
+ touch test.md
39
+
40
+ ls -la $S3_SOURCE_DIR
41
+
42
+ ls -la
43
+
44
+ find " ./$S3_SOURCE_DIR " -type f -exec gzip " {}" \; -exec mv " {}.gz" " {}" \;
35
45
fi
36
46
37
- sh -c " aws s3 sync $S3_SOURCE_DIR s3://$AWS_S3_BUCKET /$DESTINATION_DIR $( [ " $USE_GZIP " = true ] && echo " --content-encoding gzip" || echo " " ) $* "
47
+ echo " Uploading files..."
48
+
49
+ sh -c " aws s3 sync $S3_SOURCE_DIR s3://$AWS_S3_BUCKET /$DESTINATION_DIR $( [ " $USE_GZIP_COMPRESSION " = true ] && echo " --content-encoding gzip" || echo " " ) $* "
38
50
39
51
if [ -n " $CLOUDFRONT_DISTRIBUTION_ID " ]; then
40
52
echo " Creating CloudFront invalidation"
You can’t perform that action at this time.
0 commit comments