File tree Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Expand file tree Collapse file tree 3 files changed +22
-2
lines changed Original file line number Diff line number Diff line change 7
7
needs_layer_publish : true
8
8
suffix : amd64
9
9
layer_name_base_suffix : " "
10
+ max_layer_compressed_size_mb : 20
11
+ max_layer_uncompressed_size_mb : 54
10
12
11
13
- name : arm64
12
14
arch : arm64
@@ -16,6 +18,8 @@ flavors:
16
18
needs_layer_publish : true
17
19
suffix : arm64
18
20
layer_name_base_suffix : " -ARM"
21
+ max_layer_compressed_size_mb : 18
22
+ max_layer_uncompressed_size_mb : 50
19
23
20
24
- name : amd64, alpine
21
25
arch : amd64
@@ -41,6 +45,8 @@ flavors:
41
45
needs_layer_publish : true
42
46
suffix : amd64-fips
43
47
layer_name_base_suffix : " -FIPS"
48
+ max_layer_compressed_size_mb : 21
49
+ max_layer_uncompressed_size_mb : 55
44
50
45
51
- name : arm64, fips
46
52
arch : arm64
@@ -50,6 +56,8 @@ flavors:
50
56
needs_layer_publish : true
51
57
suffix : arm64-fips
52
58
layer_name_base_suffix : " -FIPS-ARM"
59
+ max_layer_compressed_size_mb : 19
60
+ max_layer_uncompressed_size_mb : 51
53
61
54
62
- name : amd64, fips, alpine
55
63
arch : amd64
Original file line number Diff line number Diff line change 9
9
10
10
set -e
11
11
12
+ if [ -z " $MAX_LAYER_COMPRESSED_SIZE_MB " ]; then
13
+ printf " [ERROR]: MAX_LAYER_COMPRESSED_SIZE_MB not specified\n"
14
+ exit 1
15
+ fi
16
+
17
+ if [ -z " $MAX_LAYER_UNCOMPRESSED_SIZE_MB " ]; then
18
+ printf " [ERROR]: MAX_LAYER_UNCOMPRESSED_SIZE_MB not specified\n"
19
+ exit 1
20
+ fi
21
+
12
22
validate_size () {
13
23
local max_size=$1
14
24
local file_size=$2
@@ -23,8 +33,8 @@ if [ -z "$LAYER_FILE" ]; then
23
33
exit 1
24
34
fi
25
35
26
- MAX_LAYER_COMPRESSED_SIZE_KB=$(( 23 * 1024 )) # 23 MB, amd64 is 22, while arm64 is 20
27
- MAX_LAYER_UNCOMPRESSED_SIZE_KB=$(( 54 * 1024 )) # 53 MB, amd is 53, while arm64 is 47
36
+ MAX_LAYER_COMPRESSED_SIZE_KB=$(( $MAX_LAYER_COMPRESSED_SIZE_MB * 1024 ))
37
+ MAX_LAYER_UNCOMPRESSED_SIZE_KB=$(( $MAX_LAYER_UNCOMPRESSED_SIZE_MB * 1024 ))
28
38
29
39
FILE=" .layers" /$LAYER_FILE
30
40
FILE_SIZE=$( stat --printf=" %s" " $FILE " )
Original file line number Diff line number Diff line change @@ -121,6 +121,8 @@ check layer size ({{ $flavor.name }}):
121
121
- layer ({ { $flavor .name } })
122
122
variables:
123
123
LAYER_FILE: datadog_extension-{ { $flavor .suffix } }.zip
124
+ MAX_LAYER_COMPRESSED_SIZE_MB: { { $flavor .max_layer_compressed_size_mb } }
125
+ MAX_LAYER_UNCOMPRESSED_SIZE_MB: { { $flavor .max_layer_uncompressed_size_mb } }
124
126
script:
125
127
- .gitlab/scripts/check_layer_size.sh
126
128
You can’t perform that action at this time.
0 commit comments