Skip to content
Merged
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
50 changes: 50 additions & 0 deletions .github/actions/lambda_artifacts_build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build and Push aws-opentelemetry-python-distro Layer
description: |
This action assumes that the repo was checked out. Builds and push Lambda Layer and sample app to S3 bucket for
the further end to end tests.

inputs:
aws-region:
required: false
description: "AWS Region, required only if push_image is true"
snapshot-ecr-role:
required: false
description: "IAM Role used for pushing to snapshot ecr, required only if push_image is true"
python_version:
required: true
description: "The python version used in actions"
layer_directory:
required: true
description: 'The role use to publish lambda layer'
staging_s3_bucket:
required: true
description: 'S3 bucket holds SDK artifact tarball'
os:
required: true
description: "The os"


runs:
using: "composite"
steps:
- name: Build sample lambda function
shell: bash
working-directory: ${{ inputs.layer_directory }}/sample-apps
run: ./package-lambda-function.sh
- name: Build layers
shell: bash
working-directory: ${{ inputs.layer_directory }}/src
run: |
./build-lambda-layer.sh
pip install tox
tox
- name: Upload Layer to S3
shell: bash
run: |
aws s3 cp ./build/aws-opentelemetry-python-layer.zip s3://${{ inputs.staging_s3_bucket }}/layer-${{ github.run_id }}.zip
working-directory: ${{ inputs.layer_directory }}/src
- name: Upload Sample App to S3
shell: bash
run: |
aws s3 cp ./build/function.zip s3://${{ inputs.staging_s3_bucket }}/function-${{ github.run_id }}.zip
working-directory: ${{ inputs.layer_directory }}/sample-apps
15 changes: 11 additions & 4 deletions .github/workflows/application-signals-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ jobs:
python-version: '3.12'
cpu-architecture: 'x86_64'
staging-wheel-name: ${{ inputs.staging-wheel-name }}

#
# DOCKER DISTRIBUTION LANGUAGE VERSION COVERAGE
# DEFAULT SETTING: {Python Version}, EKS, AMD64, AL2
Expand Down Expand Up @@ -174,7 +174,7 @@ jobs:
caller-workflow-name: 'main-build'
python-version: '3.9'
staging-wheel-name: ${{ inputs.staging-wheel-name }}

#
# DOCKER DISTRIBUTION PLATFORM COVERAGE
# DEFAULT SETTING: Python 3.10, {Platform}, AMD64, AL2
Expand Down Expand Up @@ -215,5 +215,12 @@ jobs:
cpu-architecture: 'arm64'
staging-wheel-name: ${{ inputs.staging-wheel-name }}



#
# Lambda layer integration tests
lambda:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/python-lambda-test.yml@main
secrets: inherit
with:
aws-region: us-east-1
python-version: '3.12'
caller-workflow-name: 'main-build'
11 changes: 11 additions & 0 deletions .github/workflows/main_build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ on:
branches:
- main
- "release/v*"
- ci-workflow
workflow_dispatch: # be able to run the workflow on demand
env:
AWS_DEFAULT_REGION: us-east-1
Expand Down Expand Up @@ -71,6 +72,16 @@ jobs:
cd ./dist
cp aws_opentelemetry_distro-${{ steps.python_output.outputs.ADOT_PYTHON_VERSION}}-py3-none-any.whl $staging_wheel

- name: Build and Publish Lambda Staging Layer
uses: ./.github/actions/lambda_artifacts_build
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
snapshot-ecr-role: ${{ secrets.AWS_ASSUME_ROLE_ARN }}
python_version: "3.12"
layer_directory: lambda-layer
staging_s3_bucket: ${{ env.STAGING_S3_BUCKET }}
os: ubuntu-latest

- name: Upload wheel to S3
run: |
aws s3 cp dist/${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}} s3://${{ env.STAGING_S3_BUCKET }}
Expand Down
Loading