Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add script to publish to maven local #743

Closed

Conversation

VijayanB
Copy link
Member

Signed-off-by: Vijayan Balasubramanian [email protected]

Description

Added script for opensearch-java to publish to maven local based on
version and whether is it snapshot or not.

Issues Resolved

#585

Check List

  • Commits are signed per the DCO using --signoff

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.

[[ "$SNAPSHOT" == "true" ]] && VERSION=$VERSION-SNAPSHOT


cd opensearch-java
Copy link
Member

Choose a reason for hiding this comment

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

I dont think there is a sub-directory called opensearch-java right? Assumption is this script will be run inside opensearch-java so no need to change directory.

Copy link
Member Author

Choose a reason for hiding this comment

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

Yeah, thats correct. I will remove cd opensearch-java with assumption that this script will be executed inside opensearch-java repository.

@gaiksaya gaiksaya requested review from dblock and peternied October 13, 2021 23:46
Added script for opensearch-java to publish to maven local based on
version and whether is it snapshot or not.

Signed-off-by: Vijayan Balasubramanian <[email protected]>
@VijayanB VijayanB force-pushed the add-opensearch-java branch from 233cb95 to 6e2bb9d Compare October 13, 2021 23:54
@VijayanB VijayanB requested a review from gaiksaya October 13, 2021 23:55
@peternied
Copy link
Member

I assume I am missing some context, forgive my naive questions - its 53 lines of code to set 2 variables and execute a gradle command, that seems like a lot for not very much - is there an expectation that this file will grow with other changes?

If the design is that Jenkins will be doing the publishing, can we convert this into jenkinsfile?

Is there a reason to put this code in the opensearch-build repo instead of in opensearch-java?

@gaiksaya
Copy link
Member

There are going to be 2 jenkins files that will be using this file:

  1. Publishing the snapshots based on main branch
  2. Staging the maven artifacts when they are ready based on the commit_id.

Reason to put it in build.sh so that if anything changes in future, we do not need to make code changes in 2 jenkinsfile
No preference where this file should be whether in build or opensearch-java.

@dblock
Copy link
Member

dblock commented Oct 14, 2021

What else is this script going to do?

I don't think you want this "interface" that ends up invoking 1 command, even with different args, at least until the build script becomes super complicated. I vote for just doing it in Jenkinsfile, this way we know what is actually happening by looking at that. Right now that Jenkinsfile would be export VERSION= + invoke gradle`, which is cleaner and more straightforward than invoking some bash script that takes VERSION as an argument IMHO.

@dblock
Copy link
Member

dblock commented Oct 20, 2021

What do we want to do with this @VijayanB?

@VijayanB
Copy link
Member Author

This is not required anymore due to opensearch-project/opensearch-java#51

@VijayanB VijayanB closed this Oct 21, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants