Skip to content

Commit

Permalink
Merge branch 'main' into feature-custom-metrics-entity
Browse files Browse the repository at this point in the history
  • Loading branch information
musa-asad authored Mar 6, 2025
2 parents 20824f2 + 515c5e0 commit 8b26c47
Show file tree
Hide file tree
Showing 245 changed files with 7,840 additions and 4,527 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build-test-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ jobs:

StartIntegrationTests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker ]
if: ${{ inputs.test-image-before-upload }}
if: ${{ github.event_name == 'push' || inputs.test-image-before-upload }}
runs-on: ubuntu-latest
steps:
- run: gh workflow run integration-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }} -f build_sha=${{ github.sha }}
Expand All @@ -108,7 +108,7 @@ jobs:
StartApplicationSignalsE2ETests:
needs: [ BuildAndUploadPackages, BuildAndUploadITAR, BuildAndUploadCN, BuildDocker ]
# Workflow only runs against main
if: ${{ contains(github.ref_name, 'main') && inputs.test-image-before-upload }}
if: ${{ contains(github.ref_name, 'main') && (github.event_name == 'push' || inputs.test-image-before-upload) }}
runs-on: ubuntu-latest
steps:
- run: gh workflow run application-signals-e2e-test.yml --ref ${{ github.ref_name }} --repo $GITHUB_REPOSITORY -f build_run_id=${{ github.run_id }} -f build_sha=${{ github.sha }}
Expand Down
18 changes: 18 additions & 0 deletions .github/workflows/clean-aws-resources.yml
Original file line number Diff line number Diff line change
Expand Up @@ -270,3 +270,21 @@ jobs:
- name: Clean old IAM roles
working-directory: tool/clean
run: go run ./clean_iam_roles/clean_iam_roles.go --tags=clean
clean-log-groups:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- uses: actions/checkout@v3
- uses: actions/setup-go@v4

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ secrets.TERRAFORM_AWS_ASSUME_ROLE }}
aws-region: us-west-2

- name: Clean old Log Groups
working-directory: tool/clean
run: go run ./clean_log_group/clean_log_group.go
36 changes: 23 additions & 13 deletions .github/workflows/ec2-integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
on:
workflow_call:
inputs:
github_sha:
build_id:
required: true
type: string
test_repo_name:
Expand Down Expand Up @@ -43,7 +43,7 @@ on:

jobs:
EC2IntegrationTest:
name: 'Test'
name: ${{matrix.arrays.testName}}
runs-on: ubuntu-latest
strategy:
fail-fast: false
Expand Down Expand Up @@ -92,24 +92,27 @@ jobs:
terraform init
if terraform apply --auto-approve \
-var="ssh_key_value=${{env.PRIVATE_KEY}}" -var="github_test_repo=${{ inputs.test_repo_url }}" \
-var="test_name=${{ matrix.arrays.os }}" \
-var="cwa_github_sha=${{inputs.github_sha}}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \
-var="github_test_repo_branch=${{inputs.test_repo_branch}}" \
-var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \
-var="user=${{ matrix.arrays.username }}" \
-var="agent_start=${{ matrix.arrays.agentStartCommand }}" \
-var="ami=${{ matrix.arrays.ami }}" \
-var="ca_cert_path=${{ matrix.arrays.caCertPath }}" \
-var="arc=${{ matrix.arrays.arc }}" \
-var="binary_name=${{ matrix.arrays.binaryName }}" \
-var="ca_cert_path=${{ matrix.arrays.caCertPath }}" \
-var="cwa_github_sha=${{inputs.build_id}}" \
-var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \
-var="excluded_tests='${{ matrix.arrays.excludedTests }}'" \
-var="github_test_repo=${{ inputs.test_repo_url }}" \
-var="github_test_repo_branch=${{inputs.test_repo_branch}}" \
-var="install_agent=${{ matrix.arrays.installAgentCommand }}" \
-var="local_stack_host_name=${{ inputs.localstack_host }}" \
-var="plugin_tests='${{ github.event.inputs.plugins }}'" \
-var="region=${{ inputs.region }}" \
-var="s3_bucket=${{ inputs.s3_integration_bucket }}" \
-var="plugin_tests='${{ github.event.inputs.plugins }}'" \
-var="excluded_tests='${{ matrix.arrays.excludedTests }}'" \
-var="ssh_key_name=${{env.KEY_NAME}}" \
-var="ssh_key_value=${{env.PRIVATE_KEY}}" \
-var="test_dir=${{ matrix.arrays.test_dir }}" \
-var="agent_start=${{ matrix.arrays.agentStartCommand }}"; then terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" -auto-approve
-var="test_name=${{ matrix.arrays.os }}" \
-var="user=${{ matrix.arrays.username }}"; then
terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" -auto-approve
else
terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" -auto-approve && exit 1
fi
Expand All @@ -121,4 +124,11 @@ jobs:
max_attempts: 2
timeout_minutes: 8
retry_wait_seconds: 5
command: cd ${{ inputs.test_dir }} && terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" --auto-approve
command: |
if [ "${{ matrix.arrays.terraform_dir }}" != "" ]; then
cd "${{ matrix.arrays.terraform_dir }}"
else
cd ${{inputs.test_dir}}
fi
terraform destroy -var="region=${{ inputs.region }}" -var="ami=${{ matrix.arrays.ami }}" --auto-approve
Loading

0 comments on commit 8b26c47

Please sign in to comment.