From 070f26767ba7e7c477c37b2db502b9a0eea3327d Mon Sep 17 00:00:00 2001 From: Harry Date: Wed, 11 Dec 2024 23:09:52 -0800 Subject: [PATCH] Test --- .github/workflows/java-ec2-asg-test.yml | 4 ++-- .github/workflows/java-ec2-default-test.yml | 4 ++-- .github/workflows/java-k8s-canary.yml | 1 + .github/workflows/java-k8s-test.yml | 4 ++-- .github/workflows/traffic-generator-image-build.yml | 2 +- terraform/java/ec2/default/main.tf | 2 +- 6 files changed, 9 insertions(+), 8 deletions(-) diff --git a/.github/workflows/java-ec2-asg-test.yml b/.github/workflows/java-ec2-asg-test.yml index 8f28c502e..b260cc2d2 100644 --- a/.github/workflows/java-ec2-asg-test.yml +++ b/.github/workflows/java-ec2-asg-test.yml @@ -39,8 +39,8 @@ env: CALLER_WORKFLOW_NAME: ${{ inputs.caller-workflow-name }} JAVA_VERSION: ${{ inputs.java-version }} CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }} - SAMPLE_APP_FRONTEND_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/java-main-service-v${{ inputs.java-version }}.jar - SAMPLE_APP_REMOTE_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/java-remote-service-v${{ inputs.java-version }}.jar + SAMPLE_APP_FRONTEND_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}-2/java-main-service-v${{ inputs.java-version }}.jar + SAMPLE_APP_REMOTE_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}-2/java-remote-service-v${{ inputs.java-version }}.jar E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} METRIC_NAMESPACE: ApplicationSignals diff --git a/.github/workflows/java-ec2-default-test.yml b/.github/workflows/java-ec2-default-test.yml index 8fd59a90d..714ae9eef 100644 --- a/.github/workflows/java-ec2-default-test.yml +++ b/.github/workflows/java-ec2-default-test.yml @@ -44,8 +44,8 @@ env: JAVA_VERSION: ${{ inputs.java-version }} OTEL_SOURCE: ${{ inputs.otel-source }} CPU_ARCHITECTURE: ${{ inputs.cpu-architecture }} - SAMPLE_APP_FRONTEND_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/java-main-service-v${{ inputs.java-version }}.jar - SAMPLE_APP_REMOTE_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}/java-remote-service-v${{ inputs.java-version }}.jar + SAMPLE_APP_FRONTEND_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}-2/java-main-service-v${{ inputs.java-version }}.jar + SAMPLE_APP_REMOTE_SERVICE_JAR: s3://aws-appsignals-sample-app-prod-${{ inputs.aws-region }}-2/java-remote-service-v${{ inputs.java-version }}.jar E2E_TEST_ACCOUNT_ID: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ACCOUNT_ID }} E2E_TEST_ROLE_NAME: ${{ secrets.APPLICATION_SIGNALS_E2E_TEST_ROLE_NAME }} METRIC_NAMESPACE: ApplicationSignals diff --git a/.github/workflows/java-k8s-canary.yml b/.github/workflows/java-k8s-canary.yml index f79592921..a993b7225 100644 --- a/.github/workflows/java-k8s-canary.yml +++ b/.github/workflows/java-k8s-canary.yml @@ -11,6 +11,7 @@ on: schedule: - cron: '0,25 * * * *' # run the workflow at 0th and 25th minute of every hour workflow_dispatch: # be able to run the workflow on demand + push: permissions: id-token: write diff --git a/.github/workflows/java-k8s-test.yml b/.github/workflows/java-k8s-test.yml index 61bef4c85..6b6d26f3b 100644 --- a/.github/workflows/java-k8s-test.yml +++ b/.github/workflows/java-k8s-test.yml @@ -123,8 +123,8 @@ jobs: sed -i 's#\${IMAGE}#${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_MAIN_SAMPLE_APP_IMAGE }}:v${{ env.JAVA_VERSION }}#' frontend-service-depl.yaml sed -i 's#\${TESTING_ID}#${{ env.TESTING_ID }}#' remote-service-depl.yaml sed -i 's#\${IMAGE}#${{ env.ACCOUNT_ID }}.dkr.ecr.${{ env.E2E_TEST_AWS_REGION }}.amazonaws.com/${{ env.JAVA_REMOTE_SAMPLE_APP_IMAGE }}:v${{ env.JAVA_VERSION }}#' remote-service-depl.yaml - aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }} --key frontend-service-depl-${{ env.TESTING_ID }}.yaml --body frontend-service-depl.yaml - aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }} --key remote-service-depl-${{ env.TESTING_ID }}.yaml --body remote-service-depl.yaml + aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }}-2 --key frontend-service-depl-${{ env.TESTING_ID }}.yaml --body frontend-service-depl.yaml + aws s3api put-object --bucket aws-appsignals-sample-app-prod-${{ env.E2E_TEST_AWS_REGION }}-2 --key remote-service-depl-${{ env.TESTING_ID }}.yaml --body remote-service-depl.yaml - name: Set up terraform uses: ./.github/workflows/actions/execute_and_retry diff --git a/.github/workflows/traffic-generator-image-build.yml b/.github/workflows/traffic-generator-image-build.yml index a1e757321..b5197c722 100644 --- a/.github/workflows/traffic-generator-image-build.yml +++ b/.github/workflows/traffic-generator-image-build.yml @@ -88,4 +88,4 @@ jobs: working-directory: sample-apps/traffic-generator run: | zip traffic-generator.zip ./index.js ./package.json - aws s3 cp traffic-generator.zip s3://aws-appsignals-sample-app-prod-${{ matrix.aws-region }}/traffic-generator.zip \ No newline at end of file + aws s3 cp traffic-generator.zip s3://aws-appsignals-sample-app-prod-${{ matrix.aws-region }}-2/traffic-generator.zip \ No newline at end of file diff --git a/terraform/java/ec2/default/main.tf b/terraform/java/ec2/default/main.tf index 36dfd369d..6e97f6a0e 100644 --- a/terraform/java/ec2/default/main.tf +++ b/terraform/java/ec2/default/main.tf @@ -283,7 +283,7 @@ resource "null_resource" "traffic_generator_setup" { sudo yum install nodejs aws-cli unzip tmux -y # Bring in the traffic generator files to EC2 Instance - aws s3 cp s3://aws-appsignals-sample-app-prod-${var.aws_region}/traffic-generator.zip ./traffic-generator.zip + aws s3 cp s3://aws-appsignals-sample-app-prod-${var.aws_region}-2/traffic-generator.zip ./traffic-generator.zip unzip ./traffic-generator.zip -d ./ # Install the traffic generator dependencies