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
52 changes: 52 additions & 0 deletions .github/actions/lambda_artifacts_build/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build and Push Staging AWSOpenTelemetryDistroJs 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'
node_version:
required: true
description: 'The node 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'
staging_tarball:
required: true
description: 'tarball file for building'

runs:
using: 'composite'
steps:
- name: Download Tarball to GitHub Actions
uses: actions/download-artifact@v3
with:
name: ${{ inputs.staging_tarball}}
path: ./aws-distro-opentelemetry-node-autoinstrumentation/
- name: Setup Layer Tools
shell: bash
run: npm install
working-directory: ${{ inputs.layer_directory }}
- name: Build Lambda Layer
shell: bash
run: npm install
working-directory: ${{ inputs.layer_directory }}/packages/layer
- name: Build Lambda Sample App
shell: bash
run: npm install
working-directory: ${{ inputs.layer_directory }}/sample-apps/aws-sdk
- name: Upload Layer to S3
shell: bash
run: |
aws s3 cp ./build/layer.zip s3://${{ env.STAGING_S3_BUCKET }}/layer-${{ github.run_id }}.zip
working-directory: ${{ inputs.layer_directory }}/packages/layer
- name: Upload Sample App to S3
shell: bash
run: |
aws s3 cp ./build/function.zip s3://${{ env.STAGING_S3_BUCKET }}/function-${{ github.run_id }}.zip
working-directory: ${{ inputs.layer_directory }}/sample-apps/aws-sdk
6 changes: 6 additions & 0 deletions .github/workflows/application-signals-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,3 +75,9 @@ jobs:
aws-region: us-east-1
adot-image-name: ${{ inputs.adot-image-name }}
caller-workflow-name: 'main-build'

lambda:
uses: aws-observability/aws-application-signals-test-framework/.github/workflows/node-lambda-test.yml@main
with:
aws-region: us-east-1
caller-workflow-name: 'main-build'
9 changes: 9 additions & 0 deletions .github/workflows/main-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,15 @@ jobs:
with:
name: ${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
path: aws-distro-opentelemetry-node-autoinstrumentation/${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}

- name: Build and Publish Lambda Staging Layer
uses: ./.github/actions/lambda_artifacts_build
with:
aws-region: ${{ env.AWS_DEFAULT_REGION }}
node_version: "20"
layer_directory: lambda-layer
staging_s3_bucket: ${{ env.STAGING_S3_BUCKET }}
staging_tarball: ${{ steps.staging_tarball_output.outputs.STAGING_TARBALL}}
# TODO - implement contract tests in NodeJS
# - name: Set up and run contract tests with pytest
# run: |
Expand Down
2 changes: 2 additions & 0 deletions .github/workflows/pr-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,8 @@ jobs:
run: npm ci
- name: Compile all NPM projects
run: npm run compile
- name: Build Lambda Layer
run: npm run build-lambda
- name: Unit tests (Full)
run: npm run test:coverage
- name: Report Coverage
Expand Down
Loading
Loading