Skip to content

Commit 0198293

Browse files
feat: updated region variable (#379)
1 parent c7db6d0 commit 0198293

File tree

7 files changed

+37
-62
lines changed

7 files changed

+37
-62
lines changed

dotnet/publish-layers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ function publish-dotnet-x86-64 {
3636
exit 1
3737
fi
3838

39-
for region in "${REGIONS_X86[@]}"; do
39+
for region in "${REGIONS[@]}"; do
4040
publish_layer $DOTNET_DIST_X86_64 $region dotnet x86_64 $NEWRELIC_AGENT_VERSION
4141
done
4242

@@ -61,7 +61,7 @@ function publish-dotnet-arm64 {
6161
exit 1
6262
fi
6363

64-
for region in "${REGIONS_ARM[@]}"; do
64+
for region in "${REGIONS[@]}"; do
6565
publish_layer $DOTNET_DIST_ARM64 $region dotnet arm64 $NEWRELIC_AGENT_VERSION
6666
done
6767

extension/publish-layer.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ function publish-layer-x86 {
3131
exit 1
3232
fi
3333

34-
for region in "${REGIONS_X86[@]}"; do
34+
for region in "${REGIONS[@]}"; do
3535
publish_layer $EXTENSION_DIST_ZIP_X86_64 $region provided x86_64 provided
3636
done
3737
}
@@ -42,7 +42,7 @@ function publish-layer-arm64 {
4242
exit 1
4343
fi
4444

45-
for region in "${REGIONS_ARM[@]}"; do
45+
for region in "${REGIONS[@]}"; do
4646
publish_layer $EXTENSION_DIST_ZIP_ARM64 $region provided arm64 provided
4747
done
4848
}

java/publish-layers.sh

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function publish-java8al2-arm64 {
6565
exit 1
6666
fi
6767

68-
for region in "${REGIONS_ARM[@]}"; do
68+
for region in "${REGIONS[@]}"; do
6969
publish_layer $JAVA8_DIST_ARM64 $region java8.al2 arm64
7070
done
7171
}
@@ -76,7 +76,7 @@ function publish-java8al2-x86 {
7676
exit 1
7777
fi
7878

79-
for region in "${REGIONS_X86[@]}"; do
79+
for region in "${REGIONS[@]}"; do
8080
publish_layer $JAVA8_DIST_X86_64 $region java8.al2 x86_64
8181
done
8282
}
@@ -95,7 +95,7 @@ function publish-java11-arm64 {
9595
exit 1
9696
fi
9797

98-
for region in "${REGIONS_ARM[@]}"; do
98+
for region in "${REGIONS[@]}"; do
9999
publish_layer $JAVA11_DIST_ARM64 $region java11 arm64
100100
done
101101
}
@@ -106,7 +106,7 @@ function publish-java11-x86 {
106106
exit 1
107107
fi
108108

109-
for region in "${REGIONS_X86[@]}"; do
109+
for region in "${REGIONS[@]}"; do
110110
publish_layer $JAVA11_DIST_X86_64 $region java11 x86_64
111111
done
112112
}
@@ -125,7 +125,7 @@ function publish-java17-arm64 {
125125
exit 1
126126
fi
127127

128-
for region in "${REGIONS_ARM[@]}"; do
128+
for region in "${REGIONS[@]}"; do
129129
publish_layer $JAVA17_DIST_ARM64 $region java17 arm64
130130
done
131131
}
@@ -136,7 +136,7 @@ function publish-java17-x86 {
136136
exit 1
137137
fi
138138

139-
for region in "${REGIONS_X86[@]}"; do
139+
for region in "${REGIONS[@]}"; do
140140
publish_layer $JAVA17_DIST_X86_64 $region java17 x86_64
141141
done
142142
}
@@ -155,7 +155,7 @@ function publish-java21-arm64 {
155155
exit 1
156156
fi
157157

158-
for region in "${REGIONS_ARM[@]}"; do
158+
for region in "${REGIONS[@]}"; do
159159
publish_layer $JAVA21_DIST_ARM64 $region java21 arm64
160160
done
161161
}
@@ -166,7 +166,7 @@ function publish-java21-x86 {
166166
exit 1
167167
fi
168168

169-
for region in "${REGIONS_X86[@]}"; do
169+
for region in "${REGIONS[@]}"; do
170170
publish_layer $JAVA21_DIST_X86_64 $region java21 x86_64
171171
done
172172
}

libBuild.sh

Lines changed: 21 additions & 46 deletions
Original file line numberDiff line numberDiff line change
@@ -2,58 +2,33 @@
22

33
set -Eeuo pipefail
44

5-
# Regions that support arm64 architecture
6-
REGIONS_ARM=(
7-
af-south-1
8-
ap-northeast-1
9-
ap-northeast-2
10-
ap-northeast-3
11-
ap-south-1
12-
ap-southeast-1
13-
ap-southeast-2
14-
ap-southeast-3
15-
ca-central-1
16-
eu-central-1
17-
eu-north-1
18-
eu-south-1
19-
eu-west-1
20-
eu-west-2
21-
eu-west-3
22-
me-south-1
23-
sa-east-1
24-
us-east-1
25-
us-east-2
26-
us-west-1
27-
us-west-2
28-
)
29-
30-
REGIONS_X86=(
31-
af-south-1
5+
REGIONS=(
6+
sa-east-1
7+
me-central-1
8+
me-south-1
9+
eu-central-2
10+
eu-north-1
11+
eu-south-2
12+
eu-west-3
13+
eu-south-1
14+
eu-west-2
15+
eu-west-1
16+
eu-central-1
17+
ca-central-1
3218
ap-northeast-1
19+
ap-southeast-2
20+
ap-southeast-1
3321
ap-northeast-2
3422
ap-northeast-3
3523
ap-south-1
3624
ap-south-2
37-
ap-southeast-1
38-
ap-southeast-2
39-
ap-southeast-3
4025
ap-southeast-4
41-
ca-central-1
42-
eu-central-1
43-
eu-central-2
44-
eu-north-1
45-
eu-south-1
46-
eu-south-2
47-
eu-west-1
48-
eu-west-2
49-
eu-west-3
50-
me-central-1
51-
me-south-1
52-
sa-east-1
26+
ap-southeast-3
27+
af-south-1
5328
us-east-1
54-
us-east-2
55-
us-west-1
56-
us-west-2
29+
us-east-2
30+
us-west-1
31+
us-west-2
5732
)
5833

5934
EXTENSION_DIST_DIR=extensions
@@ -258,7 +233,7 @@ function publish_layer {
258233
echo "Uploading ${layer_archive} to s3://${bucket_name}/${s3_key}"
259234
aws --region "$region" s3 cp $layer_archive "s3://${bucket_name}/${s3_key}"
260235

261-
if [[ ${REGIONS_ARM[*]} =~ $region ]];
236+
if [[ ${REGIONS[*]} =~ $region ]];
262237
then arch_flag="--compatible-architectures $arch"
263238
else arch_flag=""
264239
fi

nodejs/publish-layers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ function publish_wrapper {
5353
exit 1
5454
fi
5555

56-
for region in "${REGIONS_ARM[@]}"; do
56+
for region in "${REGIONS[@]}"; do
5757
publish_layer $ZIP $region nodejs${node_version}.x ${arch} $NEWRELIC_AGENT_VERSION
5858
done
5959
}

python/publish-layers.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -71,9 +71,9 @@ function publish_python_layer {
7171
fi
7272

7373
if [[ "${arch}" == "arm64" ]]; then
74-
REGIONS=("${REGIONS_ARM[@]}");
74+
REGIONS=("${REGIONS[@]}");
7575
else
76-
REGIONS=("${REGIONS_X86[@]}");
76+
REGIONS=("${REGIONS[@]}");
7777
fi
7878

7979
for region in "${REGIONS[@]}"; do

ruby/publish-layers.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -163,7 +163,7 @@ function publish_ruby_for_arch {
163163
local arch=$2
164164
local dist_file=$3
165165

166-
for region in "${REGIONS_X86[@]}"; do
166+
for region in "${REGIONS[@]}"; do
167167
echo "Publishing $dist_file for region=$region, ruby=$ruby_version, arch=$arch"
168168
publish_layer $dist_file $region "ruby${ruby_version}" $arch
169169
done

0 commit comments

Comments
 (0)