kokuwaio / helm-maven-plugin

Simple plugin to package helm charts

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Add a dedicated OCI registry login goal

mruzicka opened this issue · comments

Is this a BUG REPORT or FEATURE REQUEST? (choose one):
Feature Request

Request:
Please add a dedicated OCI registry login goal which could be used to authenticate to an OCI registry before executing the dependency-build goal in order for it to be able to download dependencies from a private (password protected) OCI registry.

Anything else we need to know:
It is currently not straightforward to consume dependencies from a private (password protected) OCI registry. It can be achieved by executing a dummy push on an empty directory which performs the authentication and that is all it does since there is nothing to actually push. But this is not very transparent and it requires additional preparations (creating an empty directory) which means additional plugin executions need to be defined in the pom.xml. So I propose adding a dedicated OCI registry login goal for this purpose. Perhaps implementing it in a Mojo class which could serve as a superclass of the Mojo implementing the current push goal.

Please verify if #285 matches your requirements.

@sschnabe, thank you, this is exactly what I need.

One nitpick comment though: Perhaps PushMojo could be made a subclass of the new RegistryLoginMojo and reuse its functionality (including the insecure parameter)?

Release with 6.7.0

I've not added a new base oci-mojo because the cli command is not so complex to justify additional classes.

Thank you!