-
Notifications
You must be signed in to change notification settings - Fork 31
feat: Extend plugin API to support transfer handlers #937
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
Conversation
1c0a15f to
7c7bdfb
Compare
e25337f to
93d164c
Compare
|
Since I've been struggling to see the plugin architecture since it is quite scattered throughout the library, is there documentation providing an overview? |
| type configOption struct { | ||
| config []byte | ||
| } |
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 feel like it is confusing that the type configOption is not the type that's supposed to be implementing the interface ConfigOption.
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.
It is supposed as option (like the other structs). In this case an option to feed the ConfigOption interface.
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.
Renamed to ConfigOptionConsumer and added more docu.
|
closing as we do not want to extend the existing CLI with transfer handlers anymore and are instead preparing for the move to OCM CLI v2 |
What this PR does / why we need it
The OCM library already provides an extension point to provide transfer handlers
controlling the transport of component versions from one environment into another one.
A transfer handler controls:
So far, there were two implementations:
--recursiveor--copy-resourcesthe behaviour based on a spiff script.
On the command line interface always the spiff handler was used which works like the standard handler if no script
is configured.
This PR adds three new features:
which can be used un the command line to select and configure supported transfer handler types.
provide an arbitrary rule set controlling the transport process.
Similar to the uploaders and downloaders the naming scheme for transfer handlers looks as follows:
ocm/<builtin handlers>: used for the already existingstandardandspiffhandlers.Additional handlers may now add themselves to appropriate names to be usable from the command line.
plugin/'A dedicated handler maps plugin provided transfer handlers into the naming scheme.It uses the sub scheme
<plugin name>[/<handler name>]. A plugin may provide multiple (named) handlers.Which issue(s) this PR fixes