Skip to content

Commit 4b6e097

Browse files
committed
Test
1 parent 466f608 commit 4b6e097

File tree

5 files changed

+43
-13
lines changed

5 files changed

+43
-13
lines changed

.github/workflows/actions/execute_and_retry/action.yml

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
1-
# This function is for retrying commands in the case they fail. It accepts three arguments
2-
# $1: Number of retries it will attempt
3-
# $2: Command to execute
4-
# $3: (Optional) Command for cleaning up resources if $2 fails
51
name: Command Retry Logic
62

73
inputs:
@@ -31,7 +27,6 @@ runs:
3127
PRE_COMMAND: ${{ inputs.pre-command }}
3228
run: |
3329
$PRE_COMMAND
34-
pwd
3530
3631
- name: Run command
3732
shell: bash
@@ -40,7 +35,6 @@ runs:
4035
COMMAND: ${{ inputs.command }}
4136
CLEANUP: ${{ inputs.cleanup }}
4237
run: |
43-
pwd
4438
retry_counter=0
4539
while [ $retry_counter -lt $MAX_RETRY ]; do
4640
attempt_failed=0

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
with:
7070
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
7171
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list \
72-
sudo apt update && sudo apt install terraform'
72+
sudo apt update && sudo apt install terraform'
7373

7474
- name: Initiate Terraform
7575
uses: ./.github/workflows/actions/execute_and_retry

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ jobs:
123123
with:
124124
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
125125
post-command: 'echo "deb [signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main" | sudo tee /etc/apt/sources.list.d/hashicorp.list \
126-
sudo apt update && sudo apt install terraform'
126+
sudo apt update && sudo apt install terraform'
127127

128128
- name: Initiate Terraform
129129
uses: ./.github/workflows/actions/execute_and_retry

.github/workflows/test.yml

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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:
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+
28+
e2e-eks-test:
29+
strategy:
30+
fail-fast: false
31+
matrix:
32+
aws-region: ['us-east-1']
33+
uses: ./.github/workflows/appsignals-e2e-eks-test.yml
34+
secrets: inherit
35+
with:
36+
aws-region: ${{ matrix.aws-region }}
37+
test-cluster-name: 'e2e-playground'
38+
caller-workflow-name: "test"

.github/workflows/util/execute_and_retry.sh

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,5 @@
1+
#!/bin/bash
2+
13
# This function is for retrying commands in the case they fail. It accepts three arguments
24
# $1: Number of retries it will attempt
35
# $2: Command to execute
@@ -26,8 +28,4 @@ execute_and_retry () {
2628
done
2729
}
2830

29-
export -f execute_and_retry
30-
31-
32-
33-
31+
export -f execute_and_retry

0 commit comments

Comments
 (0)