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

Create publishToNuGet library #2965

Closed
2 tasks done
Tracked by #2505 ...
gaiksaya opened this issue Dec 5, 2022 · 4 comments · Fixed by opensearch-project/opensearch-build-libraries#117
Closed
2 tasks done
Tracked by #2505 ...

Create publishToNuGet library #2965

gaiksaya opened this issue Dec 5, 2022 · 4 comments · Fixed by opensearch-project/opensearch-build-libraries#117
Assignees

Comments

@gaiksaya
Copy link
Member

gaiksaya commented Dec 5, 2022

The dot net artifacts like the net client is published on Nuget.
Add jenkins library that publishes the artifacts under https://www.nuget.org/profiles/opensearchproject namespace

Acceptance Criteria:

  • The library should sign the given artifacts
  • Publish to NuGet automatically (without any human intervention)
@gaiksaya gaiksaya changed the title publishToNuGet: The dot net client is published to NuGet Create publishToNuGet library Dec 5, 2022
@gaiksaya gaiksaya self-assigned this Dec 5, 2022
@gaiksaya
Copy link
Member Author

As of today we have https://github.com/opensearch-project/opensearch-net client that publishes the artifacts on nuget.
Got some information from @Xtansia that all clients in that repository will be released at the same time.

@gaiksaya
Copy link
Member Author

Some information on how to publish to nuget using command line and api key https://learn.microsoft.com/en-us/nuget/nuget-org/publish-a-package#push-by-using-a-command-line

@gaiksaya
Copy link
Member Author

gaiksaya commented Jan 12, 2023

The security approved signing process for Nuget was causing issues for this automation. Currently, we were creating .dll files, signing them and then packing them to .nupkg files that were finally released to the customers. However, following #1234 we are trying to avoid building anything on jenkin and signing can only happen on jenkins for now.

We tested the following theory (thanks @prudhvigodithi for the suggestion):

Create .nupkg packages and provide them as release candidates via GHA. The above library will do the following:

  1. Download them and Convert them to .zip (just a rename)
  2. Unzip them and sign the .dll files
  3. Zip them again
  4. Rename to .nupkg

@Xtansia helped us test this theory and the packages worked as expected. We will be going forward with this solution.
Thanks!

cc: @wbeckler @VachaShah @bbarani @Yury-Fridlyand

@gaiksaya
Copy link
Member Author

There was a change in plan. Unzipping and packing the artifacts back again gave a number of permission issues on various files. It felt a lot of risky and kind of hacky, so we are making an exception for dotnet clients. We will be building, signing and releasing all on same platform using jenkins.
See the above PR in review. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant