Skip to content

Commit

Permalink
Test
Browse files Browse the repository at this point in the history
  • Loading branch information
harrryr committed Sep 9, 2024
1 parent 4636b6a commit 23b7f8a
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/java-k8s-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ jobs:

- uses: actions/checkout@v4
with:
repository: 'aws-observability/aws-application-signals-test-framework'
repository: 'harrryr/aws-application-signals-test-framework'
ref: ${{ env.CALLER_WORKFLOW_NAME == 'main-build' && 'main' || github.ref }}
fetch-depth: 0

Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
## Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
## SPDX-License-Identifier: Apache-2.0

## This workflow aims to run the Application Signals end-to-end tests as a canary to
## test the artifacts for App Signals enablement. It will deploy the CloudWatch Agent
## Operator and our sample app and remote service onto a native K8s cluster, call the
## APIs, and validate the generated telemetry, including logs, metrics, and traces.
## It will then clean up the cluster and EC2 instance it runs on for the next test run.
name: Java K8s Enablement Canary Testing
on:
push:

permissions:
id-token: write
contents: read

jobs:
k8s:
uses: ./.github/workflows/java-k8s-retry.yml
secrets: inherit
with:
# To run in more regions, a cluster must be provisioned manually on EC2 instances in that region
aws-region: 'us-east-1'
caller-workflow-name: 'appsignals-e2e-k8s-canary-test'
9 changes: 5 additions & 4 deletions terraform/java/k8s/deploy/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,11 @@ resource "null_resource" "deploy" {
# Clone and install operator onto cluster
echo "LOG: Cloning helm-charts repo"
git clone https://github.com/aws-observability/helm-charts -q
cd helm-charts/charts/amazon-cloudwatch-observability/
git reset --hard e0e99c77f69ef388b0ffce769371f7c735a776e4
latest_version_url=$(curl -s https://api.github.com/repos/aws-observability/helm-charts/releases/latest | grep "tarball_url" | cut -d '"' -f 4)
echo "LOG: The latest helm chart version url is $latest_version_url"
curl -L $latest_version_url -o aws-observability-helm-charts-latest.tar.gz
tar -xvzf aws-observability-helm-charts-latest.tar.gz -C aws-observability-helm-charts-latest
cd aws-observability-helm-charts-latest
echo "LOG: Installing CloudWatch Agent Operator using Helm"
helm upgrade --install --debug --namespace amazon-cloudwatch amazon-cloudwatch-operator ./ --create-namespace --set region=${var.aws_region} --set clusterName=k8s-cluster-${var.test_id}
Expand Down

0 comments on commit 23b7f8a

Please sign in to comment.