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
feat: pipe for Sonatype Nexus Raw repositories #1204
Conversation
I needed this feature for my own selfish goals, and I figured I could contribute it to the project. Since it's my first contribution, I'm open to receive feedback and suggestions on how to improve this pull request. |
Just a couple of comments. :) Also would be nice if you could add the docs as well 🚀 Thanks for the PR 👏 |
I have added some basic documentation based on the artifactory one. Since the functionality of this pipe is so simple, I haven't go into details of the different configuration parameters. Let me know if you need anything else at this stage, or we can evolve the documents at the same time that this pipe grows. |
Codecov Report
@@ Coverage Diff @@
## master #1204 +/- ##
==========================================
- Coverage 83.65% 82.88% -0.77%
==========================================
Files 58 59 +1
Lines 3285 3372 +87
==========================================
+ Hits 2748 2795 +47
- Misses 456 478 +22
- Partials 81 99 +18
Continue to review full report at Codecov.
|
@caarlos0 Is there anything else I need to do for the pull request to be reviewed? |
no, I just haven't make the time to look into it yet... sorry for the delay :( |
repository: example-repo | ||
directory: example-folder | ||
username: your-username | ||
password: your-password |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should probably get the password from an environment variable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In order to do this, shoud I use the EnvFiles
struct in the config/config.go
file together with the loadEnv function?
Seems like it is very tailor-made to the git release process.
Should I load the env variable in my pipe instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
take a look on the artifactory pipe, it uses the internal http
package, which thinking now, maybe we can try to use here as well, which should handle secrets and etc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The problem I see with it is that the internal http package has a hardcoded PUT method, so in order to use it I would need to refactor it to be able to use POST, which is the verb that Nexus accepts for uploads.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think we can refactor that first then? Maybe in another PR even?
Basically adding a method
option which defaults to PUT
, right? Or are there more things?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I've been checking out the http package, to assess the refactor to include POST, and I see that PUT is highly hardcoded in it, it wouldn't be a trivial refactor.
I'm sorry to say I don't have time enough to attack this challenge at the moment.
Would you mind if I finish this Nexus feature loading the environment variable from inside my pipe, and I can hopefully tackle the refactoring of the http package later on?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sorry, I rather not.
I can try to take a look at the http
package as well...
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@antonienko would #1246 work?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
On a first quick review, it looks great. As soon as it is merged I'll try and complete this PR using it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
merged to master :)
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions. |
This pull request has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs. |
Enables Goreleaser to upload artifacts to Sonatype Nexus Raw repositories.