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

Unblock China region integration tests #1564

Merged
merged 42 commits into from
Mar 3, 2025
Merged
Show file tree
Hide file tree
Changes from 41 commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
9f6e736
Edit proxy for CN
varunch77 Feb 17, 2025
e760396
fix formatting
varunch77 Feb 17, 2025
d71c0c4
Fix formatting
varunch77 Feb 17, 2025
7e4d0d0
Make changes only when its CN region
varunch77 Feb 17, 2025
427f367
Add git command to use openssl
varunch77 Feb 17, 2025
3b59744
Use gnutls instead of openssl
varunch77 Feb 17, 2025
0392a8d
Update branch and add more git config rules
varunch77 Feb 17, 2025
0034a59
Undo changes to workflow file
varunch77 Feb 20, 2025
ce796bf
formatting
varunch77 Feb 20, 2025
8dcd05b
Merge branch 'main' into integ-test-CN
varunch77 Feb 20, 2025
9bdf3d1
Add vendor step
varunch77 Feb 21, 2025
602381b
Edit branch
varunch77 Feb 21, 2025
68a86f6
Fix typo
varunch77 Feb 21, 2025
c06e2f8
Edit branch
varunch77 Feb 21, 2025
8662f73
Add permissions
varunch77 Feb 21, 2025
1b6b4a1
Add credentials
varunch77 Feb 21, 2025
a1078c4
Set up credentials
varunch77 Feb 21, 2025
5a16874
Edit yml
varunch77 Feb 21, 2025
8e10309
Clean up workflow file
varunch77 Feb 22, 2025
5aff3e1
Minimize logs
varunch77 Feb 22, 2025
88ee3da
Run the upload dependencies step in parallel
varunch77 Feb 22, 2025
5efc782
Revert test branch to main
varunch77 Feb 22, 2025
e83ef7e
Merge branch 'main' into integ-test-CN
varunch77 Feb 22, 2025
f1282e1
Minor edits of workflow file
varunch77 Feb 22, 2025
c3247e0
Edit workflow to use github sha
varunch77 Feb 24, 2025
07d764e
Merge branch 'main' into integ-test-CN
varunch77 Feb 24, 2025
57bf2a5
Change branch to test branch again
varunch77 Feb 24, 2025
788dcdb
Rename workflow file since it's not CN specific
varunch77 Feb 27, 2025
9ff3aae
Uplaod test repo
varunch77 Feb 27, 2025
9c89f3b
Fix formatting
varunch77 Feb 27, 2025
7050809
Remove unused input
varunch77 Feb 27, 2025
953cff0
Merge branch 'main' into integ-test-CN
varunch77 Feb 27, 2025
26ae8a4
zip files
varunch77 Feb 27, 2025
ff4a8f7
Fix zipping changes
varunch77 Feb 28, 2025
8b36194
Fix zipping issues
varunch77 Feb 28, 2025
4d8083e
Fix StartLocalStackCN tests from being flaky
varunch77 Feb 28, 2025
ca007c1
Merge branch 'main' into integ-test-CN
varunch77 Feb 28, 2025
8aa555d
Handle merged changes
varunch77 Feb 28, 2025
d910e3a
Revert test branch from integ-test-CN to main
varunch77 Feb 28, 2025
2beb007
Combine repo + vendor into one tar file
varunch77 Feb 28, 2025
ecd679f
Revert test branch to main
varunch77 Feb 28, 2025
5afb742
Merge branch 'main' into integ-test-CN
varunch77 Mar 3, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 16 additions & 2 deletions .github/workflows/test-artifacts.yml
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ jobs:

StartLocalStackCN:
name: 'StartLocalStackCN'
needs: [ OutputEnvVariables ]
needs: [ OutputEnvVariables, UploadDependenciesCN ]
uses: ./.github/workflows/start-localstack.yml
secrets: inherit
permissions:
Expand All @@ -231,7 +231,21 @@ jobs:
github_sha: ${{ inputs.build_id }}
s3_integration_bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }}


UploadDependenciesCN:
name: 'UploadDependenciesCN'
needs: [ OutputEnvVariables ]
uses: ./.github/workflows/upload-dependencies.yml
secrets: inherit
permissions:
id-token: write
contents: read
with:
region: cn-north-1
test_repo_name: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_NAME }}
test_repo_branch: ${{ needs.OutputEnvVariables.outputs.CWA_GITHUB_TEST_REPO_BRANCH }}
github_sha: ${{github.sha}}
s3_integration_bucket: ${{ vars.S3_INTEGRATION_BUCKET_CN }}
terraform_assume_role: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }}

EC2NvidiaGPUIntegrationTest:
needs: [ StartLocalStack, GenerateTestMatrix, OutputEnvVariables ]
Expand Down
57 changes: 57 additions & 0 deletions .github/workflows/upload-dependencies.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
# Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved.
# SPDX-License-Identifier: MIT

name: Upload Dependencies and Test Repo to S3

env:
PRIVATE_KEY: ${{ secrets.AWS_PRIVATE_KEY }}
KEY_NAME: ${{ secrets.KEY_NAME }}

on:
workflow_call:
inputs:
region:
type: string
test_repo_name:
required: true
type: string
test_repo_branch:
required: true
type: string
github_sha:
required: true
type: string
s3_integration_bucket:
required: true
type: string
terraform_assume_role:
type: string

jobs:
UploadDependenciesAndTestRepo:
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
repository: ${{ inputs.test_repo_name }}
ref: ${{ inputs.test_repo_branch }}

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: ${{ inputs.terraform_assume_role }}
aws-region: ${{ inputs.region }}

- name: Set up Go
uses: actions/setup-go@v3
with:
go-version: ~1.22.2

- name: Upload Dependencies and Test Repo
run: |
go mod tidy
go mod vendor
mkdir test-repo
tar -czf ./test-repo/amazon-cloudwatch-agent-test.tar.gz --exclude='test-repo' .
aws s3 cp ./test-repo/amazon-cloudwatch-agent-test.tar.gz s3://${{ inputs.s3_integration_bucket }}/integration-test/cloudwatch-agent-test-repo/${{ inputs.github_sha }}.tar.gz --quiet