Skip to content

Commit e38b16f

Browse files
committed
add workflow to run ec2 canary with different node versions
1 parent 5a9c747 commit e38b16f

File tree

3 files changed

+66
-1
lines changed

3 files changed

+66
-1
lines changed

.github/workflows/node-ec2-default-retry.yml

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ on:
1414
caller-workflow-name:
1515
required: true
1616
type: string
17+
node-version:
18+
description: "Currently support version 14, 16, 18, 20, 22"
19+
required: false
20+
type: string
21+
# 'none' means to use the node version come with the OS
22+
default: 'none'
23+
cpu-architecture:
24+
description: "Permitted values: x86_64 or arm64"
25+
required: false
26+
type: string
27+
default: "x86_64"
1728

1829
permissions:
1930
id-token: write
@@ -26,6 +37,8 @@ jobs:
2637
with:
2738
aws-region: ${{ inputs.aws-region }}
2839
caller-workflow-name: ${{ inputs.caller-workflow-name }}
40+
node-version: ${{ inputs.node-version }}
41+
cpu-architecture: ${{ inputs.cpu-architecture }}
2942

3043
node-ec2-default-attempt-2:
3144
needs: [ node-ec2-default-attempt-1 ]
@@ -35,6 +48,8 @@ jobs:
3548
with:
3649
aws-region: ${{ inputs.aws-region }}
3750
caller-workflow-name: ${{ inputs.caller-workflow-name }}
51+
node-version: ${{ inputs.node-version }}
52+
cpu-architecture: ${{ inputs.cpu-architecture }}
3853

3954
publish-metric-attempt-1:
4055
needs: [ node-ec2-default-attempt-1, node-ec2-default-attempt-2 ]

.github/workflows/node-ec2-default-test.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,17 @@ on:
1414
caller-workflow-name:
1515
required: true
1616
type: string
17+
node-version:
18+
description: "Currently support version 14, 16, 18, 20, 22"
19+
required: false
20+
type: string
21+
# 'none' means to use the node version come with the OS
22+
default: 'none'
23+
cpu-architecture:
24+
description: "Permitted values: x86_64 or arm64"
25+
required: false
26+
type: string
27+
default: "x86_64"
1728
staging-instrumentation-name:
1829
required: false
1930
default: '@aws/aws-distro-opentelemetry-node-autoinstrumentation'
@@ -31,6 +42,8 @@ permissions:
3142
env:
3243
E2E_TEST_AWS_REGION: ${{ inputs.aws-region }}
3344
CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }}
45+
NODE_VERSION: ${{ inputs.node-version }}
46+
CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }}
3447
ADOT_INSTRUMENTATION_NAME: ${{ inputs.staging-instrumentation-name }}
3548
SAMPLE_APP_ZIP: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/node-sample-app.zip
3649
E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }}
@@ -52,7 +65,7 @@ jobs:
5265
run: echo "job-started=true" >> $GITHUB_OUTPUT
5366

5467
- name: Generate testing id
55-
run: echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV
68+
run: echo TESTING_ID="${{ github.job }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}-${{ inputs.node-version }}" >> $GITHUB_ENV
5669

5770
- uses: actions/checkout@v4
5871
with:
@@ -142,6 +155,8 @@ jobs:
142155
-var="sample_app_zip=${{ env.SAMPLE_APP_ZIP }}" \
143156
-var="get_cw_agent_rpm_command=${{ env.GET_CW_AGENT_RPM_COMMAND }}" \
144157
-var="get_adot_instrumentation_command=${{ env.GET_ADOT_INSTRUMENTATION_COMMAND }}" \
158+
-var="language_version=${{ env.NODE_VERSION }}" \
159+
-var="cpu_architecture=${{ env.CPU_ARCHITECTURE }}" \
145160
|| deployment_failed=$?
146161
147162
if [ $deployment_failed -eq 1 ]; then
Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
2+
## SPDX-License-Identifier: Apache-2.0
3+
4+
## This workflow aims to run the Application Signals end-to-end tests as a canary to
5+
## test the artifacts for App Signals enablement. It will deploy a sample app and remote
6+
## service on two EC2 instances, call the APIs, and validate the generated telemetry,
7+
## including logs, metrics, and traces.
8+
name: Node EC2 Enablement Release Testing
9+
on:
10+
push:
11+
branches:
12+
- add-node-tests
13+
# workflow_dispatch: # be able to run the workflow on demand
14+
15+
permissions:
16+
id-token: write
17+
contents: read
18+
19+
jobs:
20+
default:
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
# aws-region: ['af-south-1','ap-east-1','ap-northeast-1','ap-northeast-2','ap-northeast-3','ap-south-1','ap-south-2','ap-southeast-1',
25+
# 'ap-southeast-2','ap-southeast-3','ap-southeast-4','ca-central-1','eu-central-1','eu-central-2','eu-north-1',
26+
# 'eu-south-1','eu-south-2','eu-west-1','eu-west-2','eu-west-3','il-central-1','me-central-1','me-south-1', 'sa-east-1',
27+
# 'us-east-1','us-east-2', 'us-west-1', 'us-west-2']
28+
node-version: [ '14', '16' ] #, '18', '20', '22' ]
29+
uses: ./.github/workflows/node-ec2-default-retry.yml
30+
secrets: inherit
31+
with:
32+
aws-region: 'us-east-1'
33+
node-version: ${{ matrix.node-version }}
34+
cpu-architecture: 'x86_64'
35+
caller-workflow-name: 'test-nodejs'

0 commit comments

Comments
 (0)