Skip to content

Commit d6c4098

Browse files
committed
Fix regions and add clarity in Lambda Layer release workflow
1 parent d51c05f commit d6c4098

File tree

2 files changed

+7
-253
lines changed

2 files changed

+7
-253
lines changed

.github/workflows/release-build.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ env:
1818
PRIVATE_REPOSITORY: 020628701572.dkr.ecr.us-west-2.amazonaws.com/adot-autoinstrumentation-java
1919
PRIVATE_REGISTRY: 020628701572.dkr.ecr.us-west-2.amazonaws.com
2020
ARTIFACT_NAME: aws-opentelemetry-agent.jar
21-
COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1, ap-southeast-5, ap-southeast-7, mx-central-1, ca-west-1, cn-north-1, cn-northwest-1
21+
# Legacy list of commercial regions to deploy to. New regions should NOT be added here, and instead should be added to the `aws_region` default input to the workflow.
22+
LEGACY_COMMERCIAL_REGIONS: us-east-1, us-east-2, us-west-1, us-west-2, ap-south-1, ap-northeast-3, ap-northeast-2, ap-southeast-1, ap-southeast-2, ap-northeast-1, ca-central-1, eu-central-1, eu-west-1, eu-west-2, eu-west-3, eu-north-1, sa-east-1
2223
LAYER_NAME: AWSOpenTelemetryDistroJava
2324

2425
permissions:
@@ -226,21 +227,21 @@ jobs:
226227
steps:
227228
- name: role arn
228229
env:
229-
COMMERCIAL_REGIONS: ${{ env.COMMERCIAL_REGIONS }}
230+
LEGACY_COMMERCIAL_REGIONS: ${{ env.LEGACY_COMMERCIAL_REGIONS }}
230231
run: |
231-
COMMERCIAL_REGIONS_ARRAY=(${COMMERCIAL_REGIONS//,/ })
232+
LEGACY_COMMERCIAL_REGIONS_ARRAY=(${LEGACY_COMMERCIAL_REGIONS//,/ })
232233
FOUND=false
233-
for REGION in "${COMMERCIAL_REGIONS_ARRAY[@]}"; do
234+
for REGION in "${LEGACY_COMMERCIAL_REGIONS_ARRAY[@]}"; do
234235
if [[ "$REGION" == "${{ matrix.aws_region }}" ]]; then
235236
FOUND=true
236237
break
237238
fi
238239
done
239240
if [ "$FOUND" = true ]; then
240-
echo "Found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
241+
echo "Found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
241242
SECRET_KEY="LAMBDA_LAYER_RELEASE"
242243
else
243-
echo "Not found ${{ matrix.aws_region }} in COMMERCIAL_REGIONS"
244+
echo "Not found ${{ matrix.aws_region }} in LEGACY_COMMERCIAL_REGIONS"
244245
SECRET_KEY="${{ matrix.aws_region }}_LAMBDA_LAYER_RELEASE"
245246
fi
246247
SECRET_KEY=${SECRET_KEY//-/_}

.github/workflows/release-lambda.yml

Lines changed: 0 additions & 247 deletions
This file was deleted.

0 commit comments

Comments
 (0)