Skip to content

Commit

Permalink
Implement JMX E2E Tests in Testing Workflow (#1463)
Browse files Browse the repository at this point in the history
  • Loading branch information
musa-asad authored Dec 30, 2024
1 parent 03cbd6b commit ef15aa4
Show file tree
Hide file tree
Showing 3 changed files with 71 additions and 3 deletions.
72 changes: 69 additions & 3 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ jobs:
name: 'GenerateTestMatrix'
runs-on: ubuntu-latest
outputs:
eks_e2e_matrix: ${{ steps.set-matrix.outputs.eks_e2e_matrix }}
eks_e2e_jmx_matrix: ${{ steps.set-matrix.outputs.eks_e2e_jmx_matrix }}
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -144,8 +144,74 @@ jobs:
id: set-matrix
run: |
go run generator/test_case_generator.go -e2e
echo "::set-output name=eks_e2e_matrix::$(echo $(cat generator/resources/eks_e2e_complete_test_matrix.json))"
echo "::set-output name=eks_e2e_jmx_matrix::$(echo $(cat generator/resources/eks_e2e_jmx_complete_test_matrix.json))"
- name: Echo test plan matrix
run: |
echo "eks_e2e_matrix: ${{ steps.set-matrix.outputs.eks_e2e_matrix }}"
echo "eks_e2e_jmx_matrix: ${{ steps.set-matrix.outputs.eks_e2e_jmx_matrix }}"
EKSE2EJVMTomcatTest:
needs: [ GetLatestOperatorCommitSHA, GenerateTestMatrix, OutputEnvVariables ]
name: 'EKSE2EJVMTomcatTest'
uses: ./.github/workflows/eks-e2e-test.yml
with:
terraform_dir: terraform/eks/e2e
job_id: eks-e2e-jvm-tomcat-test
test_props: ${{ needs.GenerateTestMatrix.outputs.eks_e2e_jmx_matrix }}
test_repo_name: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_NAME }}
test_repo_url: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_URL }}
test_repo_branch: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}
cloudwatch_agent_repository: ${{ needs.OutputEnvVariables.outputs.ECR_INTEGRATION_TEST_REPO }}
cloudwatch_agent_tag: ${{ github.sha }}
cloudwatch_agent_operator_repository: ${{ needs.OutputEnvVariables.outputs.ECR_OPERATOR_REPO }}
cloudwatch_agent_operator_tag: ${{ needs.GetLatestOperatorCommitSHA.outputs.operator_commit_sha }}
region: ${{ inputs.region }}
helm_charts_branch: ${{ inputs.helm-charts-branch }}
terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
agent_config: resources/cwagent_configs/jvm_tomcat.json
sample_app: resources/sample_apps/tomcat.yaml
secrets: inherit

EKSE2EKafkaTest:
needs: [ GetLatestOperatorCommitSHA, GenerateTestMatrix, OutputEnvVariables ]
name: 'EKSE2EKafkaTest'
uses: ./.github/workflows/eks-e2e-test.yml
with:
terraform_dir: terraform/eks/e2e
job_id: eks-e2e-kafka-test
test_props: ${{ needs.GenerateTestMatrix.outputs.eks_e2e_jmx_matrix }}
test_repo_name: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_NAME }}
test_repo_url: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_URL }}
test_repo_branch: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}
cloudwatch_agent_repository: ${{ needs.OutputEnvVariables.outputs.ECR_INTEGRATION_TEST_REPO }}
cloudwatch_agent_tag: ${{ github.sha }}
cloudwatch_agent_operator_repository: ${{ needs.OutputEnvVariables.outputs.ECR_OPERATOR_REPO }}
cloudwatch_agent_operator_tag: ${{ needs.GetLatestOperatorCommitSHA.outputs.operator_commit_sha }}
region: ${{ inputs.region }}
helm_charts_branch: ${{ inputs.helm-charts-branch }}
terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
agent_config: resources/cwagent_configs/kafka.json
sample_app: resources/sample_apps/kafka.yaml
secrets: inherit

EKSE2EJMXContainerInsightsTest:
needs: [ GetLatestOperatorCommitSHA, GenerateTestMatrix, OutputEnvVariables ]
name: 'EKSE2EJMXContainerInsightsTest'
uses: ./.github/workflows/eks-e2e-test.yml
with:
terraform_dir: terraform/eks/e2e
job_id: eks-e2e-jmx-containerinsights-test
test_props: ${{ needs.GenerateTestMatrix.outputs.eks_e2e_jmx_matrix }}
test_repo_name: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_NAME }}
test_repo_url: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_URL }}
test_repo_branch: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}
cloudwatch_agent_repository: ${{ needs.OutputEnvVariables.outputs.ECR_INTEGRATION_TEST_REPO }}
cloudwatch_agent_tag: ${{ github.sha }}
cloudwatch_agent_operator_repository: ${{ needs.OutputEnvVariables.outputs.ECR_OPERATOR_REPO }}
cloudwatch_agent_operator_tag: ${{ needs.GetLatestOperatorCommitSHA.outputs.operator_commit_sha }}
region: ${{ inputs.region }}
helm_charts_branch: ${{ inputs.helm-charts-branch }}
terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE }}
agent_config: resources/cwagent_configs/containerinsights.json
sample_app: resources/sample_apps/tomcat.yaml
secrets: inherit
1 change: 1 addition & 0 deletions .github/workflows/eks-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ jobs:
if terraform apply --auto-approve \
-var="region=${{ inputs.region }}" \
-var="k8s_version=${{ matrix.arrays.k8s_version }}" \
-var="nodes=${{ matrix.arrays.nodes }}" \
-var="helm_charts_branch=${{ inputs.helm_charts_branch }}" \
-var="cloudwatch_agent_repository_url=${{ steps.login-ecr.outputs.registry }}" \
-var="cloudwatch_agent_repository=${{ inputs.cloudwatch_agent_repository }}" \
Expand Down
1 change: 1 addition & 0 deletions tool/clean/clean_eks/clean_eks.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@ var (
"cwagent-operator-helm-integ-",
"cwagent-helm-chart-integ-",
"cwagent-operator-eks-integ-",
"cwagent-monitoring-config-e2e-eks-",
}
)

Expand Down

0 comments on commit ef15aa4

Please sign in to comment.