This section covers information relevant to plugin developers looking to transition their Tanzu CLI plugins developed using the legacy Tanzu CLI codebase in tanzu-framework to make use of tanzu-plugin-runtime project and this repository.
Include plugin-tooling.mk in your make file. It will provide make targets that are useful during the plugin build, test, and publishing process
Updating the import references to use tanzu-plugin-runtime
- The main change is to update the import references:
"github.com/vmware-tanzu/tanzu-framework/cli/runtime" => "github.com/vmware-tanzu/tanzu-plugin-runtime"
- Additional required changes are based on the following things:
- PluginDescriptor has moved from
"github.com/vmware-tanzu/tanzu-framework/cli/runtime/apis/cli/v1alpha1" => "github.com/vmware-tanzu/tanzu-plugin-runtime/plugin"
buildinfo
package has been moved from"github.com/vmware-tanzu/tanzu-framework/cli/runtime/buildinfo" => "github.com/vmware-tanzu/tanzu-plugin-runtime/plugin/buildinfo"
- Plugins are required to provide the
Target
information with thePluginDescriptor
.
- PluginDescriptor has moved from
Here is the sample change
which includes the updates to the isolated-cluster
and feature
plugins to use the new tanzu-plugin-runtime and use new tooling to build plugins.