Skip to content

Commit

Permalink
Remove existing testing resources and update e2e testing
Browse files Browse the repository at this point in the history
  • Loading branch information
harryryu committed Feb 23, 2024
1 parent 0e4ed13 commit fa70d29
Show file tree
Hide file tree
Showing 90 changed files with 11 additions and 7,929 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/appsignals-e2e-ec2-canary-test.yml

This file was deleted.

49 changes: 6 additions & 43 deletions .github/workflows/appsignals-e2e-ec2-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,30 +23,20 @@ env:
TEST_ACCOUNT: ${{ secrets.APP_SIGNALS_E2E_TEST_ACC }}
SAMPLE_APP_FRONTEND_SERVICE_JAR: ${{ secrets.APP_SIGNALS_E2E_FE_SA_JAR }}
SAMPLE_APP_REMOTE_SERVICE_JAR: ${{ secrets.APP_SIGNALS_E2E_RE_SA_JAR }}
APP_SIGNALS_ADOT_JAR: "https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar"
GET_CW_AGENT_RPM_COMMAND: "wget -O cw-agent.rpm https://amazoncloudwatch-agent-us-east-1.s3.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm"
GET_ADOT_JAR_COMMAND: "aws s3 cp s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar ./adot.jar"
METRIC_NAMESPACE: AppSignals
LOG_GROUP_NAME: /aws/appsignals/generic

jobs:
e2e-ec2-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get testing resources from aws-application-signals-test-framework
uses: actions/checkout@v4
with:
fetch-depth: 0

- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: Set CW Agent RPM environment variable
run: |
if [ ${{ env.AWS_DEFAULT_REGION }} == "us-east-1" ]; then
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-us-east-1.s3.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
else
echo GET_CW_AGENT_RPM_COMMAND="wget -O cw-agent.rpm https://amazoncloudwatch-agent-${{ env.AWS_DEFAULT_REGION }}.s3.${{ env.AWS_DEFAULT_REGION }}.amazonaws.com/amazon_linux/amd64/1.300031.0b313/amazon-cloudwatch-agent.rpm" >> $GITHUB_ENV
fi
repository: aws-observability/aws-application-signals-test-framework
ref: main

- name: Generate testing id
run: echo TESTING_ID="${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV
Expand All @@ -58,23 +48,12 @@ jobs:
aws-region: ${{ env.AWS_DEFAULT_REGION }}

- uses: actions/download-artifact@v3
if: inputs.caller-workflow-name == 'main-build'
with:
name: aws-opentelemetry-agent.jar

- name: Upload main-build adot.jar to s3
if: inputs.caller-workflow-name == 'main-build'
run: aws s3 cp ./aws-opentelemetry-agent-*-SNAPSHOT.jar s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar

- name: Set Get ADOT.jar command environment variable
working-directory: testing/terraform/ec2
run: |
if [ ${{ inputs.caller-workflow-name }} == "main-build" ]; then
echo GET_ADOT_JAR_COMMAND="aws s3 cp s3://main-build-adot-staging-jar/aws-opentelemetry-agent.jar ./adot.jar" >> $GITHUB_ENV
else
echo GET_ADOT_JAR_COMMAND="wget -O adot.jar https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" >> $GITHUB_ENV
fi
- name: Set up terraform
uses: hashicorp/setup-terraform@v3
with:
Expand Down Expand Up @@ -147,22 +126,6 @@ jobs:
fi
done
# cache local patch outputs
- name: Cache local Maven repository
id: cache-local-maven-repo
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}

- name: Publish patched dependencies to maven local
uses: ./.github/actions/patch-dependencies
if: steps.cache-local-maven-repo.outputs.cache-hit != 'true'
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_password: ${{ secrets.GPG_PASSPHRASE }}

- name: Get the ec2 instance ami id
run: |
echo "EC2_INSTANCE_AMI=$(terraform output ec2_instance_ami)" >> $GITHUB_ENV
Expand Down
30 changes: 0 additions & 30 deletions .github/workflows/appsignals-e2e-eks-canary-test.yml

This file was deleted.

29 changes: 5 additions & 24 deletions .github/workflows/appsignals-e2e-eks-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
required: true
type: string
appsignals-adot-image-name:
required: false
required: true
type: string
caller-workflow-name:
required: true
Expand All @@ -38,9 +38,11 @@ jobs:
e2e-eks-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Get testing resources from aws-application-signals-test-framework
uses: actions/checkout@v4
with:
fetch-depth: 0
repository: aws-observability/aws-application-signals-test-framework
ref: main

- name: Download enablement script
uses: actions/checkout@v4
Expand All @@ -60,11 +62,6 @@ jobs:
delete_log_group="aws logs delete-log-group --log-group-name '${{ env.LOG_GROUP_NAME }}' --region \$REGION"
sed -i "s#$delete_log_group##g" clean-app-signals.sh
- uses: actions/setup-java@v4
with:
java-version: 17
distribution: temurin

- name: Generate testing id
run: echo TESTING_ID="${{ env.AWS_DEFAULT_REGION }}-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV

Expand Down Expand Up @@ -227,22 +224,6 @@ jobs:
kubectl get pods -n amazon-cloudwatch --output json | \
jq '.items[0].status.containerStatuses[0].imageID'
# cache local patch outputs
- name: Cache local Maven repository
id: cache-local-maven-repo
uses: actions/cache@v3
with:
path: |
~/.m2/repository/io/opentelemetry/
key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }}

- name: Publish patched dependencies to maven local
uses: ./.github/actions/patch-dependencies
if: steps.cache-local-maven-repo.outputs.cache-hit != 'true'
with:
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
gpg_password: ${{ secrets.GPG_PASSPHRASE }}

- name: Get the sample app endpoint
run: echo "APP_ENDPOINT=$(terraform output sample_app_endpoint)" >> $GITHUB_ENV
working-directory: testing/terraform/eks
Expand Down
111 changes: 0 additions & 111 deletions testing/README.md

This file was deleted.

38 changes: 0 additions & 38 deletions testing/sample-apps/README.md

This file was deleted.

Loading

0 comments on commit fa70d29

Please sign in to comment.