Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 12 additions & 18 deletions .github/workflows/release_lambda.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,7 @@ on:

env:
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
# LAYER_NAME: AWSOpenTelemetryDistroPython
LAYER_NAME: AWSOpenTelemetryDistroPythonBeta
LAYER_NAME: AWSOpenTelemetryDistroPython

permissions:
id-token: write
Expand Down Expand Up @@ -56,7 +55,6 @@ jobs:
needs: build-layer
strategy:
matrix:
# aws_region: ${{ fromJson(github.event.inputs.aws_region) }}
aws_region: ${{ fromJson(needs.build-layer.outputs.aws_regions_json) }}
steps:
- name: role arn
Expand Down Expand Up @@ -112,7 +110,6 @@ jobs:
mkdir ${{ env.LAYER_NAME }}
echo $layerARN > ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
cat ${{ env.LAYER_NAME }}/${{ matrix.aws_region }}
pwd
- name: public layer
run: |
layerVersion=$(
Expand Down Expand Up @@ -187,27 +184,24 @@ jobs:
with:
name: layer.tf
path: layer.tf
update-layer:
runs-on: ubuntu-latest
needs: generate-release-note
steps:
- name: Checkout Repo @ SHA - ${{ github.sha }}
uses: actions/checkout@v4
- name: download layer.tf
uses: actions/download-artifact@v3
with:
name: layer.tf
- name: Commit changes
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git config user.name "github-actions[bot]"
git config user.email "github-actions[bot]@users.noreply.github.com"
git checkout -b "release-lambda-${{ github.run_id }}"
mv layer.tf lambda-layer/terraform/lambda/
git add lambda-layer/terraform/lambda/layer.tf
git commit -m "Update Lambda layer ARNs for releasing" || echo "No changes to commit"
git push --set-upstream origin "release-lambda-${{ github.run_id }}"
- name: Create Pull Request
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
uses: peter-evans/create-pull-request@v5
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "Update Lambda layer ARNs for releasing"
title: "Update Layer layer ARNs for releasing"
body: |
This PR updates the layer.tf file for the AWS region `${{ matrix.aws_region }}`.
branch: release-lambda-${{ github.run_id }}
base: main
git push

7 changes: 7 additions & 0 deletions lambda-layer/terraform/lambda/layer.tf
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
locals {
sdk_layer_arns = {
"ap-south-1" = "arn:aws:lambda:ap-south-1:615299751070:layer:AWSOpenTelemetryDistroPythonBeta:2"
"eu-south-1" = "arn:aws:lambda:eu-south-1:257394471194:layer:AWSOpenTelemetryDistroPythonBeta:16"
"us-west-2" = "arn:aws:lambda:us-west-2:615299751070:layer:AWSOpenTelemetryDistroPythonBeta:18"
}
}
Loading