Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 16 additions & 7 deletions .github/workflows/maven-publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,16 +19,25 @@ jobs:
- uses: actions/setup-java@v3
with:
distribution: temurin # Temurin is a distribution of adoptium
java-version: 11
java-version: 21
- uses: actions/checkout@v3
- uses: aws-actions/configure-aws-credentials@v1

- name: Load secret
uses: 1password/load-secrets-action@v2
with:
# Export loaded secrets as environment variables
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
MAVEN_SNAPSHOTS_S3_REPO: op://opensearch-infra-secrets/maven-snapshots-s3/repo
MAVEN_SNAPSHOTS_S3_ROLE: op://opensearch-infra-secrets/maven-snapshots-s3/role

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v5
with:
role-to-assume: ${{ secrets.PUBLISH_SNAPSHOTS_ROLE }}
role-to-assume: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1

- name: publish snapshots to maven
run: |
export SONATYPE_USERNAME=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-username --query SecretString --output text)
export SONATYPE_PASSWORD=$(aws secretsmanager get-secret-value --secret-id maven-snapshots-password --query SecretString --output text)
echo "::add-mask::$SONATYPE_USERNAME"
echo "::add-mask::$SONATYPE_PASSWORD"
./gradlew publishPluginZipPublicationToSnapshotsRepository
26 changes: 14 additions & 12 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ buildscript {
isSnapshot = "true" == System.getProperty("build.snapshot", "true")
buildVersionQualifier = System.getProperty("build.version_qualifier", "")

default_bwc_version = System.getProperty("bwc.version", "2.17.0.0")
// Hardcoding BWC to 2.19 as maven does not have older version snapshots resulting in build failure
default_bwc_version = System.getProperty("bwc.version", "2.19.0.0")
pa_bwc_version = System.getProperty("tests.bwc.version", default_bwc_version)
baseName = "paBwcCluster"

Expand All @@ -34,7 +35,7 @@ buildscript {
// Used to resolve build file dependencies
repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
Expand All @@ -48,7 +49,7 @@ buildscript {
plugins {
id 'java'
id 'com.netflix.nebula.ospackage' version "11.6.0"
id 'com.github.spotbugs' version '6.2.2'
id 'com.github.spotbugs' version '6.2.4'
id 'jacoco'
id 'com.diffplug.spotless' version '6.25.0'
id 'checkstyle'
Expand All @@ -58,7 +59,7 @@ plugins {
}

checkstyle {
toolVersion = '10.26.1'
toolVersion = '11.0.0'
configFile file("checkstyle/checkstyle.xml")
}

Expand Down Expand Up @@ -165,10 +166,11 @@ publishing {
repositories {
maven {
name = "Snapshots"
url = "https://aws.oss.sonatype.org/content/repositories/snapshots"
credentials {
username "$System.env.SONATYPE_USERNAME"
password "$System.env.SONATYPE_PASSWORD"
url = System.getenv("MAVEN_SNAPSHOTS_S3_REPO")
credentials(AwsCredentials) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
sessionToken = System.getenv("AWS_SESSION_TOKEN")
}
}
}
Expand Down Expand Up @@ -197,7 +199,7 @@ publishing {

repositories {
mavenLocal()
maven { url "https://aws.oss.sonatype.org/content/repositories/snapshots" }
maven { url "https://ci.opensearch.org/ci/dbc/snapshots/maven/" }
mavenCentral()
maven { url "https://plugins.gradle.org/m2/" }
}
Expand Down Expand Up @@ -294,15 +296,15 @@ dependencies {
force "com.fasterxml.jackson.dataformat:jackson-dataformat-cbor:${jacksonVersion}"
force "org.apache.commons:commons-lang3:${versions.commonslang}"
force "org.slf4j:slf4j-api:2.0.0"
force "org.apache.bcel:bcel:6.6.0" // This line should be removed once Spotbugs is upgraded to 4.7.4
force "com.google.guava:guava:${guavaVersion}"
force "io.netty:netty-codec-http2:${nettyVersion}"
}
}

implementation 'org.jooq:jooq:3.10.8'
implementation 'org.apache.commons:commons-lang3:3.9'
implementation "org.apache.commons:commons-lang3:${versions.commonslang}"
implementation 'org.bouncycastle:bcprov-jdk15to18:1.78.1'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.78.1'
implementation 'org.bouncycastle:bcpkix-jdk18on:1.79'
implementation "org.opensearch:performance-analyzer-commons:${paCommonsVersion}"
implementation "com.fasterxml.jackson.core:jackson-annotations:${jacksonVersion}"
implementation "com.fasterxml.jackson.core:jackson-databind:${jacksonDataBindVersion}"
Expand Down
1 change: 0 additions & 1 deletion licenses/bcpkix-jdk15to18-1.78.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/bcpkix-jdk18on-1.79.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7693cec3b8779b74b35466dcaeeaac7409872954
1 change: 0 additions & 1 deletion licenses/commons-lang3-3.13.0.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/commons-lang3-3.14.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
1ed471194b02f2c6cb734a0cd6f6f107c673afae
1 change: 0 additions & 1 deletion licenses/failureaccess-1.0.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/failureaccess-1.0.2.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
c4a06a64e650562f30b7bf9aaec1bfed43aca12b
1 change: 0 additions & 1 deletion licenses/guava-32.1.1-jre.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/guava-33.2.1-jre.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
818e780da2c66c63bbb6480fef1f3855eeafa3e4
1 change: 0 additions & 1 deletion licenses/jackson-annotations-2.16.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/jackson-annotations-2.18.2.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
985d77751ebc7fce5db115a986bc9aa82f973f4a
1 change: 0 additions & 1 deletion licenses/jackson-databind-2.16.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/jackson-databind-2.18.2.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
deef8697b92141fb6caf7aa86966cff4eec9b04f
1 change: 0 additions & 1 deletion licenses/jackson-module-paranamer-2.16.1.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/jackson-module-paranamer-2.18.2.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e47799848ddd2640ed6c01899db43ddabdac11b0
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
b421526c5f297295adef1c886e5246c39d4ac629
1 change: 0 additions & 1 deletion licenses/netty-buffer-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-buffer-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
7022990af1e0d449f9d5322035899745e19735c5
1 change: 0 additions & 1 deletion licenses/netty-codec-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
307f665c08ce57333121de4f460479fc0c3c94d4
1 change: 0 additions & 1 deletion licenses/netty-codec-http-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-http-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
eda08a71294afe78c779b85fd696bc13491507a8
1 change: 0 additions & 1 deletion licenses/netty-codec-http2-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-http2-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
e3c35c0685ec9e84c4f84b79feea7c9d185a08d3
1 change: 0 additions & 1 deletion licenses/netty-codec-socks-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-codec-socks-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
488a67579f062bba2d2d20ce46f9bb28a68b0875
1 change: 0 additions & 1 deletion licenses/netty-common-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-common-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
4bb0f9899146484fa89f7b9bc27389d5b8e2ecde
1 change: 0 additions & 1 deletion licenses/netty-handler-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-handler-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
30ebb05b6b0fb071dbfcf713017c4a767a97bb9b
1 change: 0 additions & 1 deletion licenses/netty-handler-proxy-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-handler-proxy-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
28d6c41b72df614e09440ae0bed53a43fbcfbe27
1 change: 0 additions & 1 deletion licenses/netty-resolver-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-resolver-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
28c378c19c1779eca1104b400452627f3ebc4aea
1 change: 0 additions & 1 deletion licenses/netty-transport-4.1.106.Final.jar.sha1

This file was deleted.

1 change: 1 addition & 0 deletions licenses/netty-transport-4.1.118.Final.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
5a27232e5d08218722d94ca14f0b1b4576e7711c

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
9da25a94e6a0edac90da0bc7894e5a54efcb866b

This file was deleted.

1 change: 1 addition & 0 deletions licenses/performance-analyzer-commons-1.6.0.jar.sha1
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
54aef568349f1647ac4532b9f2c3ffd4beff6644
Loading