Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Implement EKS E2E Testing Workflow #1445

Open
wants to merge 24 commits into
base: main
Choose a base branch
from
Open

Implement EKS E2E Testing Workflow #1445

wants to merge 24 commits into from

Conversation

musa-asad
Copy link
Contributor

@musa-asad musa-asad commented Dec 2, 2024

Description of the issue

We aim to enhance our testing framework to support end-to-end testing of various helm-charts values and allow the use of custom branches for the agent, operator, and helm-charts repositories to enable testing of different configurations and prevent regressions to verify Kubernetes resource creation/deletion and metric emission.

Description of changes

  • Implemented e2e-test.yml workflow to run end-to-end tests with configurable inputs for region, operator_branch, and helm_charts_branch.
  • Cherry-picked @okankoAMZ's changes for End-to-End Build Workflow #1416 and moved e2e-build.yml into e2e-test.yml to prevent calling more than three nested workflows.
  • Implemented eks-e2e-test.yml as a reusable workflow for EKS cluster Terraform creation.
  • Created GenerateTestMatrix job, similar to the one in integration-test.yml, to generate test configurations using a Go generator script from the amazon-cloudwatch-agent-test repository.

An example job for the re-usable workflow:

  EKSE2EJMXTest:
    needs: [GenerateTestMatrix, OutputEnvVariables]
    name: 'EKSE2EJMX'
    uses: ./.github/workflows/eks-e2e-test.yml
    with:
      terraform_dir: terraform/eks/e2e
      job_id: eks-e2e-jmx-test
      test_props: ${{ needs.GenerateTestMatrix.outputs.eks_e2e_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_INTEGRATION_TEST_REPO }}
      cloudwatch_agent_operator_tag: ${{ inputs.operator-branch }}
      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-deployment.yaml
    secrets: inherit

License

By submitting this pull request, I confirm that you can use, modify, copy, and redistribute this contribution, under the terms of your choice.

Tests

Ran workflow: https://github.com/aws/amazon-cloudwatch-agent/actions/runs/12112452367.

Requirements

Before commit the code, please do the following steps.

  1. Run make fmt and make fmt-sh
  2. Run make lint

@musa-asad musa-asad changed the title Implement E2E testing framework workflow. Implement E2E testing framework for EKS Dec 2, 2024
@musa-asad musa-asad changed the title Implement E2E testing framework for EKS Implement E2E testing workflow for EKS Dec 2, 2024
@musa-asad musa-asad changed the title Implement E2E testing workflow for EKS Implement E2E Testing Workflow for EKS Dec 2, 2024
ECR_INTEGRATION_TEST_REPO: "cwagent-integration-test"
CWA_GITHUB_TEST_REPO_NAME: "aws/amazon-cloudwatch-agent-test"
CWA_GITHUB_TEST_REPO_URL: "https://github.com/aws/amazon-cloudwatch-agent-test.git"
CWA_GITHUB_TEST_REPO_BRANCH: "e2e"
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Needs to be changed to main.

@musa-asad musa-asad marked this pull request as ready for review December 2, 2024 04:09
@musa-asad musa-asad requested a review from a team as a code owner December 2, 2024 04:09
@musa-asad musa-asad requested review from Paramadon and removed request for Paramadon December 2, 2024 04:15
@musa-asad musa-asad self-assigned this Dec 2, 2024
@musa-asad musa-asad changed the title Implement E2E Testing Workflow for EKS Implement EKS E2E Testing Workflow Dec 2, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants