-
Notifications
You must be signed in to change notification settings - Fork 277
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
Remove brittle snapshot publish script. #1182
Comments
@mch2 If you can show us how you think it should be done for one of the projects we can split the work for the others |
Sorry for the delay here. I would prefer each repository include the exact gradle task above to publish the snapshot to Sonatype directly vs us publishing a pre-built directory. The build system would then need a separate publish step that looks for an option in the manifest and conditionally invoke this task. This would look exactly like this. Ideally we could do this with publishing release builds as well but given our current workflow stages pre-built artifacts after they are tested & signed, this won't be possible. |
This would also fix #1463. I think we should attempt what @mch2 is recommending above for opensearch-project/ml-commons#122. |
@mch2 Whats the status of this issue? |
Hi @bbarani, I did not pick this up and missed that this was assigned to me. I cut this as a suggestion but don't have time at the moment. There is a bit of complexity here to integrate this with the build system & update the jenkins scripts. |
@prudhvigodithi Are you taking care of this issue as part of Maven publish process for individual zips? |
@bbarani, The process of publishing to end nexus maven repo is still done by the same script, but this time zips will also be added to the same local repo. |
I think for as long as |
@prudhvigodithi @peterzhuamazon Can you update this issue? |
Hey everyone, Since we have set up AWS GH action integration, we can now access the maven creds and publish the snapshots for each repo. The publish script can be removed completely and let each repo publish to maven on each push. I believe we can remove this code then? https://github.com/opensearch-project/opensearch-build/blob/main/jenkins/opensearch/distribution-build.jenkinsfile#L163-L170 Let me know what you think @bbarani @dblock? We can use https://github.com/opensearch-project/spring-data-opensearch to test that out. |
Oooooh that's great news. You're saying we don't need Jenkins to publish to maven or Rubygems or other places? Let's do this! |
cc: @wbeckler ^ |
This is amazing, if you are looking for a specimen you could use up |
We still want to run everything that is production on jenkins. @bbarani Can add more thoughts to this. Also what's the plan for plugins? I understand publishing snapshots is a part of the distribution workflow today so are we talking about publishing snapshots as a part of GH actions when pushed to main for plugins as well as individual components like opensearch-sdk-java or spring-data-opensearch?? |
I'd like to hear more why we want this., other than "exercising centralized control" :) |
I don't think build.sh is required in anyway here anymore. If each component repo will be publishing on its own, calling the publishing gradle task should be enough. Taking OpenSearch as an example, is |
Update: Few things to do once that is ready:
|
Issue created with sonatype requesting to add a new user with only access to publish snapshots: https://issues.sonatype.org/browse/OSSRH-87579 |
We tested using opensearch-sdk-java and we were able to achieve snapshot publishing using GHA and AWS integration. https://aws.oss.sonatype.org/content/repositories/snapshots/org/opensearch/sdk/opensearch-sdk-java/ Once the above issue with sonatype is resolved we can move forward integrating the same with all other component. |
Update: Sonatype added new user that only has access to publish snapshots. More details in this issue. |
Yes @gaiksaya thats a good idea and removes the dependency on the distribution workflow, each plugin team can manage their own way of publishing the snapshots. One main downside I see, on how they publish the snapshots of plugins to the maven repo, with distribution workflow the Second one is having snapshot publish logic at multiple places, half with plugins and other with distribution workflow, we should completely allow the plugins to manage the maven publishing or should be done via the workflow. So I'm ok to for this same process for plugins too so that they can publish snapshots independently but with defined guardrails. Thank you |
Right now the bundle build relies on snapshot artifacts being placed in a local /maven folder during build and a script is invoked that publishes them during in our nightly jenkins workflow.
This script is brittle and relies on artifacts being named properly to be picked up - #1180 #439
Rather than publishing to a local folder and publishing the snapshot artifacts on the behalf of each repository. Each component should include its own gradle task to publish to our snapshot repository. This task can be invoked directly from each component's build.sh.
This would require a flag to the build workflow to optionally publish the snapshots inside of a build.sh so that local builds do not attempt to publish.
The text was updated successfully, but these errors were encountered: