Skip to content
Merged
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
11 changes: 8 additions & 3 deletions .github/workflows/publish-snapshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,13 @@ jobs:
export-env: true
env:
OP_SERVICE_ACCOUNT_TOKEN: ${{ secrets.OP_SERVICE_ACCOUNT_TOKEN }}
SONATYPE_USERNAME: op://opensearch-infra-secrets/maven-central-portal-credentials/username
SONATYPE_PASSWORD: op://opensearch-infra-secrets/maven-central-portal-credentials/password
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: ${{ env.MAVEN_SNAPSHOTS_S3_ROLE }}
aws-region: us-east-1
- name: publish snapshots to maven
run: |
./gradlew --no-daemon publishPublishMavenPublicationToSnapshotsRepository
./gradlew --no-daemon publishPublishMavenPublicationToSnapshotsRepository
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ This project has adopted the [Amazon Open Source Code of Conduct](CODE_OF_CONDUC
See [User Guide](USER_GUIDE.md).

## Snapshot Builds
The [snapshots builds](https://central.sonatype.com/repository/maven-snapshots/org/opensearch/client/opensearch-java/maven-metadata.xml) are published to sonatype using [publish-snapshots.yml](./.github/workflows/publish-snapshots.yml) workflow. Each `push` event to the main branch triggers this workflow.
The [snapshots builds](https://ci.opensearch.org/ci/dbc/snapshots/maven/org/opensearch/client/opensearch-java/maven-metadata.xml) are published to sonatype using [publish-snapshots.yml](./.github/workflows/publish-snapshots.yml) workflow. Each `push` event to the main branch triggers this workflow.

## Compatibility with OpenSearch

Expand Down
3 changes: 1 addition & 2 deletions build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ allprojects {

repositories {
mavenLocal()
maven(url = "https://central.sonatype.com/repository/maven-snapshots/")
maven(url = "https://aws.oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://ci.opensearch.org/ci/dbc/snapshots/maven/")
mavenCentral()
gradlePluginPortal()
}
Expand Down
16 changes: 8 additions & 8 deletions java-client/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,7 @@ import java.io.FileWriter
buildscript {
repositories {
mavenLocal()
maven(url = "https://central.sonatype.com/repository/maven-snapshots/")
maven(url = "https://aws.oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://ci.opensearch.org/ci/dbc/snapshots/maven/")
mavenCentral()
gradlePluginPortal()
}
Expand Down Expand Up @@ -177,7 +176,7 @@ val integrationTest = task<Test>("integrationTest") {
System.getProperty("tests.awsSdk2support.domainRegion", "us-east-1"))
}

val opensearchVersion = "3.0.0-beta1-SNAPSHOT"
val opensearchVersion = "3.0.0-SNAPSHOT"

dependencies {
val jacksonVersion = "2.18.3"
Expand Down Expand Up @@ -318,11 +317,12 @@ tasks.withType<Jar> {
publishing {
repositories{
if (version.toString().endsWith("SNAPSHOT")) {
maven("https://central.sonatype.com/repository/maven-snapshots/") {
maven(providers.environmentVariable("MAVEN_SNAPSHOTS_S3_REPO")) {
name = "Snapshots"
credentials {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
credentials(AwsCredentials::class) {
accessKey = System.getenv("AWS_ACCESS_KEY_ID")
secretKey = System.getenv("AWS_SECRET_ACCESS_KEY")
sessionToken = System.getenv("AWS_SESSION_TOKEN")
}
}
}
Expand Down Expand Up @@ -405,4 +405,4 @@ if (runtimeJavaVersion >= JavaVersion.VERSION_21) {
testImplementation("org.bouncycastle", "bcprov-lts8on", "2.73.6")
testImplementation("org.bouncycastle", "bcpkix-lts8on", "2.73.6")
}
}
}
5 changes: 2 additions & 3 deletions java-codegen/build.gradle.kts
Original file line number Diff line number Diff line change
Expand Up @@ -19,8 +19,7 @@ import java.io.FileWriter
buildscript {
repositories {
mavenLocal()
maven(url = "https://central.sonatype.com/repository/maven-snapshots/")
maven(url = "https://aws.oss.sonatype.org/content/repositories/snapshots")
maven(url = "https://ci.opensearch.org/ci/dbc/snapshots/maven/")
mavenCentral()
gradlePluginPortal()
}
Expand Down Expand Up @@ -266,4 +265,4 @@ tasks.withType<Jar> {

spotlessConventions {
eclipseFormatterConfigFile = rootProject.file("buildSrc/formatterConfig-generated.xml")
}
}
Loading