diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 0580ed37..090cca60 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -12,7 +12,7 @@ permissions: env: SW_APM_DEBUG_LEVEL: trace AGENT_DOWNLOAD_URL: https://agent-binaries.global.st-ssp.solarwinds.com/apm/java/latest/solarwinds-apm-agent.jar - SW_APM_COLLECTOR: apm.collector.na-01.st-ssp.solarwinds.com + SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR }} OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }} SW_APM_SERVICE_KEY_AO: ${{ secrets.SW_APM_SERVICE_KEY_AO }} SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }} @@ -179,6 +179,9 @@ jobs: java-version: '17' distribution: 'temurin' + - name: Setup Gradle + uses: gradle/gradle-build-action@v3 + - name: Build smoke-test run: | cd smoke-tests @@ -190,9 +193,10 @@ jobs: - name: Execute smoke tests run: | cd smoke-tests - ./gradlew test + ./gradlew test -s - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v3 + if: always() with: path: smoke-tests/build/reports/tests/test @@ -346,50 +350,3 @@ jobs: .\gradlew.bat :netty-test:run env: SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }}:smoke-test-windows - - release-test: - runs-on: windows-latest - env: - LAMBDA: "false" - needs: - - lambda-release-test - steps: - - uses: actions/checkout@v4 - with: - token: ${{ secrets.GITHUB_TOKEN }} - - - name: Set up JDK 17 - uses: actions/setup-java@v4 - with: - java-version: '17' - distribution: 'temurin' - - - name: Build smoke-test - run: | - cd smoke-tests - ./gradlew build -x test - - - name: Docker login - run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin - - - name: Build webmvc jar - run: | - cd smoke-tests - ./gradlew :spring-boot-webmvc:build - - - name: Build webmvc image - run: | - cd smoke-tests/spring-boot-webmvc - docker image build --tag smt:webmvc . - - - name: Execute smoke tests - run: | - cd smoke-tests - ./gradlew test - - - uses: actions/upload-artifact@v4 - with: - path: smoke-tests/build/reports/tests/test - - - name: Docker logout - run: docker logout diff --git a/.github/workflows/release-test.yml b/.github/workflows/release-test.yml new file mode 100644 index 00000000..668c6331 --- /dev/null +++ b/.github/workflows/release-test.yml @@ -0,0 +1,136 @@ +name: Release-test + +on: + workflow_dispatch: + push: + +permissions: + packages: write + contents: read + id-token: write + +env: + SW_APM_DEBUG_LEVEL: trace + AGENT_DOWNLOAD_URL: https://agent-binaries.global.st-ssp.solarwinds.com/apm/java/latest/solarwinds-apm-agent.jar + SW_APM_COLLECTOR: ${{ secrets.SW_APM_COLLECTOR }} + OTEL_EXPORTER_OTLP_ENDPOINT: ${{ secrets.OTEL_EXPORTER_OTLP_ENDPOINT }} + SW_APM_SERVICE_KEY_AO: ${{ secrets.SW_APM_SERVICE_KEY_AO }} + SW_APM_SERVICE_KEY: ${{ secrets.SW_APM_SERVICE_KEY }} + GITHUB_USERNAME: ${{ github.actor }} + SWO_LOGIN_URL: ${{ secrets.SWO_LOGIN_URL }} + SWO_HOST_URL: ${{ secrets.SWO_HOST_URL }} + SWO_EMAIL: ${{ secrets.SWO_EMAIL }} + SWO_PWORD: ${{ secrets.SWO_PWORD }} + STAGE_BUCKET: ${{ secrets.STAGE_BUCKET }} + +jobs: + s3-stage-upload: # this job uploads the jar to stage s3 + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - uses: aws-actions/configure-aws-credentials@v4 + with: + role-to-assume: ${{ secrets.AWS_S3_ROLE_ARN_SSP_STAGE }} + aws-region: "us-east-1" + + - name: Build agent + run: ./gradlew clean build -x test + + - name: Set agent version env + run: | + echo "AGENT_VERSION=$(cd agent/build/libs && unzip -p solarwinds-apm-agent.jar META-INF/MANIFEST.MF | grep Implementation-Version | awk '{ print $2 }')" >> $GITHUB_ENV + + - name: Copy to S3 + run: | + ls -al + aws s3 cp agent/build/libs/solarwinds-apm-agent.jar \ + s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-agent.jar \ + --acl public-read + + aws s3 cp agent-lambda/build/libs/solarwinds-apm-agent-lambda.jar \ + s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-agent-lambda.jar \ + --acl public-read + + aws s3 cp custom/shared/src/main/resources/solarwinds-apm-config.json \ + s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-config.json \ + --acl public-read + + - name: Copy to S3(latest) + run: | + aws s3 cp s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-agent.jar \ + s3://$STAGE_BUCKET/apm/java/latest/solarwinds-apm-agent.jar \ + --acl public-read + + aws s3 cp s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-agent-lambda.jar \ + s3://$STAGE_BUCKET/apm/java/latest/solarwinds-apm-agent-lambda.jar \ + --acl public-read + + aws s3 cp s3://$STAGE_BUCKET/apm/java/$AGENT_VERSION/solarwinds-apm-config.json \ + s3://$STAGE_BUCKET/apm/java/latest/solarwinds-apm-config.json \ + --acl public-read + + touch VERSION + echo "version: $AGENT_VERSION" >> VERSION + SHA256=$(sha256sum agent/build/libs/solarwinds-apm-agent.jar) + echo "sha256: $SHA256" >> VERSION + + aws s3 cp VERSION \ + s3://$STAGE_BUCKET/apm/java/latest/VERSION \ + --acl public-read + + release-test: + runs-on: ubuntu-latest + env: + LAMBDA: "false" + needs: + - s3-stage-upload + steps: + - uses: actions/checkout@v4 + with: + token: ${{ secrets.GITHUB_TOKEN }} + + - name: Set up JDK 17 + uses: actions/setup-java@v4 + with: + java-version: '17' + distribution: 'temurin' + + - name: Docker login + run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u $GITHUB_USERNAME --password-stdin + + - name: Build smoke-test + run: | + cd smoke-tests + ./gradlew build -x test + + - name: Build webmvc jar + run: | + cd smoke-tests + ./gradlew :spring-boot-webmvc:build + + - name: Build webmvc image + run: | + cd smoke-tests/spring-boot-webmvc + docker image build --tag smt:webmvc . + + - name: Execute smoke tests + run: | + cd smoke-tests + ./gradlew test + + - uses: actions/upload-artifact@v3 + if: always() + with: + path: smoke-tests/build/reports/tests/test + + - name: Docker logout + run: docker logout diff --git a/agent-lambda/build.gradle b/agent-lambda/build.gradle index 51720c45..d259296b 100644 --- a/agent-lambda/build.gradle +++ b/agent-lambda/build.gradle @@ -54,6 +54,7 @@ dependencies { bootstrapLibs project(path: ":bootstrap") bootstrapLibs "com.solarwinds.joboe:config:${versions.joboe}" + bootstrapLibs "org.json:json:${versions.json}" bootstrapLibs "com.solarwinds.joboe:sampling:${versions.joboe}" bootstrapLibs "com.solarwinds.joboe:logging:${versions.joboe}" diff --git a/build.gradle b/build.gradle index 75540481..99646700 100644 --- a/build.gradle +++ b/build.gradle @@ -44,7 +44,7 @@ subprojects { opentelemetryJavaagent: "2.4.0", bytebuddy : "1.12.10", guava : "30.1-jre", - joboe: "10.0.5", + joboe : "10.0.6", agent : "2.4.0", // the custom distro agent version autoservice : "1.0.1", caffeine : "2.9.3", diff --git a/libs/config-10.0.5.jar b/libs/config-10.0.6.jar similarity index 84% rename from libs/config-10.0.5.jar rename to libs/config-10.0.6.jar index 87cded6b..ad94399f 100644 Binary files a/libs/config-10.0.5.jar and b/libs/config-10.0.6.jar differ diff --git a/libs/core-10.0.5.jar b/libs/core-10.0.6.jar similarity index 95% rename from libs/core-10.0.5.jar rename to libs/core-10.0.6.jar index 60797c5b..9cb9b7ea 100644 Binary files a/libs/core-10.0.5.jar and b/libs/core-10.0.6.jar differ diff --git a/libs/logging-10.0.5.jar b/libs/logging-10.0.6.jar similarity index 84% rename from libs/logging-10.0.5.jar rename to libs/logging-10.0.6.jar index fee2ff61..c7055cb1 100644 Binary files a/libs/logging-10.0.5.jar and b/libs/logging-10.0.6.jar differ diff --git a/libs/metrics-10.0.5.jar b/libs/metrics-10.0.6.jar similarity index 88% rename from libs/metrics-10.0.5.jar rename to libs/metrics-10.0.6.jar index d2887ce8..c00b57ae 100644 Binary files a/libs/metrics-10.0.5.jar and b/libs/metrics-10.0.6.jar differ diff --git a/libs/sampling-10.0.5.jar b/libs/sampling-10.0.6.jar similarity index 87% rename from libs/sampling-10.0.5.jar rename to libs/sampling-10.0.6.jar index 9f8d35cc..f3ec0b4b 100644 Binary files a/libs/sampling-10.0.5.jar and b/libs/sampling-10.0.6.jar differ