Skip to content

Commit

Permalink
NH-37575: upgrade to joboe:10.0.6
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Jun 25, 2024
1 parent e4d9c93 commit f068fe7
Show file tree
Hide file tree
Showing 9 changed files with 145 additions and 51 deletions.
57 changes: 7 additions & 50 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
Expand Down Expand Up @@ -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
Expand All @@ -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

Expand Down Expand Up @@ -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
136 changes: 136 additions & 0 deletions .github/workflows/release-test.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions agent-lambda/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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}"

Expand Down
2 changes: 1 addition & 1 deletion build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand Down
Binary file renamed libs/config-10.0.5.jar → libs/config-10.0.6.jar
Binary file not shown.
Binary file renamed libs/core-10.0.5.jar → libs/core-10.0.6.jar
Binary file not shown.
Binary file renamed libs/logging-10.0.5.jar → libs/logging-10.0.6.jar
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 comments on commit f068fe7

Please sign in to comment.