Skip to content

Onboarding new maven snapshots publishing to s3 (opensearch-java)#1768

Merged
reta merged 5 commits into
opensearch-project:mainfrom
peterzhuamazon:maven-snapshots-s3
Oct 30, 2025
Merged

Onboarding new maven snapshots publishing to s3 (opensearch-java)#1768
reta merged 5 commits into
opensearch-project:mainfrom
peterzhuamazon:maven-snapshots-s3

Conversation

@peterzhuamazon
Copy link
Copy Markdown
Member

Description

Onboarding new maven snapshots publishing to s3 (opensearch-java)

Issues Resolved

opensearch-project/opensearch-build#5360

By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license.
For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
reta
reta previously approved these changes Oct 29, 2025
Comment thread java-client/build.gradle.kts Outdated
credentials {
username = System.getenv("SONATYPE_USERNAME")
password = System.getenv("SONATYPE_PASSWORD")
credentials(AwsCredentials) {
Copy link
Copy Markdown
Collaborator

@reta reta Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

credentials(AwsCredentials::class) {

Copy link
Copy Markdown
Member Author

@peterzhuamazon peterzhuamazon Oct 29, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Will try, this is the first time I try this on kotlin. Thanks.

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
@peterzhuamazon
Copy link
Copy Markdown
Member Author

* What went wrong:
getenv("MAVEN_SNAPSHOTS_S3_REPO") must not be null

But this will be null until the push commit happens. We should not need to verify this during PR checks.

@reta
Copy link
Copy Markdown
Collaborator

reta commented Oct 29, 2025

* What went wrong:
getenv("MAVEN_SNAPSHOTS_S3_REPO") must not be null

But this will be null until the push commit happens. We should not need to verify this during PR checks.

I think it is not related to push - the MAVEN_SNAPSHOTS_S3_REPO has to be present in every workflow

@peterzhuamazon
Copy link
Copy Markdown
Member Author

* What went wrong:
getenv("MAVEN_SNAPSHOTS_S3_REPO") must not be null

But this will be null until the push commit happens. We should not need to verify this during PR checks.

I think it is not related to push - the MAVEN_SNAPSHOTS_S3_REPO has to be present in every workflow

In groovy version of the build.gradle in other plugins, doesnt seem to be a requirement tho.
I can add a default value tho if needed, then override that value during the maven publishing workflow.

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
@reta
Copy link
Copy Markdown
Collaborator

reta commented Oct 29, 2025

* What went wrong:
getenv("MAVEN_SNAPSHOTS_S3_REPO") must not be null

But this will be null until the push commit happens. We should not need to verify this during PR checks.

I think it is not related to push - the MAVEN_SNAPSHOTS_S3_REPO has to be present in every workflow

In groovy version of the build.gradle in other plugins, doesnt seem to be a requirement tho.
I can add a default value tho if needed, then override that value during the maven publishing workflow.

Yeah, Kotlin builds are somewhat different, it seems like there are more issues to fix, I could help you later tonight , have to run now, sorry about that

@peterzhuamazon
Copy link
Copy Markdown
Member Author

https://status.maven.org/incidents/0gpb9c1dxrq7

Signed-off-by: Andriy Redko <drreta@gmail.com>
@reta reta merged commit c064975 into opensearch-project:main Oct 30, 2025
36 of 37 checks passed
@github-project-automation github-project-automation Bot moved this from 👀 In Review to ✅ Done in Engineering Effectiveness Board Oct 30, 2025
@reta reta added backport 2.x Backport to 2.x branch backport 3.x and removed backport 2.x Backport to 2.x branch backport 3.x labels Oct 30, 2025
opensearch-trigger-bot Bot pushed a commit that referenced this pull request Oct 30, 2025
)

* Onboarding new maven snapshots publishing to s3 (opensearch-java)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Update credentials

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Set a default value for MAVEN_SNAPSHOTS_S3_REPO

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Update from 3.0.0-beta1 to 3.0.0 dependencies

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>

* Fix MAVEN_SNAPSHOTS_S3_REPO enviroment variable usage

Signed-off-by: Andriy Redko <drreta@gmail.com>

---------

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Andriy Redko <drreta@gmail.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
(cherry picked from commit c064975)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
@opensearch-trigger-bot
Copy link
Copy Markdown
Contributor

The backport to 2.x failed:

The process '/usr/bin/git' failed with exit code 128

To backport manually, run these commands in your terminal:

# Navigate to the root of your repository
cd $(git rev-parse --show-toplevel)
# Fetch latest updates from GitHub
git fetch
# Create a new working tree
git worktree add ../.worktrees/opensearch-java/backport-2.x 2.x
# Navigate to the new working tree
pushd ../.worktrees/opensearch-java/backport-2.x
# Create a new branch
git switch --create backport/backport-1768-to-2.x
# Cherry-pick the merged commit of this pull request and resolve the conflicts
git cherry-pick -x --mainline 1 c064975e26d6cc9192a50289afa83fd43eac0f9e
# Push it to GitHub
git push --set-upstream origin backport/backport-1768-to-2.x
# Go back to the original working tree
popd
# Delete the working tree
git worktree remove ../.worktrees/opensearch-java/backport-2.x

Then, create a pull request where the base branch is 2.x and the compare/head branch is backport/backport-1768-to-2.x.

reta added a commit that referenced this pull request Oct 30, 2025
) (#1774)

* Onboarding new maven snapshots publishing to s3 (opensearch-java)



* Update credentials



* Set a default value for MAVEN_SNAPSHOTS_S3_REPO



* Update from 3.0.0-beta1 to 3.0.0 dependencies



* Fix MAVEN_SNAPSHOTS_S3_REPO enviroment variable usage



---------




(cherry picked from commit c064975)

Signed-off-by: Peter Zhu <zhujiaxi@amazon.com>
Signed-off-by: Andriy Redko <drreta@gmail.com>
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: Andriy Redko <drreta@gmail.com>
@peterzhuamazon
Copy link
Copy Markdown
Member Author

Running good, thanks!
https://github.com/opensearch-project/opensearch-java/actions/runs/18928665262/job/54040858353

@peterzhuamazon peterzhuamazon deleted the maven-snapshots-s3 branch October 30, 2025 04:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

Status: ✅ Done

Development

Successfully merging this pull request may close these issues.

2 participants