Skip to content

Commit

Permalink
CUST-110209: do maven release on push and use the new SDK in smoke test.
Browse files Browse the repository at this point in the history
  • Loading branch information
cleverchuk committed Aug 20, 2024
1 parent 5a747d3 commit 88483c9
Show file tree
Hide file tree
Showing 4 changed files with 36 additions and 30 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,16 @@ env:
SWO_EMAIL: ${{ secrets.SWO_EMAIL }}
SWO_PWORD: ${{ secrets.SWO_PWORD }}
STAGE_BUCKET: ${{ secrets.STAGE_BUCKET }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}

jobs:
s3-stage-upload: # this job uploads the jar to stage s3
needs:
- maven_staging_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -420,3 +427,20 @@ jobs:
- name: Docker logout
if: always()
run: docker logout

maven_staging_release:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish
run: ./gradlew publish
30 changes: 0 additions & 30 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,6 @@ name: Release
on:
workflow_dispatch:
inputs:
run_maven_release:
type: boolean
default: false
required: false
description: Choose whether to do maven release
run_github_release:
type: boolean
default: false
Expand All @@ -34,31 +29,6 @@ env:
PROD_BUCKET: ${{ secrets.PROD_BUCKET }}

jobs:
maven_release:
if: inputs.run_maven_release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Set up JDK 17
uses: actions/setup-java@v4
with:
java-version: '17'
distribution: 'temurin'

- name: Setup Gradle
uses: gradle/actions/setup-gradle@v3

- name: Publish
run: ./gradlew publish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# The secrets are for publishing the build artifacts to the Maven Central.
SONATYPE_USERNAME: ${{ secrets.SONATYPE_USERNAME }}
SONATYPE_TOKEN: ${{ secrets.SONATYPE_TOKEN }}
GPG_PRIVATE_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
GPG_PRIVATE_KEY_PASSPHRASE: ${{ secrets.GPG_PRIVATE_KEY_PASSPHRASE }}

github_release:
if: inputs.run_github_release
runs-on: ubuntu-latest
Expand Down
10 changes: 10 additions & 0 deletions smoke-tests/netty-test/build.gradle.kts
Original file line number Diff line number Diff line change
@@ -1,3 +1,5 @@
import java.net.URI

/*
* © SolarWinds Worldwide, LLC. All rights reserved.
*
Expand Down Expand Up @@ -25,10 +27,18 @@ version = "unspecified"

repositories {
mavenCentral()
maven {
url = URI.create("https://s01.oss.sonatype.org/service/local/staging/deploy/maven2/")
credentials {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_TOKEN")
}
}
}

dependencies {
implementation("io.netty:netty-common:4.1.94.Final")
implementation("io.github.appoptics:solarwinds-otel-sdk:2.6.0")
testImplementation(platform("org.junit:junit-bom:5.9.1"))
testImplementation("org.junit.jupiter:junit-jupiter")
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,11 +17,13 @@
package com.solarwinds.netty;

import io.netty.util.NetUtil;
import com.solarwinds.api.ext.SolarwindsAgent;

import java.util.concurrent.TimeUnit;

public class NettyApp {
public static void main(String[] args){
SolarwindsAgent.setTransactionName("hello world!");
System.out.printf("Number of interfaces: %d%n",NetUtil.NETWORK_INTERFACES.size());
try {
TimeUnit.MINUTES.sleep(1);
Expand Down

0 comments on commit 88483c9

Please sign in to comment.