Skip to content

Commit

Permalink
Merge branch 'main' of github.com:aws/amazon-cloudwatch-agent
Browse files Browse the repository at this point in the history
  • Loading branch information
Paramadon committed Jan 21, 2025
2 parents c32d8ca + 9c8aef1 commit df9f77f
Show file tree
Hide file tree
Showing 6 changed files with 69 additions and 7 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/deploy-canary.yml
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ jobs:
terraform destroy -auto-approve
aws s3api delete-object --bucket ${S3_INTEGRATION_BUCKET} --key canary/al2/terraform.tfstate
fi
- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

# @TODO we can add a matrix in the future but for alpha we will only deploy to al2
- name: Terraform apply
uses: nick-fields/retry@v2
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/ec2-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,6 +76,10 @@ jobs:
run: |
echo run cache_if_success os ${{ matrix.arrays.os }} arc ${{ matrix.arrays.arc }} test dir ${{ matrix.arrays.test_dir }}
echo localstack input ${{ inputs.localstack_host }}
- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

Expand All @@ -93,7 +97,7 @@ jobs:
else
cd ${{inputs.test_dir}}
fi
terraform init
if terraform apply --auto-approve \
-var="ssh_key_value=${{env.PRIVATE_KEY}}" -var="github_test_repo=${{ inputs.test_repo_url }}" \
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/eks-e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,10 @@ jobs:
if: steps.cache_if_success.outputs.cache-hit != 'true'
uses: aws-actions/amazon-ecr-login@v2

- name: Install Terraform
if: steps.cache_if_success.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.cache_if_success.outputs.cache-hit != 'true'
run: terraform --version
Expand Down Expand Up @@ -144,7 +148,7 @@ jobs:
else
terraform destroy --auto-approve && exit 1
fi
- name: Terraform destroy
if: ${{ cancelled() || failure() }}
uses: nick-fields/retry@v2
Expand Down
48 changes: 43 additions & 5 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -254,6 +254,9 @@ jobs:
- name: Echo Test Info
run: echo run on ec2 instance os ${{ matrix.arrays.os }} arc ${{ matrix.arrays.arc }} test dir ${{ matrix.arrays.test_dir }}

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

Expand Down Expand Up @@ -472,6 +475,9 @@ jobs:
- name: Echo Test Info
run: echo run on ec2 instance os ${{ matrix.arrays.os }} use ssm ${{ matrix.arrays.useSSM }} test ${{ matrix.arrays.test_dir }}

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

Expand Down Expand Up @@ -554,6 +560,9 @@ jobs:
- name: Echo OS
run: echo run on ec2 instance os ${{ matrix.arrays.os }}

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

Expand Down Expand Up @@ -688,6 +697,10 @@ jobs:
if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true'
uses: aws-actions/amazon-ecr-login@v2

- name: Install Terraform
if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.ecs-ec2-integration-test.outputs.cache-hit != 'true'
run: terraform --version
Expand All @@ -705,7 +718,7 @@ jobs:
else
cd terraform/ecs_ec2/daemon
fi
terraform init
if terraform apply --auto-approve\
-var="test_dir=${{ matrix.arrays.test_dir }}"\
Expand Down Expand Up @@ -771,6 +784,10 @@ jobs:
if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true'
uses: aws-actions/amazon-ecr-login@v2

- name: Install Terraform
if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.ecs-fargate-integration-test.outputs.cache-hit != 'true'
run: terraform --version
Expand All @@ -788,7 +805,7 @@ jobs:
else
cd terraform/ecs_fargate/linux
fi
terraform init
if terraform apply --auto-approve\
-var="test_dir=${{ matrix.arrays.test_dir }}"\
Expand Down Expand Up @@ -849,6 +866,10 @@ jobs:
if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true'
uses: aws-actions/amazon-ecr-login@v2

- name: Install Terraform
if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.eks-ec2-integration-test.outputs.cache-hit != 'true'
run: terraform --version
Expand Down Expand Up @@ -1006,6 +1027,10 @@ jobs:
path: go.mod
key: performance-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }}

- name: Install Terraform
if: steps.performance-tracking.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.performance-tracking.outputs.cache-hit != 'true'
run: terraform --version
Expand Down Expand Up @@ -1074,6 +1099,10 @@ jobs:
path: go.mod
key: performance-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }}

- name: Install Terraform
if: steps.performance-tracking.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.performance-tracking.outputs.cache-hit != 'true'
run: terraform --version
Expand Down Expand Up @@ -1142,6 +1171,10 @@ jobs:
path: go.mod
key: stress-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }}

- name: Install Terraform
if: steps.stress-tracking.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.stress-tracking.outputs.cache-hit != 'true'
run: terraform --version
Expand Down Expand Up @@ -1212,6 +1245,10 @@ jobs:
path: go.mod
key: ec2-win-stress-tracking-test-${{ github.sha }}-${{ matrix.arrays.os }}-${{ matrix.arrays.arc }}-${{ matrix.arrays.test_dir }}

- name: Install Terraform
if: steps.ec2-win-stress-tracking-test.outputs.cache-hit != 'true'
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
if: steps.ec2-win-stress-tracking-test.outputs.cache-hit != 'true'
run: terraform --version
Expand Down Expand Up @@ -1276,27 +1313,28 @@ jobs:
aws-region: us-west-2
role-duration-seconds: ${{ env.TERRAFORM_AWS_ASSUME_ROLE_DURATION }}

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version


- name: Terraform apply and setup
run: |
if [ "${{ matrix.arrays.terraform_dir }}" != "" ]; then
cd "${{ matrix.arrays.terraform_dir }}"
else
cd terraform/eks/addon/gpu
fi
terraform init
if terraform apply --auto-approve \
-var="beta=true" \
-var="ami_type=${{ matrix.arrays.ami }}" \
-var="instance_type=${{ matrix.arrays.instanceType }}" \
-var="k8s_version=${{ matrix.arrays.k8sVersion }}"; then
echo "Terraform apply successful."
# Capture the output
echo "Getting EKS cluster name"
EKS_CLUSTER_NAME=$(terraform output -raw eks_cluster_name)
Expand Down
6 changes: 6 additions & 0 deletions .github/workflows/soak-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,12 @@ jobs:
role-to-assume: ${{ env.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: us-west-2

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

# @TODO we can add a matrix in the future but for for now, we will only deploy to AL2.
- name: Terraform apply
uses: nick-fields/retry@v2
Expand Down
3 changes: 3 additions & 0 deletions .github/workflows/start-localstack.yml
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,9 @@ jobs:
- name: Echo Localstack Config
run: echo repo name ${{inputs.test_repo_name}} repo branch ${{ inputs.test_repo_branch }} region ${{ inputs.region }}

- name: Install Terraform
uses: hashicorp/setup-terraform@v3

- name: Verify Terraform version
run: terraform --version

Expand Down

0 comments on commit df9f77f

Please sign in to comment.