39
39
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 }}
40
40
METRIC_NAMESPACE : AppSignals
41
41
LOG_GROUP_NAME : /aws/appsignals/eks
42
- TEST_RESOURCES_FOLDER : /home/runner/work /aws-application-signals-test-framework/aws-application-signals-test-framework
42
+ TEST_RESOURCES_FOLDER : /__w /aws-application-signals-test-framework/aws-application-signals-test-framework
43
43
44
44
jobs :
45
45
e2e-eks-test :
46
46
runs-on : ubuntu-latest
47
+ container :
48
+ image : public.ecr.aws/h6o3z5z9/aws-application-signals-test-framework-workflow-container:latest
47
49
steps :
48
50
- uses : actions/checkout@v4
49
51
with :
86
88
role-to-assume : arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }}
87
89
aws-region : ${{ inputs.aws-region }}
88
90
89
- # local directory to store the kubernetes config
90
- - name : Create kubeconfig directory
91
- run : mkdir -p ${{ github.workspace }}/.kube
92
-
93
- - name : Set KUBECONFIG environment variable
94
- run : echo KUBECONFIG="${{ github.workspace }}/.kube/config" >> $GITHUB_ENV
95
-
96
91
- name : Set up kubeconfig
97
92
run : aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}
98
93
99
- - name : Download and install eksctl
100
- uses : ./.github/workflows/actions/execute_and_retry
101
- with :
102
- pre-command : ' mkdir ${{ github.workspace }}/eksctl'
103
- command : ' curl -sLO "https://github.com/weaveworks/eksctl/releases/latest/download/eksctl_Linux_amd64.tar.gz"
104
- && tar -xzf eksctl_Linux_amd64.tar.gz -C ${{ github.workspace }}/eksctl && rm eksctl_Linux_amd64.tar.gz'
105
- cleanup : ' rm -f eksctl_Linux_amd64.tar.gz'
106
-
107
94
- name : Add eksctl to Github Path
108
95
run : |
109
96
echo "${{ github.workspace }}/eksctl" >> $GITHUB_PATH
@@ -121,13 +108,6 @@ jobs:
121
108
--region ${{ inputs.aws-region }} \
122
109
--approve"
123
110
124
- - name : Set up terraform
125
- uses : ./.github/workflows/actions/execute_and_retry
126
- with :
127
- command : " wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
128
- 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
129
- && sudo apt update && sudo apt install terraform'
130
-
131
111
- name : Initiate Terraform
132
112
uses : ./.github/workflows/actions/execute_and_retry
133
113
with :
@@ -166,7 +146,7 @@ jobs:
166
146
# If the deployment_failed is still 0, then the terraform deployment succeeded and now try to connect to the endpoint
167
147
# after installing App Signals. Attempts to connect will be made for up to 10 minutes
168
148
if [ $deployment_failed -eq 0 ]; then
169
- source ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
149
+ . ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
170
150
execute_and_retry 2 \
171
151
"${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/enable-app-signals.sh \
172
152
${{ inputs.test-cluster-name }} \
@@ -277,13 +257,6 @@ jobs:
277
257
curl -S -s http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }}/
278
258
curl -S -s http://${{ env.APP_ENDPOINT }}/client-call/
279
259
280
- - name : Build Gradlew
281
- uses : ./.github/workflows/actions/execute_and_retry
282
- with :
283
- max_retry : 2
284
- command : " ./gradlew"
285
- cleanup : " ./gradlew clean"
286
-
287
260
# Validation for app signals telemetry data
288
261
- name : Call endpoint and validate generated EMF logs
289
262
id : log-validation
@@ -340,7 +313,7 @@ jobs:
340
313
- name : Publish metric on test result
341
314
if : always()
342
315
run : |
343
- if [[ "${{ steps.log-validation.outcome }}" == "success" && "${{ steps.metric-validation.outcome }}" == "success" && "${{ steps.trace-validation.outcome }}" == "success" ] ]; then
316
+ if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then
344
317
aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \
345
318
--metric-name Failure \
346
319
--dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \
0 commit comments