From da0be2680930cf3b0511a65886c6859eb76a5574 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Thu, 20 Oct 2022 17:47:23 -0500 Subject: [PATCH 01/12] Fix generateTestMatrix workflow step --- .github/workflows/integrationTest.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 4a4e193a4c..901b44cd1f 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -127,6 +127,7 @@ jobs: ecs_fargate_matrix: ${{ steps.set-matrix.outputs.ecs_fargate_matrix }} steps: - uses: actions/checkout@v2 + with: aws/amazon-cloudwatch-agent-test - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -136,9 +137,9 @@ jobs: - name: Generate matrix id: set-matrix run: | - go run --tags=generator integration/generator/test_case_generator.go - echo "::set-output name=ec2_gpu_matrix::$(echo $(cat integration/generator/resources/ec2_gpu_complete_test_matrix.json))" - echo "::set-output name=ec2_linux_matrix::$(echo $(cat integration/generator/resources/ec2_linux_complete_test_matrix.json))" + go run --tags=generator generator/test_case_generator.go + echo "::set-output name=ec2_gpu_matrix::$(echo $(cat generator/resources/ec2_gpu_complete_test_matrix.json))" + echo "::set-output name=ec2_linux_matrix::$(echo $(cat generator/resources/ec2_linux_complete_test_matrix.json))" echo "::set-output name=ec2_performance_matrix::$(echo $(cat integration/generator/resources/ec2_performance_complete_test_matrix.json))" echo "::set-output name=ecs_fargate_matrix::$(echo $(cat integration/generator/resources/ecs_fargate_complete_test_matrix.json))" From 74d842740999cff402fcf7c7f4ad5aaa3340ba92 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Thu, 20 Oct 2022 18:10:21 -0500 Subject: [PATCH 02/12] Fix startlocalstack step --- .github/workflows/integrationTest.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 901b44cd1f..b86e6755ab 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -354,7 +354,7 @@ jobs: runs-on: ubuntu-latest defaults: run: - working-directory: integration/terraform/ec2/localstack + working-directory: terraform/ec2/localstack outputs: local_stack_host_name: ${{ steps.localstack.outputs.local_stack_host_name }} permissions: @@ -362,6 +362,7 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -381,8 +382,8 @@ jobs: echo run terraform and execute test code && terraform apply --auto-approve -var="ssh_key_value=${PRIVATE_KEY}" - -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" - -var="github_sha=${GITHUB_SHA}" + -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" + -var="cwa_github_sha=${GITHUB_SHA}" -var="s3_bucket=${S3_INTEGRATION_BUCKET}" -var="ssh_key_name=${KEY_NAME}" && LOCAL_STACK_HOST_NAME=$(terraform output -raw public_dns) && From 4da968d8c2e2c36e4db23cc6344b0778d6886194 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Fri, 21 Oct 2022 10:50:52 -0500 Subject: [PATCH 03/12] Fix ec2linuxintegrationtest --- .github/workflows/integrationTest.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index b86e6755ab..202458ebde 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -503,6 +503,7 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -532,11 +533,11 @@ jobs: timeout_minutes: 30 retry_wait_seconds: 5 command: | - cd integration/terraform/ec2/linux + cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ - -var="github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" \ + -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ -var="user=${{ matrix.arrays.username }}" \ -var="ami=${{ matrix.arrays.ami }}" \ @@ -560,7 +561,7 @@ jobs: max_attempts: 3 timeout_minutes: 8 retry_wait_seconds: 5 - command: cd integration/terraform/ec2/linux && terraform destroy --auto-approve + command: cd terraform/ec2/linux && terraform destroy --auto-approve # @TODO add back when we add back windows tests # EC2WinIntegrationTest: From 5fc36a1f14d50b94170877a06e0689c886a81917 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Fri, 21 Oct 2022 10:57:13 -0500 Subject: [PATCH 04/12] Fix stoplocalstack --- .github/workflows/integrationTest.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 202458ebde..9ae52d4473 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -637,12 +637,13 @@ jobs: needs: [ StartLocalStack, EC2LinuxIntegrationTest ] defaults: run: - working-directory: integration/terraform/ec2/localstack + working-directory: terraform/ec2/localstack permissions: id-token: write contents: read steps: - uses: actions/checkout@v2 + with: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 From 766bebd9798ae565a22e28b49579f242d92c9251 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Mon, 24 Oct 2022 13:55:10 -0500 Subject: [PATCH 05/12] Fix MakeMSIZip --- .github/workflows/integrationTest.yml | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 9ae52d4473..ebeb738ed2 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -159,6 +159,7 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: aws/amazon-cloudwatch-agent-test - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -195,10 +196,10 @@ jobs: export version=$(cat CWAGENT_VERSION) echo cw agent version $version mkdir msi_dep - cp -r integration/msi/tools/. msi_dep/ + cp -r msi/tools/. msi_dep/ cp -r windows-agent/amazon-cloudwatch-agent/. msi_dep/ - go run integration/msi/tools/msiversion/msiversionconverter.go $version msi_dep/amazon-cloudwatch-agent.wxs '' --tags=integration - go run integration/msi/tools/msiversion/msiversionconverter.go $version msi_dep/manifest.json __VERSION__ --tags=integration + go run msi/tools/msiversion/msiversionconverter.go $version msi_dep/amazon-cloudwatch-agent.wxs '' --tags=integration + go run msi/tools/msiversion/msiversionconverter.go $version msi_dep/manifest.json __VERSION__ --tags=integration - name: Zip if: steps.cached_win_zip.outputs.cache-hit != 'true' From 2f1f26c6f1767d108a81a9ae10f3b42dc14c0115 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Mon, 24 Oct 2022 14:06:09 -0500 Subject: [PATCH 06/12] Fix checkout repository argument --- .github/workflows/integrationTest.yml | 15 ++++++++++----- 1 file changed, 10 insertions(+), 5 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index ebeb738ed2..3018e49e34 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -127,7 +127,8 @@ jobs: ecs_fargate_matrix: ${{ steps.set-matrix.outputs.ecs_fargate_matrix }} steps: - uses: actions/checkout@v2 - with: aws/amazon-cloudwatch-agent-test + with: + repository: aws/amazon-cloudwatch-agent-test - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -159,7 +160,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 - with: aws/amazon-cloudwatch-agent-test + with: + repository: aws/amazon-cloudwatch-agent-test - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -363,7 +365,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 - with: aws/amazon-cloudwatch-agent-test + with: + repository: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -504,7 +507,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 - with: aws/amazon-cloudwatch-agent-test + with: + repository: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -644,7 +648,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 - with: aws/amazon-cloudwatch-agent-test + with: + repository: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 From e564cc20fb7cf9c521739692184380904259ea5c Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Mon, 24 Oct 2022 14:10:10 -0500 Subject: [PATCH 07/12] Fix MakeMacPkg --- .github/workflows/integrationTest.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 3018e49e34..d0adefa7fc 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -222,6 +222,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: + repository: aws/amazon-cloudwatch-agent-test - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -251,8 +253,8 @@ jobs: run: | echo cw agent version $(cat CWAGENT_VERSION) cp CWAGENT_VERSION /tmp/CWAGENT_VERSION - cp -r integration/pkg/tools/. /tmp/ - cp -r integration/pkg/tools/. /tmp/arm64/ + cp -r pkg/tools/. /tmp/ + cp -r pkg/tools/. /tmp/arm64/ cp -r darwin/amd64/. /tmp/ cp -r darwin/arm64/. /tmp/arm64/ From 04d4cb7e0754bfd1886e0b39e0e9addfcd24721b Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Mon, 24 Oct 2022 14:17:12 -0500 Subject: [PATCH 08/12] Fix ECSFargateIntegrationTest --- .github/workflows/integrationTest.yml | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index d0adefa7fc..8291016247 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -684,6 +684,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: + repository: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -715,7 +717,7 @@ jobs: timeout_minutes: 15 retry_wait_seconds: 5 command: | - cd integration/terraform/ecs/linux + cd terraform/ecs/linux terraform init if terraform apply --auto-approve -var="test_dir=${{ matrix.arrays.test_dir }}" -var="cwagent_image_repo=${{ steps.login-ecr.outputs.registry }}/${{ env.ECR_INTEGRATION_TEST_REPO }}" -var="cwagent_image_tag=${{ github.sha }}" ; then terraform destroy -auto-approve @@ -730,7 +732,7 @@ jobs: max_attempts: 3 timeout_minutes: 8 retry_wait_seconds: 5 - command: cd integration/terraform/ecs/linux && terraform destroy --auto-approve + command: cd terraform/ecs/linux && terraform destroy --auto-approve PerformanceTrackingTest: name: "PerformanceTrackingTest" From 147178c7aa328624bcd083bf8358d18e2cda188f Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Mon, 24 Oct 2022 14:43:54 -0500 Subject: [PATCH 09/12] Fix EC2NvidiaGPUIntegrationTest --- .github/workflows/integrationTest.yml | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 8291016247..c92535e737 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -410,6 +410,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: + repository: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -439,11 +441,11 @@ jobs: timeout_minutes: 30 retry_wait_seconds: 5 command: | - cd integration/terraform/ec2/linux + cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ - -var="github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=aws/amazon-cloudwatch-agent-test.git" \ + -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ -var="user=${{ matrix.arrays.username }}" \ -var="ami=${{ matrix.arrays.ami }}" \ @@ -467,12 +469,12 @@ jobs: timeout_minutes: 30 retry_wait_seconds: 5 command: | - cd integration/terraform/ec2/win + cd terraform/ec2/win terraform init if terraform apply --auto-approve \ -var="ssh_key_value=${PRIVATE_KEY}" -var="ssh_key_name=${KEY_NAME}" \ - -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ - -var="github_sha=${GITHUB_SHA}" -var="ami=${{ matrix.arrays.ami }}" \ + -var="github_repo=aws/amazon-cloudwatch-agent-test.git" \ + -var="cwa_github_sha=${GITHUB_SHA}" -var="ami=${{ matrix.arrays.ami }}" \ -var="test_dir=${{ matrix.arrays.test_dir }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ -var="s3_bucket=${S3_INTEGRATION_BUCKET}" ; then terraform destroy -auto-approve @@ -490,9 +492,9 @@ jobs: retry_wait_seconds: 5 command: | if "${{ matrix.arrays.os }}" == window - cd integration/terraform/ec2/win + cd terraform/ec2/win else - cd integration/terraform/ec2/linux + cd terraform/ec2/linux fi terraform destroy --auto-approve From aa7b0fca9396425853e0b6ca242cac164a37b25d Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Mon, 24 Oct 2022 14:54:29 -0500 Subject: [PATCH 10/12] Fix PerformanceTrackingTest --- .github/workflows/integrationTest.yml | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index c92535e737..b3a96a56d4 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -444,7 +444,7 @@ jobs: cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=aws/amazon-cloudwatch-agent-test.git" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" \ -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ -var="user=${{ matrix.arrays.username }}" \ @@ -620,7 +620,7 @@ jobs: # if terraform apply --auto-approve \ # -var="ssh_key_value=${PRIVATE_KEY}" -var="ssh_key_name=${KEY_NAME}" \ # -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ -# -var="github_sha=${GITHUB_SHA}" -var="ami=${{ matrix.arrays.ami }}" \ +# -var="cwa_github_sha=${GITHUB_SHA}" -var="ami=${{ matrix.arrays.ami }}" \ # -var="test_dir=${{ matrix.arrays.test_dir }}" \ # -var="s3_bucket=${S3_INTEGRATION_BUCKET}" ; then # terraform destroy -auto-approve @@ -749,6 +749,8 @@ jobs: contents: read steps: - uses: actions/checkout@v2 + with: + repository: aws/amazon-cloudwatch-agent-test - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -783,11 +785,11 @@ jobs: timeout_minutes: 30 retry_wait_seconds: 5 command: | - cd integration/terraform/ec2/linux + cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_repo=${GITHUB_SERVER_URL}/${GITHUB_REPOSITORY}.git" \ - -var="github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" \ + -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="user=${{ matrix.arrays.username }}" \ -var="ami=${{ matrix.arrays.ami }}" \ -var="ca_cert_path=${{ matrix.arrays.caCertPath }}" \ @@ -796,7 +798,7 @@ jobs: -var="local_stack_host_name=${{ needs.StartLocalStack.outputs.local_stack_host_name }}" \ -var="s3_bucket=${S3_INTEGRATION_BUCKET}" \ -var="ssh_key_name=${KEY_NAME}" \ - -var="github_sha_date=${{ steps.sha_date.outputs.sha_date }}" \ + -var="cwa_github_sha_date=${{ steps.sha_date.outputs.sha_date }}" \ -var="test_name=${{ matrix.arrays.os }}" \ -var="performance_number_of_logs=${{ matrix.arrays.performance_number_of_logs}}"\ -var="test_dir=${{ matrix.arrays.test_dir }}" ; then terraform destroy -auto-approve @@ -812,4 +814,4 @@ jobs: max_attempts: 3 timeout_minutes: 8 retry_wait_seconds: 5 - command: cd integration/terraform/ec2/linux && terraform destroy --auto-approve + command: cd terraform/ec2/linux && terraform destroy --auto-approve From 832a2f2e8b27b766c09dd8af2264be2c21523a3c Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Tue, 25 Oct 2022 08:54:22 -0500 Subject: [PATCH 11/12] Fix matrix generation invalid file path --- .github/workflows/integrationTest.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index b3a96a56d4..0d819a3ef2 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -141,8 +141,8 @@ jobs: go run --tags=generator generator/test_case_generator.go echo "::set-output name=ec2_gpu_matrix::$(echo $(cat generator/resources/ec2_gpu_complete_test_matrix.json))" echo "::set-output name=ec2_linux_matrix::$(echo $(cat generator/resources/ec2_linux_complete_test_matrix.json))" - echo "::set-output name=ec2_performance_matrix::$(echo $(cat integration/generator/resources/ec2_performance_complete_test_matrix.json))" - echo "::set-output name=ecs_fargate_matrix::$(echo $(cat integration/generator/resources/ecs_fargate_complete_test_matrix.json))" + echo "::set-output name=ec2_performance_matrix::$(echo $(cat generator/resources/ec2_performance_complete_test_matrix.json))" + echo "::set-output name=ecs_fargate_matrix::$(echo $(cat generator/resources/ecs_fargate_complete_test_matrix.json))" - name: Echo test plan matrix run: | From 80ad5a6785f4ac19e95e525d86ca09fc6db74612 Mon Sep 17 00:00:00 2001 From: Chena Lee Date: Tue, 25 Oct 2022 10:52:40 -0500 Subject: [PATCH 12/12] Use env variables for test repo name and url --- .github/workflows/integrationTest.yml | 30 ++++++++++++++------------- 1 file changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml index 0d819a3ef2..057c03f2a7 100644 --- a/.github/workflows/integrationTest.yml +++ b/.github/workflows/integrationTest.yml @@ -12,6 +12,8 @@ env: GPG_KEY_NAME: ${{ secrets.GPG_KEY_NAME }} GPG_TTY: $(tty) 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" on: push: @@ -128,7 +130,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -161,7 +163,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -223,7 +225,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Set up Go 1.x uses: actions/setup-go@v2 @@ -368,7 +370,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -388,7 +390,7 @@ jobs: echo run terraform and execute test code && terraform apply --auto-approve -var="ssh_key_value=${PRIVATE_KEY}" - -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" + -var="github_test_repo=${CWA_GITHUB_TEST_REPO_URL}" -var="cwa_github_sha=${GITHUB_SHA}" -var="s3_bucket=${S3_INTEGRATION_BUCKET}" -var="ssh_key_name=${KEY_NAME}" && @@ -411,7 +413,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -444,7 +446,7 @@ jobs: cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=${CWA_GITHUB_TEST_REPO_URL}" \ -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ -var="user=${{ matrix.arrays.username }}" \ @@ -473,7 +475,7 @@ jobs: terraform init if terraform apply --auto-approve \ -var="ssh_key_value=${PRIVATE_KEY}" -var="ssh_key_name=${KEY_NAME}" \ - -var="github_repo=aws/amazon-cloudwatch-agent-test.git" \ + -var="github_repo=${CWA_GITHUB_TEST_REPO_URL}" \ -var="cwa_github_sha=${GITHUB_SHA}" -var="ami=${{ matrix.arrays.ami }}" \ -var="test_dir=${{ matrix.arrays.test_dir }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ @@ -512,7 +514,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -545,7 +547,7 @@ jobs: cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=${CWA_GITHUB_TEST_REPO_URL}" \ -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="ec2_instance_type=${{ matrix.arrays.instanceType }}" \ -var="user=${{ matrix.arrays.username }}" \ @@ -653,7 +655,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -687,7 +689,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -750,7 +752,7 @@ jobs: steps: - uses: actions/checkout@v2 with: - repository: aws/amazon-cloudwatch-agent-test + repository: ${CWA_GITHUB_TEST_REPO_NAME} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -788,7 +790,7 @@ jobs: cd terraform/ec2/linux terraform init if terraform apply --auto-approve \ - -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=https://github.com/aws/amazon-cloudwatch-agent-test.git" \ + -var="ssh_key_value=${PRIVATE_KEY}" -var="github_test_repo=${CWA_GITHUB_TEST_REPO_URL}" \ -var="cwa_github_sha=${GITHUB_SHA}" -var="install_agent=${{ matrix.arrays.installAgentCommand }}" \ -var="user=${{ matrix.arrays.username }}" \ -var="ami=${{ matrix.arrays.ami }}" \