From 6f3f174847788c4a0fbec0dbc97590dbeffa7eaf Mon Sep 17 00:00:00 2001 From: musa-asad Date: Thu, 5 Dec 2024 02:45:14 -0500 Subject: [PATCH 1/4] Add SSH Keep Alive logic. --- .github/workflows/ec2-integration-test.yml | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/.github/workflows/ec2-integration-test.yml b/.github/workflows/ec2-integration-test.yml index 95489d0f41..eb597a4a1b 100644 --- a/.github/workflows/ec2-integration-test.yml +++ b/.github/workflows/ec2-integration-test.yml @@ -79,6 +79,13 @@ jobs: - name: Verify Terraform version run: terraform --version + - name: Configure SSH Keep Alive + run: | + mkdir -p ~/.ssh + echo "Host * + ServerAliveInterval 240" > ~/.ssh/config + chmod 600 ~/.ssh/config + # nick-fields/retry@v2 starts at base dir - name: Terraform apply if: steps.cache_if_success.outputs.cache-hit != 'true' From 25cfe5171ebc7a5036df28dbf1ce70843315b602 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Thu, 5 Dec 2024 03:08:16 -0500 Subject: [PATCH 2/4] Use ssh-keep-alive branch. --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 18936b8eb5..c2877f0bb7 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -13,7 +13,7 @@ env: 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: "main" + CWA_GITHUB_TEST_REPO_BRANCH: "ssh-keep-alive" TERRAFORM_AWS_ASSUME_ROLE_ITAR: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_ITAR }} S3_INTEGRATION_BUCKET_ITAR: ${{ vars.S3_INTEGRATION_BUCKET_ITAR }} TERRAFORM_AWS_ASSUME_ROLE_CN: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }} From a540f1dfcdf5b0bc82bcf10a8b4b69d1bdd36d08 Mon Sep 17 00:00:00 2001 From: Musa Date: Fri, 7 Feb 2025 03:00:09 -0500 Subject: [PATCH 3/4] Update .github/workflows/integration-test.yml --- .github/workflows/integration-test.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 3af68dc611..32eac385d6 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -13,7 +13,7 @@ env: 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: "ssh-keep-alive" + CWA_GITHUB_TEST_REPO_BRANCH: "main" TERRAFORM_AWS_ASSUME_ROLE_ITAR: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_ITAR }} S3_INTEGRATION_BUCKET_ITAR: ${{ vars.S3_INTEGRATION_BUCKET_ITAR }} TERRAFORM_AWS_ASSUME_ROLE_CN: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }} From 1bb0a45be65d7e49bf2de4d7aa6deeedd18a1786 Mon Sep 17 00:00:00 2001 From: musa-asad Date: Fri, 7 Feb 2025 19:03:41 -0500 Subject: [PATCH 4/4] add keep alive in test --- .github/workflows/ec2-integration-test.yml | 7 ------- .github/workflows/integration-test.yml | 2 +- 2 files changed, 1 insertion(+), 8 deletions(-) diff --git a/.github/workflows/ec2-integration-test.yml b/.github/workflows/ec2-integration-test.yml index 3d742d725d..5d1eb6245c 100644 --- a/.github/workflows/ec2-integration-test.yml +++ b/.github/workflows/ec2-integration-test.yml @@ -76,13 +76,6 @@ jobs: - name: Verify Terraform version run: terraform --version - - name: Configure SSH Keep Alive - run: | - mkdir -p ~/.ssh - echo "Host * - ServerAliveInterval 240" > ~/.ssh/config - chmod 600 ~/.ssh/config - # nick-fields/retry@v2 starts at base dir - name: Terraform apply uses: nick-fields/retry@v2 diff --git a/.github/workflows/integration-test.yml b/.github/workflows/integration-test.yml index 32eac385d6..c590fe5567 100644 --- a/.github/workflows/integration-test.yml +++ b/.github/workflows/integration-test.yml @@ -13,7 +13,7 @@ env: 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: "main" + CWA_GITHUB_TEST_REPO_BRANCH: "keep-alive-ssh" TERRAFORM_AWS_ASSUME_ROLE_ITAR: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_ITAR }} S3_INTEGRATION_BUCKET_ITAR: ${{ vars.S3_INTEGRATION_BUCKET_ITAR }} TERRAFORM_AWS_ASSUME_ROLE_CN: ${{ vars.TERRAFORM_AWS_ASSUME_ROLE_CN }}