35
35
SAMPLE_APP_REMOTE_SERVICE_IMAGE : ${{ secrets.APP_SIGNALS_E2E_TEST_ACC }}.dkr.ecr.${{ inputs.aws-region }}.amazonawss.com/${{ secrets.APP_SIGNALS_E2E_RE_SA_IMG }}
36
36
METRIC_NAMESPACE : AppSignals
37
37
LOG_GROUP_NAME : /aws/appsignals/eks
38
+ TEST_RESOURCES_FOLDER : /home/runner/work/aws-application-signals-test-framework/aws-application-signals-test-framework
38
39
39
40
jobs :
40
41
e2e-eks-test :
95
96
96
97
- name : Install eksctl
97
98
run : |
99
+ source ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
98
100
mkdir ${{ github.workspace }}/eksctl
99
101
curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz"
100
- tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz
102
+ execute_and_retry 2 " tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz"
101
103
echo "${{ github.workspace }}/eksctl" >> $GITHUB_PATH
102
104
103
105
- name : Create role for AWS access from the sample app
@@ -113,17 +115,22 @@ jobs:
113
115
--approve
114
116
115
117
- name : Set up terraform
116
- uses : hashicorp/setup-terraform@v3
117
- with :
118
- terraform_wrapper : false
118
+ run : |
119
+ source ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
120
+ execute_and_retry 2 "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
121
+ 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
122
+ sudo apt update && sudo apt install terraform
123
+
124
+ - name : Initiate Terraform
125
+ working-directory : terraform/eks
126
+ run : |
127
+ source ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
128
+ execute_and_retry 2 "terraform init && terraform validate" "rm -rf .terraform && rm -rf .terraform.lock.hcl"
119
129
120
130
- name : Deploy sample app via terraform and wait for the endpoint to come online
121
131
id : deploy-sample-app
122
132
working-directory : terraform/eks
123
- run : |
124
- terraform init
125
- terraform validate
126
-
133
+ run : |
127
134
# Attempt to deploy the sample app on an EKS instance and wait for its endpoint to come online.
128
135
# There may be occasional failures due to transitivity issues, so try up to 2 times.
129
136
# deployment_failed of 0 indicates that both the terraform deployment and the endpoint are running, while 1 indicates
@@ -158,15 +165,6 @@ jobs:
158
165
${{ inputs.aws-region }} \
159
166
${{ env.SAMPLE_APP_NAMESPACE }}
160
167
161
- # If the workflow provides a specific ADOT image to test, patch the deployment and restart CW agent related pods
162
- if [ ${{ inputs.appsignals-adot-image-name }} != "" ]; then
163
- kubectl patch deploy -namazon-cloudwatch amazon-cloudwatch-observability-controller-manager --type='json' \
164
- -p='[{"op": "replace", "path": "/spec/template/spec/containers/0/args/0", "value": "--auto-instrumentation-java-image=${{ inputs.appsignals-adot-image-name }}"}]'
165
-
166
- kubectl delete pods --all -n amazon-cloudwatch
167
- kubectl wait --for=condition=Ready pod --all -n amazon-cloudwatch
168
- fi
169
-
170
168
kubectl delete pods --all -n ${{ env.SAMPLE_APP_NAMESPACE }}
171
169
kubectl wait --for=condition=Ready pod --all -n ${{ env.SAMPLE_APP_NAMESPACE }}
172
170
@@ -244,10 +242,15 @@ jobs:
244
242
- name : Call all test APIs
245
243
continue-on-error : true
246
244
run : |
247
- curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/outgoing-http-call/
248
- curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/aws-sdk-call/
249
- curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }}/
250
- curl -S -s -o /dev/null http://${{ env.APP_ENDPOINT }}/client-call/
245
+ curl -S -o /dev/null http://${{ env.APP_ENDPOINT }}/outgoing-http-call/
246
+ curl -S -o /dev/null http://${{ env.APP_ENDPOINT }}/aws-sdk-call/
247
+ curl -S -o /dev/null http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }}/
248
+ curl -S -o /dev/null http://${{ env.APP_ENDPOINT }}/client-call/
249
+
250
+ - name : Build Gradlew
251
+ run : |
252
+ source ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
253
+ execute_and_retry 2 "./gradlew"
251
254
252
255
# Validation for app signals telemetry data
253
256
- name : Call endpoint and validate generated EMF logs
0 commit comments