File tree Expand file tree Collapse file tree 3 files changed +72
-4
lines changed
actions/lambda_artifacts_build Expand file tree Collapse file tree 3 files changed +72
-4
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Push aws-opentelemetry-python-distro Layer
2
+ description : |
3
+ This action assumes that the repo was checked out. Builds and push Lambda Layer and sample app to S3 bucket for
4
+ the further end to end tests.
5
+
6
+ inputs :
7
+ aws-region :
8
+ required : false
9
+ description : " AWS Region, required only if push_image is true"
10
+ snapshot-ecr-role :
11
+ required : false
12
+ description : " IAM Role used for pushing to snapshot ecr, required only if push_image is true"
13
+ python_version :
14
+ required : true
15
+ description : " The python version used in actions"
16
+ layer_directory :
17
+ required : true
18
+ description : ' The role use to publish lambda layer'
19
+ staging_s3_bucket :
20
+ required : true
21
+ description : ' S3 bucket holds SDK artifact tarball'
22
+ os :
23
+ required : true
24
+ description : " The os"
25
+
26
+
27
+ runs :
28
+ using : " composite"
29
+ steps :
30
+ - name : Build sample lambda function
31
+ shell : bash
32
+ working-directory : ${{ inputs.layer_directory }}/sample-apps
33
+ run : ./package-lambda-function.sh
34
+ - name : Build layers
35
+ shell : bash
36
+ working-directory : ${{ inputs.layer_directory }}/src
37
+ run : |
38
+ ./build-lambda-layer.sh
39
+ pip install tox
40
+ tox
41
+ - name : Upload Layer to S3
42
+ shell : bash
43
+ run : |
44
+ aws s3 cp ./build/aws-opentelemetry-python-layer.zip s3://${{ inputs.staging_s3_bucket }}/layer-${{ github.run_id }}.zip
45
+ working-directory : ${{ inputs.layer_directory }}/src
46
+ - name : Upload Sample App to S3
47
+ shell : bash
48
+ run : |
49
+ aws s3 cp ./build/function.zip s3://${{ inputs.staging_s3_bucket }}/function-${{ github.run_id }}.zip
50
+ working-directory : ${{ inputs.layer_directory }}/sample-apps
Original file line number Diff line number Diff line change @@ -100,7 +100,7 @@ jobs:
100
100
python-version : ' 3.12'
101
101
cpu-architecture : ' x86_64'
102
102
staging-wheel-name : ${{ inputs.staging-wheel-name }}
103
-
103
+
104
104
#
105
105
# DOCKER DISTRIBUTION LANGUAGE VERSION COVERAGE
106
106
# DEFAULT SETTING: {Python Version}, EKS, AMD64, AL2
@@ -174,7 +174,7 @@ jobs:
174
174
caller-workflow-name : ' main-build'
175
175
python-version : ' 3.9'
176
176
staging-wheel-name : ${{ inputs.staging-wheel-name }}
177
-
177
+
178
178
#
179
179
# DOCKER DISTRIBUTION PLATFORM COVERAGE
180
180
# DEFAULT SETTING: Python 3.10, {Platform}, AMD64, AL2
@@ -215,5 +215,12 @@ jobs:
215
215
cpu-architecture : ' arm64'
216
216
staging-wheel-name : ${{ inputs.staging-wheel-name }}
217
217
218
-
219
-
218
+ #
219
+ # Lambda layer integration tests
220
+ lambda :
221
+ uses : aws-observability/aws-application-signals-test-framework/.github/workflows/python-lambda-test.yml@main
222
+ secrets : inherit
223
+ with :
224
+ aws-region : us-east-1
225
+ python-version : ' 3.12'
226
+ caller-workflow-name : ' main-build'
Original file line number Diff line number Diff line change 5
5
branches :
6
6
- main
7
7
- " release/v*"
8
+ - ci-workflow
8
9
workflow_dispatch : # be able to run the workflow on demand
9
10
env :
10
11
AWS_DEFAULT_REGION : us-east-1
71
72
cd ./dist
72
73
cp aws_opentelemetry_distro-${{ steps.python_output.outputs.ADOT_PYTHON_VERSION}}-py3-none-any.whl $staging_wheel
73
74
75
+ - name : Build and Publish Lambda Staging Layer
76
+ uses : ./.github/actions/lambda_artifacts_build
77
+ with :
78
+ aws-region : ${{ env.AWS_DEFAULT_REGION }}
79
+ snapshot-ecr-role : ${{ secrets.AWS_ASSUME_ROLE_ARN }}
80
+ python_version : " 3.12"
81
+ layer_directory : lambda-layer
82
+ staging_s3_bucket : ${{ env.STAGING_S3_BUCKET }}
83
+ os : ubuntu-latest
84
+
74
85
- name : Upload wheel to S3
75
86
run : |
76
87
aws s3 cp dist/${{ steps.staging_wheel_output.outputs.STAGING_WHEEL}} s3://${{ env.STAGING_S3_BUCKET }}
You can’t perform that action at this time.
0 commit comments