diff --git a/.github/workflows/application-signals-python-e2e-ec2-test.yml b/.github/workflows/application-signals-python-e2e-ec2-test.yml index 3fa6a819c..18efbfdad 100644 --- a/.github/workflows/application-signals-python-e2e-ec2-test.yml +++ b/.github/workflows/application-signals-python-e2e-ec2-test.yml @@ -24,7 +24,7 @@ permissions: contents: read env: - SAMPLE_APP_ZIP: s3://${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ inputs.aws-region }}/python-sample-app.zip + SAMPLE_APP_ZIP: s3://sample-app-remote-python/python-sample-app.zip METRIC_NAMESPACE: AppSignals LOG_GROUP_NAME: /aws/appsignals/generic ADOT_WHEEL_NAME: ${{ inputs.staging_wheel_name }} @@ -44,22 +44,23 @@ jobs: - name: Generate testing id run: echo TESTING_ID="${{ github.job }}-${{ env.AWS_DEFAULT_REGION }}-${{ github.run_id }}-${{ github.run_number }}-${{ github.run_attempt }}" >> $GITHUB_ENV - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} - aws-region: us-east-1 + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} + # aws-region: us-east-1 - - name: Retrieve account - uses: aws-actions/aws-secretsmanager-get-secrets@v1 - with: - secret-ids: - ACCOUNT_ID, region-account/${{ inputs.aws-region }} + # - name: Retrieve account + # uses: aws-actions/aws-secretsmanager-get-secrets@v1 + # with: + # secret-ids: + # ACCOUNT_ID, region-account/${{ inputs.aws-region }} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }} + # role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }} + role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }} aws-region: ${{ inputs.aws-region }} - uses: actions/download-artifact@v3 @@ -218,7 +219,7 @@ jobs: --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8001 --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --service-name python-sample-application-${{ env.TESTING_ID }} @@ -227,22 +228,22 @@ jobs: --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' - - name: Publish metric on test result - if: always() - run: | - if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 0.0 \ - --region ${{ inputs.aws-region }} - else - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 1.0 \ - --region ${{ inputs.aws-region }} - fi + # - name: Publish metric on test result + # if: always() + # run: | + # if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 0.0 \ + # --region ${{ inputs.aws-region }} + # else + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 1.0 \ + # --region ${{ inputs.aws-region }} + # fi # Clean up Procedures - name: Terraform destroy diff --git a/.github/workflows/application-signals-python-e2e-eks-test.yml b/.github/workflows/application-signals-python-e2e-eks-test.yml index 79172dd1f..133f728a4 100644 --- a/.github/workflows/application-signals-python-e2e-eks-test.yml +++ b/.github/workflows/application-signals-python-e2e-eks-test.yml @@ -64,24 +64,25 @@ jobs: echo TESTING_ID="${{ inputs.aws-region }}-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV echo PYTHON_SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} - aws-region: us-east-1 - - - name: Retrieve account - uses: aws-actions/aws-secretsmanager-get-secrets@v1 - with: - secret-ids: - ACCOUNT_ID, region-account/${{ inputs.aws-region }} + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} + # aws-region: us-east-1 + + # - name: Retrieve account + # uses: aws-actions/aws-secretsmanager-get-secrets@v1 + # with: + # secret-ids: + # ACCOUNT_ID, region-account/${{ inputs.aws-region }} # ADOT_E2E_TEST_ROLE_ARN is used to access main build e2e test cluster # E2E_TEST_ROLE_ARN is used to access canary e2e test cluster - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ inputs['caller-workflow-name'] == 'main-build' && secrets.ADOT_E2E_TEST_ROLE_ARN || secrets.E2E_TEST_ROLE_ARN }} + # role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ inputs['caller-workflow-name'] == 'main-build' && secrets.ADOT_E2E_TEST_ROLE_ARN || secrets.E2E_TEST_ROLE_ARN }} + role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }} aws-region: ${{ inputs.aws-region }} - name: Set up kubeconfig @@ -137,8 +138,8 @@ jobs: -var="eks_cluster_context_name=$(kubectl config current-context)" \ -var="test_namespace=${{ env.PYTHON_SAMPLE_APP_NAMESPACE }}" \ -var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \ - -var="python_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_FE_SA_IMG }}" \ - -var="python_remote_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_RE_SA_IMG }}" \ + -var="python_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_FE_SA_IMG }}" \ + -var="python_remote_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_RE_SA_IMG }}" \ || deployment_failed=$? if [ $deployment_failed -eq 1 ]; then @@ -211,8 +212,8 @@ jobs: -var="eks_cluster_context_name=$(kubectl config current-context)" \ -var="test_namespace=${{ env.PYTHON_SAMPLE_APP_NAMESPACE }}" \ -var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \ - -var="python_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_FE_SA_IMG }}" \ - -var="python_remote_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_RE_SA_IMG }}" + -var="python_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_FE_SA_IMG }}" \ + -var="python_remote_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_RE_SA_IMG }}" retry_counter=$(($retry_counter+1)) else @@ -270,7 +271,7 @@ jobs: --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.PYTHON_SAMPLE_APP_NAMESPACE }} @@ -287,7 +288,7 @@ jobs: --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.PYTHON_SAMPLE_APP_NAMESPACE }} @@ -305,7 +306,7 @@ jobs: --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.PYTHON_SAMPLE_APP_NAMESPACE }} --platform-info ${{ inputs.test-cluster-name }} @@ -314,22 +315,22 @@ jobs: --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }} --rollup' - - name: Publish metric on test result - if: always() - run: | - if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 0.0 \ - --region ${{ inputs.aws-region }} - else - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 1.0 \ - --region ${{ inputs.aws-region }} - fi + # - name: Publish metric on test result + # if: always() + # run: | + # if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 0.0 \ + # --region ${{ inputs.aws-region }} + # else + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 1.0 \ + # --region ${{ inputs.aws-region }} + # fi # Clean up Procedures @@ -363,8 +364,8 @@ jobs: -var="eks_cluster_name=${{ inputs.test-cluster-name }}" \ -var="test_namespace=${{ env.PYTHON_SAMPLE_APP_NAMESPACE }}" \ -var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \ - -var="python_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_FE_SA_IMG }}" \ - -var="python_remote_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_RE_SA_IMG }}" + -var="python_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_FE_SA_IMG }}" \ + -var="python_remote_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_PYTHON_E2E_RE_SA_IMG }}" - name: Remove aws access service account if: always() @@ -374,4 +375,4 @@ jobs: --name service-account-${{ env.TESTING_ID }} \ --namespace ${{ env.PYTHON_SAMPLE_APP_NAMESPACE }} \ --cluster ${{ inputs.test-cluster-name }} \ - --region ${{ inputs.aws-region }} + --region ${{ inputs.aws-region }} \ No newline at end of file diff --git a/.github/workflows/appsignals-e2e-ec2-canary-test.yml b/.github/workflows/appsignals-e2e-ec2-canary-test.yml index 0ac39fef8..1f7f77a76 100644 --- a/.github/workflows/appsignals-e2e-ec2-canary-test.yml +++ b/.github/workflows/appsignals-e2e-ec2-canary-test.yml @@ -7,8 +7,8 @@ ## including logs, metrics, and traces. name: App Signals Enablement - E2E EC2 Canary Testing on: - schedule: - - cron: '*/15 * * * *' # run the workflow every 15 minutes + # schedule: + # - cron: '*/15 * * * *' # run the workflow every 15 minutes workflow_dispatch: # be able to run the workflow on demand permissions: diff --git a/.github/workflows/appsignals-e2e-ec2-test.yml b/.github/workflows/appsignals-e2e-ec2-test.yml index 33544e769..c798d9994 100644 --- a/.github/workflows/appsignals-e2e-ec2-test.yml +++ b/.github/workflows/appsignals-e2e-ec2-test.yml @@ -24,8 +24,8 @@ env: # It is not redundant AWS_DEFAULT_REGION: ${{ inputs.aws-region }} TEST_ACCOUNT: ${{ secrets.APP_SIGNALS_E2E_TEST_ACC }} - SAMPLE_APP_FRONTEND_SERVICE_JAR: s3://${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ inputs.aws-region }}/main-service.jar - SAMPLE_APP_REMOTE_SERVICE_JAR: s3://${{ secrets.APP_SIGNALS_E2E_EC2_JAR }}-prod-${{ inputs.aws-region }}/remote-service.jar + SAMPLE_APP_FRONTEND_SERVICE_JAR: s3://sample-app-remote/sample-app.jar + SAMPLE_APP_REMOTE_SERVICE_JAR: s3://sample-app-remote/sample-app-remote.jar APP_SIGNALS_ADOT_JAR: "https://github.com/aws-observability/aws-otel-java-instrumentation/releases/latest/download/aws-opentelemetry-agent.jar" METRIC_NAMESPACE: AppSignals LOG_GROUP_NAME: /aws/appsignals/generic @@ -46,22 +46,22 @@ jobs: - name: Generate testing id run: echo TESTING_ID="${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} - aws-region: us-east-1 + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} + # aws-region: us-east-1 - - name: Retrieve account - uses: aws-actions/aws-secretsmanager-get-secrets@v1 - with: - secret-ids: - ACCOUNT_ID, region-account/${{ inputs.aws-region }} + # - name: Retrieve account + # uses: aws-actions/aws-secretsmanager-get-secrets@v1 + # with: + # secret-ids: + # ACCOUNT_ID, region-account/${{ inputs.aws-region }} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }} + role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN_JAVA_EKS }} aws-region: ${{ inputs.aws-region }} - name: Initiate Terraform @@ -186,7 +186,7 @@ jobs: --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --service-name sample-application-${{ env.TESTING_ID }} @@ -203,7 +203,7 @@ jobs: --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --service-name sample-application-${{ env.TESTING_ID }} @@ -220,7 +220,7 @@ jobs: --endpoint http://${{ env.MAIN_SERVICE_ENDPOINT }} --remote-service-deployment-name ${{ env.REMOTE_SERVICE_IP }}:8080 --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --service-name sample-application-${{ env.TESTING_ID }} @@ -229,22 +229,22 @@ jobs: --instance-ami ${{ env.EC2_INSTANCE_AMI }} --rollup' - - name: Publish metric on test result - if: always() - run: | - if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 0.0 \ - --region ${{ inputs.aws-region }} - else - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 1.0 \ - --region ${{ inputs.aws-region }} - fi + # - name: Publish metric on test result + # if: always() + # run: | + # if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 0.0 \ + # --region ${{ inputs.aws-region }} + # else + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 1.0 \ + # --region ${{ inputs.aws-region }} + # fi # Clean up Procedures - name: Terraform destroy diff --git a/.github/workflows/appsignals-e2e-eks-canary-test.yml b/.github/workflows/appsignals-e2e-eks-canary-test.yml index 4149c72a3..52e2106e6 100644 --- a/.github/workflows/appsignals-e2e-eks-canary-test.yml +++ b/.github/workflows/appsignals-e2e-eks-canary-test.yml @@ -7,8 +7,8 @@ ## including logs, metrics, and traces. name: App Signals Enablement - E2E EKS Canary Testing on: - schedule: - - cron: '*/15 * * * *' # run the workflow every 15 minutes + # schedule: + # - cron: '*/15 * * * *' # run the workflow every 15 minutes workflow_dispatch: # be able to run the workflow on demand permissions: diff --git a/.github/workflows/appsignals-e2e-eks-test.yml b/.github/workflows/appsignals-e2e-eks-test.yml index 55d1815bc..c65222050 100644 --- a/.github/workflows/appsignals-e2e-eks-test.yml +++ b/.github/workflows/appsignals-e2e-eks-test.yml @@ -71,22 +71,22 @@ jobs: echo TESTING_ID="${{ inputs.aws-region }}-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV echo SAMPLE_APP_NAMESPACE="ns-${{ github.run_id }}-${{ github.run_number }}" >> $GITHUB_ENV - - name: Configure AWS Credentials - uses: aws-actions/configure-aws-credentials@v4 - with: - role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} - aws-region: us-east-1 - - - name: Retrieve account - uses: aws-actions/aws-secretsmanager-get-secrets@v1 - with: - secret-ids: - ACCOUNT_ID, region-account/${{ inputs.aws-region }} + # - name: Configure AWS Credentials + # uses: aws-actions/configure-aws-credentials@v4 + # with: + # role-to-assume: ${{ secrets.E2E_SECRET_TEST_ROLE_ARN }} + # aws-region: us-east-1 + + # - name: Retrieve account + # uses: aws-actions/aws-secretsmanager-get-secrets@v1 + # with: + # secret-ids: + # ACCOUNT_ID, region-account/${{ inputs.aws-region }} - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: - role-to-assume: arn:aws:iam::${{ env.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN }} + role-to-assume: arn:aws:iam::${{ secrets.ACCOUNT_ID }}:role/${{ secrets.E2E_TEST_ROLE_ARN_JAVA_EKS }} aws-region: ${{ inputs.aws-region }} - name: Set up kubeconfig @@ -142,8 +142,8 @@ jobs: -var="eks_cluster_context_name=$(kubectl config current-context)" \ -var="test_namespace=${{ env.SAMPLE_APP_NAMESPACE }}" \ -var="service_account_aws_access=service-account-${{ env.TESTING_ID }}" \ - -var="sample_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_E2E_FE_SA_IMG }}" \ - -var="sample_remote_app_image=${{ env.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_E2E_RE_SA_IMG }}" \ + -var="sample_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_E2E_FE_SA_IMG }}" \ + -var="sample_remote_app_image=${{ secrets.ACCOUNT_ID }}.dkr.ecr.${{ inputs.aws-region }}.amazonaws.com/${{ secrets.APP_SIGNALS_E2E_RE_SA_IMG }}" \ || deployment_failed=$? if [ $deployment_failed -ne 0 ]; then @@ -281,7 +281,7 @@ jobs: --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} @@ -298,7 +298,7 @@ jobs: --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} @@ -316,7 +316,7 @@ jobs: --testing-id ${{ env.TESTING_ID }} --endpoint http://${{ env.APP_ENDPOINT }} --region ${{ inputs.aws-region }} - --account-id ${{ env.ACCOUNT_ID }} + --account-id ${{ secrets.ACCOUNT_ID }} --metric-namespace ${{ env.METRIC_NAMESPACE }} --log-group ${{ env.LOG_GROUP_NAME }} --app-namespace ${{ env.SAMPLE_APP_NAMESPACE }} @@ -326,22 +326,22 @@ jobs: --query-string ip=${{ env.REMOTE_SERVICE_POD_IP }} --rollup' - - name: Publish metric on test result - if: always() - run: | - if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 0.0 \ - --region ${{ inputs.aws-region }} - else - aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ - --metric-name Failure \ - --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ - --value 1.0 \ - --region ${{ inputs.aws-region }} - fi + # - name: Publish metric on test result + # if: always() + # run: | + # if [ "${{ steps.log-validation.outcome }}" = "success" ] && [ "${{ steps.metric-validation.outcome }}" = "success" ] && [ "${{ steps.trace-validation.outcome }}" = "success" ]; then + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 0.0 \ + # --region ${{ inputs.aws-region }} + # else + # aws cloudwatch put-metric-data --namespace 'ADOT/GitHubActions' \ + # --metric-name Failure \ + # --dimensions repository=${{ github.repository }},branch=${{ github.ref_name }},workflow=${{ inputs.caller-workflow-name }} \ + # --value 1.0 \ + # --region ${{ inputs.aws-region }} + # fi # Clean up Procedures diff --git a/.github/workflows/test-ec2-java.yml b/.github/workflows/test-ec2-java.yml new file mode 100644 index 000000000..840fc9d79 --- /dev/null +++ b/.github/workflows/test-ec2-java.yml @@ -0,0 +1,21 @@ +name: test-ec2-java +on: + schedule: + - cron: '*/15 * * * *' # run the workflow every 15 minutes + workflow_dispatch: # be able to run the workflow on demand + +permissions: + id-token: write + contents: read + +jobs: + e2e-test: + strategy: + fail-fast: false + matrix: + aws-region: ['us-east-1'] + uses: ./.github/workflows/appsignals-e2e-ec2-test.yml + secrets: inherit + with: + aws-region: ${{ matrix.aws-region }} + caller-workflow-name: 'test-ec2-java' \ No newline at end of file diff --git a/.github/workflows/test-ec2-python.yml b/.github/workflows/test-ec2-python.yml new file mode 100644 index 000000000..d99288746 --- /dev/null +++ b/.github/workflows/test-ec2-python.yml @@ -0,0 +1,21 @@ +name: test-ec2-python +on: + schedule: + - cron: '*/15 * * * *' # run the workflow every 15 minutes + workflow_dispatch: # be able to run the workflow on demand + +permissions: + id-token: write + contents: read + +jobs: + e2e-test: + strategy: + fail-fast: false + matrix: + aws-region: ['us-east-1'] + uses: ./.github/workflows/application-signals-python-e2e-ec2-test.yml + secrets: inherit + with: + aws-region: ${{ matrix.aws-region }} + caller-workflow-name: 'test-ec2-python' \ No newline at end of file diff --git a/.github/workflows/test-eks-java.yml b/.github/workflows/test-eks-java.yml new file mode 100644 index 000000000..6f0abf5a8 --- /dev/null +++ b/.github/workflows/test-eks-java.yml @@ -0,0 +1,22 @@ +name: test-eks-java +on: + schedule: + - cron: '*/15 * * * *' # run the workflow every 15 minutes + workflow_dispatch: # be able to run the workflow on demand + +permissions: + id-token: write + contents: read + +jobs: + e2e-test: + strategy: + fail-fast: false + matrix: + aws-region: ['us-east-1'] + uses: ./.github/workflows/appsignals-e2e-eks-test.yml + secrets: inherit + with: + aws-region: ${{ matrix.aws-region }} + test-cluster-name: 'e2e-canary-test' + caller-workflow-name: 'test-eks-java' \ No newline at end of file diff --git a/.github/workflows/test-eks-python.yml b/.github/workflows/test-eks-python.yml new file mode 100644 index 000000000..80adf8ccd --- /dev/null +++ b/.github/workflows/test-eks-python.yml @@ -0,0 +1,24 @@ +name: test-eks-python +on: + schedule: + - cron: '*/15 * * * *' # run the workflow every 15 minutes + workflow_dispatch: # be able to run the workflow on demand + +permissions: + id-token: write + contents: read + +jobs: + e2e-test: + strategy: + fail-fast: false + matrix: + aws-region: ['us-east-1'] + uses: ./.github/workflows/application-signals-python-e2e-eks-test.yml + secrets: inherit + with: + aws-region: ${{ matrix.aws-region }} + test-cluster-name: 'e2e-canary-test-python' + caller-workflow-name: 'test-eks-python' + application-signals-adot-image: public.ecr.aws/aws-observability/adot-autoinstrumentation-python + application-signals-adot-image-tag: v0.0.1 \ No newline at end of file