Skip to content

Commit 6c9cb6a

Browse files
committed
Test
1 parent 61a4b73 commit 6c9cb6a

File tree

3 files changed

+92
-8
lines changed

3 files changed

+92
-8
lines changed

.github/workflows/appsignals-e2e-eks-test.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -159,15 +159,15 @@ jobs:
159159
${{ inputs.test-cluster-name }} \
160160
${{ inputs.aws-region }} \
161161
${{ env.SAMPLE_APP_NAMESPACE }}" \
162-
60 \
163162
"${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/clean-app-signals.sh \
164163
${{ inputs.test-cluster-name }} \
165164
${{ inputs.aws-region }} \
166165
${{ env.SAMPLE_APP_NAMESPACE }} && \
167-
aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}"
166+
aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}" \
167+
60
168168
169-
execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" 60
170-
execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" 10
169+
execute_and_retry 2 "kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 60
170+
execute_and_retry 2 "kubectl wait --for=condition=Ready --request-timeout '5m' pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}" "" 10
171171
172172
echo "Attempting to connect to the main sample app endpoint"
173173
main_sample_app_endpoint=http://$(terraform output sample_app_endpoint)

.github/workflows/test 4.yml

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
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: Test
9+
on:
10+
push:
11+
12+
permissions:
13+
id-token: write
14+
contents: read
15+
16+
jobs:
17+
e2e-ec2-test-1:
18+
strategy:
19+
fail-fast: false
20+
matrix:
21+
aws-region: ['us-east-1']
22+
uses: ./.github/workflows/appsignals-e2e-ec2-test.yml
23+
secrets: inherit
24+
with:
25+
aws-region: ${{ matrix.aws-region }}
26+
caller-workflow-name: 'test'
27+
e2e-ec2-test-2:
28+
needs: [e2e-ec2-test-1]
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
aws-region: [ 'us-east-1' ]
33+
uses: ./.github/workflows/appsignals-e2e-ec2-test.yml
34+
secrets: inherit
35+
with:
36+
aws-region: ${{ matrix.aws-region }}
37+
caller-workflow-name: 'test'
38+
e2e-ec2-test-3:
39+
needs: [e2e-ec2-test-2]
40+
strategy:
41+
fail-fast: false
42+
matrix:
43+
aws-region: [ 'us-east-1' ]
44+
uses: ./.github/workflows/appsignals-e2e-ec2-test.yml
45+
secrets: inherit
46+
with:
47+
aws-region: ${{ matrix.aws-region }}
48+
caller-workflow-name: 'test'
49+
50+
e2e-eks-test-1:
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
aws-region: ['us-east-1']
55+
uses: ./.github/workflows/appsignals-e2e-eks-test.yml
56+
secrets: inherit
57+
with:
58+
aws-region: ${{ matrix.aws-region }}
59+
test-cluster-name: 'e2e-playground'
60+
caller-workflow-name: "test"
61+
e2e-eks-test-2:
62+
needs: [e2e-eks-test-1]
63+
strategy:
64+
fail-fast: false
65+
matrix:
66+
aws-region: ['us-east-1']
67+
uses: ./.github/workflows/appsignals-e2e-eks-test.yml
68+
secrets: inherit
69+
with:
70+
aws-region: ${{ matrix.aws-region }}
71+
test-cluster-name: 'e2e-playground'
72+
caller-workflow-name: "test"
73+
e2e-eks-test-3:
74+
needs: [e2e-eks-test-2]
75+
strategy:
76+
fail-fast: false
77+
matrix:
78+
aws-region: ['us-east-1']
79+
uses: ./.github/workflows/appsignals-e2e-eks-test.yml
80+
secrets: inherit
81+
with:
82+
aws-region: ${{ matrix.aws-region }}
83+
test-cluster-name: 'e2e-playground'
84+
caller-workflow-name: "test"

.github/workflows/util/execute_and_retry.sh

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,16 +3,16 @@
33
# This function is for retrying commands in the case they fail. It accepts three arguments
44
# $1: Number of retries it will attempt
55
# $2: Command to execute
6-
# $3: (Optional) Sleep time between run. Default value is 10 seconds
7-
# $4: (Optional) Command for cleaning up resources if $2 fails. If this variable needs to be used then the sleep time has to be defined first
6+
# $3: (Optional) Command for cleaning up resources if $2 fails.
7+
# $4: (Optional) Sleep time between run. Default value is 10 seconds
88
execute_and_retry () {
99
# Warning: The variables called in this function are not local and will be shared with the calling function.
1010
# Make sure that the variable names do not conflict
1111
execute_retry_counter=0
1212
max_execute_retry=$1
1313
command=$2
14-
sleep_time=$3
15-
cleanup=$4
14+
cleanup=$3
15+
sleep_time=$4
1616
echo "Initiating execute_and_retry.sh script for command $command"
1717
while [ $execute_retry_counter -lt $max_execute_retry ]; do
1818
echo "Attempt Number $execute_retry_counter for execute_and_retry.sh"

0 commit comments

Comments
 (0)