From 560c49eb36da91ee1998e1bbaab117748156f199 Mon Sep 17 00:00:00 2001 From: Paurush Garg Date: Wed, 8 Nov 2023 11:49:18 -0800 Subject: [PATCH 1/2] Adding changes to include appsignals contract tests and e2e tests in nightly build --- .../nightly-upstream-snapshot-build.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/nightly-upstream-snapshot-build.yml b/.github/workflows/nightly-upstream-snapshot-build.yml index b12d3af1a4..da95d94482 100644 --- a/.github/workflows/nightly-upstream-snapshot-build.yml +++ b/.github/workflows/nightly-upstream-snapshot-build.yml @@ -46,6 +46,14 @@ jobs: GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} + - name: Pull base image of Contract Tests Sample Apps + run: docker pull public.ecr.aws/docker/library/amazoncorretto:17-alpine + + - name: Run contract tests + uses: gradle/gradle-build-action@v2 + with: + arguments: build contractTests --stacktrace -PenableCoverage=true -PtestUpstreamSnapshots=true -PlocalDocker=true -Prelease.version=${{ env.APM_JAVA_VERSION }} + - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -82,6 +90,17 @@ jobs: shell: bash run: .github/scripts/test-adot-javaagent-image.sh "${{ env.IMAGE_TAG }}" "${{ env.ADOT_JAVA_VERSION }}" + # confirmation required on e2e-test + # confirmation required on cluster name + - name: appsinglas-e2e-test + needs: build + uses: ./.github/workflows/appsignals-e2e-test.yml + secrets: inherit + with: + test-cluster-name: "appsignals-adot-test" + apm-adot-image-name: ${{ env.IMAGE_TAG }} + caller-workflow-name: 'nightly-upstream-snapshot-build' + - name: Build and push image uses: docker/build-push-action@v5 with: From c9b7204d52aed90015935b64fbdda4a2683bab25 Mon Sep 17 00:00:00 2001 From: Paurush Garg Date: Wed, 15 Nov 2023 10:30:24 -0800 Subject: [PATCH 2/2] Updating nightlybuild workflow --- .../nightly-upstream-snapshot-build.yml | 39 +++++++++---------- 1 file changed, 19 insertions(+), 20 deletions(-) diff --git a/.github/workflows/nightly-upstream-snapshot-build.yml b/.github/workflows/nightly-upstream-snapshot-build.yml index da95d94482..a5d6e3fcef 100644 --- a/.github/workflows/nightly-upstream-snapshot-build.yml +++ b/.github/workflows/nightly-upstream-snapshot-build.yml @@ -15,6 +15,8 @@ permissions: jobs: build: runs-on: ubuntu-latest + outputs: + release-candidate-image: ${{ steps.imageNameOutput.outputs.imageName }} steps: - uses: actions/checkout@v4 with: @@ -36,24 +38,19 @@ jobs: with: registry: public.ecr.aws + - name: Pull base image of Contract Tests Sample Apps + run: docker pull public.ecr.aws/docker/library/amazoncorretto:17-alpine + - name: Build snapshot with Gradle uses: gradle/gradle-build-action@v2 with: - arguments: build --stacktrace -PenableCoverage=true -PtestUpstreamSnapshots=true + arguments: build contractTests --stacktrace -PenableCoverage=true -PtestUpstreamSnapshots=true -PlocalDocker=true env: PUBLISH_USERNAME: ${{ secrets.PUBLISH_USERNAME }} PUBLISH_PASSWORD: ${{ secrets.PUBLISH_PASSWORD }} GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }} GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }} - - name: Pull base image of Contract Tests Sample Apps - run: docker pull public.ecr.aws/docker/library/amazoncorretto:17-alpine - - - name: Run contract tests - uses: gradle/gradle-build-action@v2 - with: - arguments: build contractTests --stacktrace -PenableCoverage=true -PtestUpstreamSnapshots=true -PlocalDocker=true -Prelease.version=${{ env.APM_JAVA_VERSION }} - - name: Configure AWS Credentials uses: aws-actions/configure-aws-credentials@v4 with: @@ -90,17 +87,6 @@ jobs: shell: bash run: .github/scripts/test-adot-javaagent-image.sh "${{ env.IMAGE_TAG }}" "${{ env.ADOT_JAVA_VERSION }}" - # confirmation required on e2e-test - # confirmation required on cluster name - - name: appsinglas-e2e-test - needs: build - uses: ./.github/workflows/appsignals-e2e-test.yml - secrets: inherit - with: - test-cluster-name: "appsignals-adot-test" - apm-adot-image-name: ${{ env.IMAGE_TAG }} - caller-workflow-name: 'nightly-upstream-snapshot-build' - - name: Build and push image uses: docker/build-push-action@v5 with: @@ -111,12 +97,25 @@ jobs: tags: | ${{ env.IMAGE_TAG }} + - name: Set image name to output + id: imageNameOutput + run: echo "imageName=${{ env.IMAGE_NAME }}" >> "$GITHUB_OUTPUT" + - name: Upload to GitHub Actions uses: actions/upload-artifact@v3 with: name: aws-opentelemetry-agent.jar path: otelagent/build/libs/aws-opentelemetry-agent-*.jar + e2e-test: + needs: build + uses: ./.github/workflows/appsignals-e2e-eks-test.yml + secrets: inherit + with: + test-cluster-name: "e2e-adot-test" + appsignals-adot-image-name: ${{ needs.build.outputs.release-candidate-image }} + caller-workflow-name: 'nightly-upstream-snapshot-build' + publish-build-status: needs: [build] if: ${{ always() }}