Skip to content

Commit 4557838

Browse files
authored
Merge pull request #35 from aws-observability/revert-33-build-docker-for-e2e
Revert "Run E2E Test in docker container with packages already installed"
2 parents 23ddb23 + 56bc628 commit 4557838

File tree

5 files changed

+48
-93
lines changed

5 files changed

+48
-93
lines changed

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

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,13 @@ env:
3131
LOG_GROUP_NAME: /aws/appsignals/generic
3232
TEST: ${{ inputs.test }}
3333
GET_ADOT_JAR_COMMAND: "wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar"
34-
TEST_RESOURCES_FOLDER: /__w/aws-application-signals-test-framework/aws-application-signals-test-framework
3534
GET_CW_AGENT_RPM_COMMAND: "wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ inputs.aws-region }}.s3.${{ inputs.aws-region }}.amazonaws.com/amazon_linux/amd64/latest/amazon-cloudwatch-agent.rpm"
35+
TEST_RESOURCES_FOLDER: /home/runner/work/aws-application-signals-test-framework/aws-application-signals-test-framework
36+
3637

3738
jobs:
3839
e2e-ec2-test:
3940
runs-on: ubuntu-latest
40-
container:
41-
image: ghcr.io/aws-observability/aws-application-signals-test-framework
42-
credentials:
43-
username: ${{ github.actor }}
44-
password: ${{ secrets.PAT_PACKAGE_READ_ACCESS_TOKEN }}
4541
steps:
4642
- uses: actions/checkout@v4
4743
with:
@@ -68,6 +64,13 @@ jobs:
6864
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }}
6965
aws-region: ${{ inputs.aws-region }}
7066

67+
- name: Set up terraform
68+
uses: ./.github/workflows/actions/execute_and_retry
69+
with:
70+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
71+
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'
73+
7174
- name: Initiate Terraform
7275
uses: ./.github/workflows/actions/execute_and_retry
7376
with:
@@ -173,6 +176,13 @@ jobs:
173176
curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/aws-sdk-call/
174177
curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_IP }}/
175178
curl -S -s http://${{ env.MAIN_SERVICE_ENDPOINT }}/client-call/
179+
180+
- name: Build Gradlew
181+
uses: ./.github/workflows/actions/execute_and_retry
182+
with:
183+
max_retry: 2
184+
command: "./gradlew"
185+
cleanup: "./gradlew clean"
176186

177187
# Validation for pulse telemetry data
178188
- name: Validate generated EMF logs

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

Lines changed: 31 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -35,17 +35,11 @@ env:
3535
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 }}
3636
METRIC_NAMESPACE: AppSignals
3737
LOG_GROUP_NAME: /aws/appsignals/eks
38-
TEST_RESOURCES_FOLDER: /__w/aws-application-signals-test-framework/aws-application-signals-test-framework
38+
TEST_RESOURCES_FOLDER: /home/runner/work/aws-application-signals-test-framework/aws-application-signals-test-framework
3939

4040
jobs:
4141
e2e-eks-test:
4242
runs-on: ubuntu-latest
43-
container:
44-
image: ghcr.io/aws-observability/aws-application-signals-test-framework
45-
credentials:
46-
username: ${{ github.actor }}
47-
password: ${{ secrets.PAT_PACKAGE_READ_ACCESS_TOKEN }}
48-
4943
steps:
5044
- uses: actions/checkout@v4
5145
with:
@@ -88,9 +82,24 @@ jobs:
8882
role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }}
8983
aws-region: ${{ inputs.aws-region }}
9084

85+
# local directory to store the kubernetes config
86+
- name: Create kubeconfig directory
87+
run: mkdir -p ${{ github.workspace }}/.kube
88+
89+
- name: Set KUBECONFIG environment variable
90+
run: echo KUBECONFIG="${{ github.workspace }}/.kube/config" >> $GITHUB_ENV
91+
9192
- name: Set up kubeconfig
9293
run: aws eks update-kubeconfig --name ${{ inputs.test-cluster-name }} --region ${{ inputs.aws-region }}
9394

95+
- name: Download and install eksctl
96+
uses: ./.github/workflows/actions/execute_and_retry
97+
with:
98+
pre-command: 'mkdir ${{ github.workspace }}/eksctl'
99+
command: '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'
101+
cleanup: 'rm -f eksctl_Linux_amd64.tar.gz'
102+
94103
- name: Add eksctl to Github Path
95104
run: |
96105
echo "${{ github.workspace }}/eksctl" >> $GITHUB_PATH
@@ -108,6 +117,13 @@ jobs:
108117
--region ${{ inputs.aws-region }} \
109118
--approve"
110119

120+
- name: Set up terraform
121+
uses: ./.github/workflows/actions/execute_and_retry
122+
with:
123+
command: "wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorp-archive-keyring.gpg"
124+
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
125+
&& sudo apt update && sudo apt install terraform'
126+
111127
- name: Initiate Terraform
112128
uses: ./.github/workflows/actions/execute_and_retry
113129
with:
@@ -146,7 +162,7 @@ jobs:
146162
# If the deployment_failed is still 0, then the terraform deployment succeeded and now try to connect to the endpoint
147163
# after installing App Signals. Attempts to connect will be made for up to 10 minutes
148164
if [ $deployment_failed -eq 0 ]; then
149-
. ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
165+
source ${{ env.TEST_RESOURCES_FOLDER }}/.github/workflows/util/execute_and_retry.sh
150166
execute_and_retry 2 \
151167
"${{ env.TEST_RESOURCES_FOLDER }}/enablement-script/enable-app-signals.sh \
152168
${{ inputs.test-cluster-name }} \
@@ -257,6 +273,13 @@ jobs:
257273
curl -S -s http://${{ env.APP_ENDPOINT }}/remote-service?ip=${{ env.REMOTE_SERVICE_POD_IP }}/
258274
curl -S -s http://${{ env.APP_ENDPOINT }}/client-call/
259275
276+
- name: Build Gradlew
277+
uses: ./.github/workflows/actions/execute_and_retry
278+
with:
279+
max_retry: 2
280+
command: "./gradlew"
281+
cleanup: "./gradlew clean"
282+
260283
# Validation for app signals telemetry data
261284
- name: Call endpoint and validate generated EMF logs
262285
id: log-validation

.github/workflows/e2e-test-docker-image-build.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/util/execute_and_retry.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,4 +30,4 @@ execute_and_retry () {
3030
done
3131
}
3232

33-
export VARIABLE=execute_and_retry
33+
export -f execute_and_retry

Dockerfile

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)