From de891c26edc131f1e4086ea86e1ba98aa19a1528 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 13 Nov 2023 14:52:16 -0800 Subject: [PATCH 01/10] Fixing integration test path --- .github/workflows/IntegrationTesting.yml | 3 +-- sample-apps/http-server/go.mod | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index f916a033..1b6db3ec 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -22,8 +22,6 @@ jobs: - name: Zip up the deployment package run: zip -r deploy.zip . -x '*.git*' - working-directory: ./sample-apps/http-server - - name: Upload WebApp with X-Ray SDK build artifact uses: actions/upload-artifact@v2 @@ -109,6 +107,7 @@ jobs: - name: Run testing suite run: ./gradlew :validator:run --args='-c default-xray-trace-validation.yml --endpoint http://${{ github.run_id }}-${{ github.run_number }}-eb-app-env.us-west-2.elasticbeanstalk.com' + working-directory: ./sample-apps/http-server cleanup: name: Resource tear down diff --git a/sample-apps/http-server/go.mod b/sample-apps/http-server/go.mod index 7fb89227..6bb88320 100644 --- a/sample-apps/http-server/go.mod +++ b/sample-apps/http-server/go.mod @@ -1,6 +1,6 @@ module application.go -replace github.com/aws/aws-xray-sdk-go => ./aws-xray-sdk-go +replace github.com/aws/aws-xray-sdk-go => ../../ require ( github.com/aws/aws-sdk-go v1.47.9 From 17972a6b4e81065adfd5e7f36971b88ee775907c Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 13 Nov 2023 16:17:50 -0800 Subject: [PATCH 02/10] Updating branch for test --- .github/workflows/IntegrationTesting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index 1b6db3ec..a22fe2ae 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: branches: - - master + - IntegrationTest jobs: package_SDK: From a322081c243b5a9042fdeb916d859efb4260ce56 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 13 Nov 2023 16:41:26 -0800 Subject: [PATCH 03/10] Push IntegrationTest artifact --- .github/workflows/ecr-publish.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ecr-publish.yml b/.github/workflows/ecr-publish.yml index ce4810d4..3e42252a 100644 --- a/.github/workflows/ecr-publish.yml +++ b/.github/workflows/ecr-publish.yml @@ -1,7 +1,7 @@ on: push: branches: - - master + - IntegrationTest jobs: build_push_sample_app_image: name: Build and Push Sample App docker image From a781761209e61f42f28a25af65cda5ed4ac1de20 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 13 Nov 2023 16:46:05 -0800 Subject: [PATCH 04/10] Moving back to master --- .github/workflows/IntegrationTesting.yml | 2 +- .github/workflows/ecr-publish.yml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index a22fe2ae..1b6db3ec 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -3,7 +3,7 @@ on: workflow_dispatch: push: branches: - - IntegrationTest + - master jobs: package_SDK: diff --git a/.github/workflows/ecr-publish.yml b/.github/workflows/ecr-publish.yml index 3e42252a..ce4810d4 100644 --- a/.github/workflows/ecr-publish.yml +++ b/.github/workflows/ecr-publish.yml @@ -1,7 +1,7 @@ on: push: branches: - - IntegrationTest + - master jobs: build_push_sample_app_image: name: Build and Push Sample App docker image From 8216a912f636818098d5c6b350603cbbef763f8b Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 13 Nov 2023 18:09:23 -0800 Subject: [PATCH 05/10] Changing Working directory --- .github/workflows/IntegrationTesting.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index 1b6db3ec..ab348b61 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -17,9 +17,6 @@ jobs: - name: Create a directory run: mkdir sample-apps/http-server/aws-xray-sdk-go - - name: Copy X-Ray SDK to deployment package with Sample App - run: rsync -r * sample-apps/http-server/aws-xray-sdk-go --exclude sample-apps/ - - name: Zip up the deployment package run: zip -r deploy.zip . -x '*.git*' @@ -27,7 +24,7 @@ jobs: uses: actions/upload-artifact@v2 with: name: deployment-package - path: sample-apps/http-server/deploy.zip + path: deploy.zip deploy_WebApp: name: Deploy X-Ray Instrumented Web App From 78663c94f02b921f4a1966fd680bb3e3a6b726f9 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Mon, 13 Nov 2023 18:28:35 -0800 Subject: [PATCH 06/10] Removing directory --- .github/workflows/IntegrationTesting.yml | 3 --- 1 file changed, 3 deletions(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index ab348b61..c8db014e 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -14,9 +14,6 @@ jobs: - name: Checkout X-Ray Go SDK uses: actions/checkout@v2 - - name: Create a directory - run: mkdir sample-apps/http-server/aws-xray-sdk-go - - name: Zip up the deployment package run: zip -r deploy.zip . -x '*.git*' From 46ff3cb3ed4b55f5901fed9fbceb3015e9a48519 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Tue, 14 Nov 2023 09:26:35 -0800 Subject: [PATCH 07/10] Changing working directory --- .github/workflows/IntegrationTesting.yml | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index c8db014e..fbffb88f 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -37,7 +37,7 @@ jobs: name: deployment-package - name: Copy deployment package to terraform directory - run: cp deploy.zip ./terraform + run: cp deploy.zip ./terraform/sample-apps/http-server - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -51,30 +51,30 @@ jobs: - name: Terraform Init run: terraform init - working-directory: ./terraform + working-directory: ./terraform/sample-apps/http-server - name: Terraform Validate run: terraform validate -no-color - working-directory: ./terraform + working-directory: ./terraform/sample-apps/http-server - name: Terraform Plan run: terraform plan -var-file="fixtures.us-west-2.tfvars" -no-color env: TF_VAR_resource_prefix: '${{ github.run_id }}-${{ github.run_number }}' continue-on-error: true - working-directory: ./terraform + working-directory: ./terraform/sample-apps/http-server - name: Terraform Apply run: terraform apply -var-file="fixtures.us-west-2.tfvars" -auto-approve env: TF_VAR_resource_prefix: '${{ github.run_id }}-${{ github.run_number }}' - working-directory: ./terraform + working-directory: ./terraform/sample-apps/http-server - name: Upload terraform state files for destorying resources uses: actions/upload-artifact@v2 with: name: terraform-state-artifact - path: ./terraform + path: ./terraform/sample-apps/http-server test_WebApp: name: Run testing suite From 313264646f997ded52e93ef6fcc5173f19bace42 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Tue, 14 Nov 2023 09:30:35 -0800 Subject: [PATCH 08/10] Making sample-app directory --- .github/workflows/IntegrationTesting.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index fbffb88f..2b036867 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -36,6 +36,9 @@ jobs: with: name: deployment-package + - name: Make sample-app directory + run: mkdir ./terraform/sample-apps/http-server + - name: Copy deployment package to terraform directory run: cp deploy.zip ./terraform/sample-apps/http-server From 77059289da662cef958275a8007fcfedba67b643 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Tue, 14 Nov 2023 09:35:18 -0800 Subject: [PATCH 09/10] Make parent directories if needed --- .github/workflows/IntegrationTesting.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index 2b036867..f77717e6 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -37,7 +37,7 @@ jobs: name: deployment-package - name: Make sample-app directory - run: mkdir ./terraform/sample-apps/http-server + run: mkdir -p ./terraform/sample-apps/http-server - name: Copy deployment package to terraform directory run: cp deploy.zip ./terraform/sample-apps/http-server From b20ab804c7e9b4a31efdddce9642c16aa3c53607 Mon Sep 17 00:00:00 2001 From: Adam Shaw Date: Tue, 14 Nov 2023 10:08:54 -0800 Subject: [PATCH 10/10] Rverting --- .github/workflows/IntegrationTesting.yml | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) diff --git a/.github/workflows/IntegrationTesting.yml b/.github/workflows/IntegrationTesting.yml index f77717e6..c8db014e 100644 --- a/.github/workflows/IntegrationTesting.yml +++ b/.github/workflows/IntegrationTesting.yml @@ -36,11 +36,8 @@ jobs: with: name: deployment-package - - name: Make sample-app directory - run: mkdir -p ./terraform/sample-apps/http-server - - name: Copy deployment package to terraform directory - run: cp deploy.zip ./terraform/sample-apps/http-server + run: cp deploy.zip ./terraform - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v1 @@ -54,30 +51,30 @@ jobs: - name: Terraform Init run: terraform init - working-directory: ./terraform/sample-apps/http-server + working-directory: ./terraform - name: Terraform Validate run: terraform validate -no-color - working-directory: ./terraform/sample-apps/http-server + working-directory: ./terraform - name: Terraform Plan run: terraform plan -var-file="fixtures.us-west-2.tfvars" -no-color env: TF_VAR_resource_prefix: '${{ github.run_id }}-${{ github.run_number }}' continue-on-error: true - working-directory: ./terraform/sample-apps/http-server + working-directory: ./terraform - name: Terraform Apply run: terraform apply -var-file="fixtures.us-west-2.tfvars" -auto-approve env: TF_VAR_resource_prefix: '${{ github.run_id }}-${{ github.run_number }}' - working-directory: ./terraform/sample-apps/http-server + working-directory: ./terraform - name: Upload terraform state files for destorying resources uses: actions/upload-artifact@v2 with: name: terraform-state-artifact - path: ./terraform/sample-apps/http-server + path: ./terraform test_WebApp: name: Run testing suite