update for 8/14 non-release workflow documents #1
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: End to End Tests with Java Agent in Sample App | ||
|
Check failure on line 1 in .github/workflows/e2e-tests-app-with-java-agent.yml
|
||
| on: | ||
| workflow_call: | ||
| inputs: | ||
| aws-region: | ||
| required: true | ||
| type: string | ||
| image_tag: | ||
| required: true | ||
| type: string | ||
| caller-workflow-name: | ||
| required: true | ||
| type: string | ||
| permissions: | ||
| id-token: write | ||
| contents: read | ||
| env: | ||
| # The precense of this env var is required. It is not redundant | ||
| AWS_DEFAULT_REGION: ${{ inputs.aws-region }} | ||
| jobs: | ||
| build_Images_For_Testing_Sample_App_With_Java_Agent: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout Java Instrumentation repository | ||
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | ||
| with: | ||
| fetch-depth: 0 | ||
| - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version-file: .java-version | ||
| distribution: temurin | ||
| # cache local patch outputs | ||
| - name: Cache local Maven repository | ||
| id: cache-local-maven-repo | ||
| uses: actions/cache0400d5f644dc74513175e3cd8d07132dd4860809 #v4.2.4 | ||
| with: | ||
| path: | | ||
| ~/.m2/repository/io/opentelemetry/ | ||
| key: ${{ runner.os }}-maven-local-${{ hashFiles('.github/patches/opentelemetry-java*.patch') }} | ||
| - name: Publish patched dependencies to maven local | ||
| uses: ./.github/actions/patch-dependencies | ||
| if: steps.cache-local-maven-repo.outputs.cache-hit != 'true' | ||
| with: | ||
| gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }} | ||
| gpg_password: ${{ secrets.GPG_PASSPHRASE }} | ||
| - name: Validate the checksums of Gradle Wrapper | ||
| uses: gradle/actions/wrapper-validation@ed408507eac070d1f99cc633dbcf757c94c7933a # v4.4.3 | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | ||
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | ||
| - name: Log in to AWS ECR | ||
| uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0 | ||
| with: | ||
| registry: public.ecr.aws | ||
| - name: Build and push agent and testing docker images with Gradle | ||
| uses: gradle/actions/setup-gradle@ed408507eac070d1f99cc633dbcf757c94c7933a #4.4.3 | ||
| with: | ||
| arguments: jib | ||
| env: | ||
| COMMIT_HASH: ${{ inputs.image_tag }} | ||
| - uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 #5.5.1 | ||
| test_Spring_App_With_Java_Agent: | ||
| name: Test Spring App with AWS OTel Java agent | ||
| needs: [ build_Images_For_Testing_Sample_App_With_Java_Agent ] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | ||
| - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version-file: .java-version | ||
| distribution: 'temurin' | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | ||
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | ||
| - name: Log in to AWS ECR | ||
| uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0 | ||
| with: | ||
| registry: public.ecr.aws | ||
| - name: Run test containers | ||
| run: docker compose up --abort-on-container-exit | ||
| working-directory: .github/collector | ||
| env: | ||
| INSTANCE_ID: ${{ github.run_id }}-${{ github.run_number }} | ||
| LISTEN_ADDRESS: 0.0.0.0:8080 | ||
| APP_IMAGE: public.ecr.aws/aws-otel-test/aws-otel-java-springboot:${{ inputs.image_tag }} | ||
| VALIDATOR_COMMAND: -c springboot-otel-trace-metric-validation.yml --endpoint http://app:8080 --metric-namespace aws-otel-integ-test -t ${{ github.run_id }}-${{ github.run_number }} | ||
| test_Spark_App_With_Java_Agent: | ||
| name: Test Spark App with AWS OTel Java agent | ||
| needs: [ build_Images_For_Testing_Sample_App_With_Java_Agent ] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | ||
| - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version-file: .java-version | ||
| distribution: 'temurin' | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | ||
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | ||
| - name: Log in to AWS ECR | ||
| uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0 | ||
| with: | ||
| registry: public.ecr.aws | ||
| - name: Run test containers | ||
| run: docker compose up --abort-on-container-exit | ||
| working-directory: .github/collector | ||
| env: | ||
| INSTANCE_ID: ${{ github.run_id }}-${{ github.run_number }} | ||
| LISTEN_ADDRESS: 0.0.0.0:4567 | ||
| APP_IMAGE: public.ecr.aws/aws-otel-test/aws-otel-java-spark:${{ inputs.image_tag }} | ||
| VALIDATOR_COMMAND: -c spark-otel-trace-metric-validation.yml --endpoint http://app:4567 --metric-namespace aws-otel-integ-test -t ${{ github.run_id }}-${{ github.run_number }} | ||
| test_Spark_AWS_SDK_V1_App_With_Java_Agent: | ||
| name: Test Spark App (AWS SDK v1) with AWS OTel Java agent | ||
| needs: [ build_Images_For_Testing_Sample_App_With_Java_Agent ] | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #5.0.0 | ||
| - uses: actions/setup-java@dded0888837ed1f317902acf8a20df0ad188d165 # v5.0.0 | ||
| with: | ||
| java-version-file: .java-version | ||
| distribution: 'temurin' | ||
| - name: Configure AWS Credentials | ||
| uses: aws-actions/configure-aws-credentials@a03048d87541d1d9fcf2ecf528a4a65ba9bd7838 #5.0.0 | ||
| with: | ||
| role-to-assume: ${{ secrets.AWS_ASSUME_ROLE_ARN }} | ||
| aws-region: ${{ env.AWS_DEFAULT_REGION }} | ||
| - name: Log in to AWS ECR | ||
| uses: docker/login-action@184bdaa0721073962dff0199f1fb9940f07167d1 #v3.5.0 | ||
| with: | ||
| registry: public.ecr.aws | ||
| - name: Run test containers | ||
| run: docker compose up --abort-on-container-exit | ||
| working-directory: .github/collector | ||
| env: | ||
| INSTANCE_ID: ${{ github.run_id }}-${{ github.run_number }} | ||
| LISTEN_ADDRESS: 0.0.0.0:4567 | ||
| APP_IMAGE: public.ecr.aws/aws-otel-test/aws-otel-java-spark-awssdkv1:${{ inputs.image_tag }} | ||
| VALIDATOR_COMMAND: -c spark-otel-trace-metric-validation.yml --endpoint http://app:4567 --metric-namespace aws-otel-integ-test -t ${{ github.run_id }}-${{ github.run_number }} | ||
| # publish status | ||
| # publish-build-status: | ||
| # needs: [ test_Spring_App_With_Java_Agent, test_Spark_App_With_Java_Agent, test_Spark_AWS_SDK_V1_App_With_Java_Agent ] | ||
| # if: ${{ always() }} | ||
| # uses: ./.github/workflows/publish-status.yml | ||
| # with: | ||
| # namespace: 'ADOT/GitHubActions' | ||
| # repository: ${{ github.repository }} | ||
| # branch: ${{ github.ref_name }} | ||
| # workflow: ${{ inputs.caller-workflow-name }} | ||
| # success: ${{ needs.test_Spring_App_With_Java_Agent.result == 'success' && | ||
| # needs.test_Spark_App_With_Java_Agent.result == 'success' && | ||
| # needs.test_Spark_AWS_SDK_V1_App_With_Java_Agent.result == 'success' }} | ||
| # region: us-east-1 | ||
| # secrets: | ||
| # roleArn: ${{ secrets.METRICS_ROLE_ARN }} | ||