Skip to content

Commit

Permalink
Update builder/README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
anujc25 committed Mar 24, 2023
1 parent a0b3ac6 commit 9dbb887
Showing 1 changed file with 28 additions and 7 deletions.
35 changes: 28 additions & 7 deletions cmd/plugin/builder/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -78,20 +78,41 @@ Below are the examples:
tanzu builder plugin build --path ./cmd/plugin --version v0.0.2 --os-arch all --match foo
```

The `tanzu builder plugin build` command provides a convenient way to create plugin-group manifest file (`plugin_group_manifest.yaml`) when building the plugins by providing `--plugin-scope-association-file` flag. This is a convenient way to generate the plugin-group manifest file, however, if any external plugin or different version of the plugin needs to be included in the plugin-group manifest file, user need to manually create this file. When provided this flag, the tooling will generate `plugin_group_manifest.yaml` file within the same binary artifacts directory.
The `tanzu builder plugin build` command provides a convenient way to create [plugin-group manifest file](#inventory-plugin-group-add) (`plugin_group_manifest.yaml`) which contains plugin-group metadata by providing `--plugin-scope-association-file` flag. The purpose of the plugin-group is to create a product release specific plugin-group that can be used by the users to easily install plugins for the specific product release. More details are provided in [inventory-plugin-group-add](#inventory-plugin-group-add) section.

This is a convenient way to generate the plugin-group manifest file, however, if any external plugin or different version of the plugin needs to be included in the plugin-group manifest file, user need to manually create this file. When `--plugin-scope-association-file` flag is provided, the tooling will generate `plugin_group_manifest.yaml` file within the same binary artifacts directory.

Below is the sample `plugin-scope-association.yaml`:

```yaml
plugins:
- name: foo
target: global
scope: Standalone
isContextScoped: false
- name: bar
target: kubernetes
isContextScoped: true
- name: baz
target: mission-control
isContextScoped: true
```
Below is the sample `plugin_group_manifest.yaml` that will get generated:

```yaml
plugins:
- name: foo
target: global
isContextScoped: false
version: v0.0.2
- name: bar
target: kubernetes
scope: Context
isContextScoped: true
version: v0.0.2
- name: baz
target: mission-control
scope: Context
isContextScoped: true
version: v0.0.2
```

Here is the artifacts directory structure that gets generated by running the `tanzu builder plugin build --path ./cmd/plugin --version v0.0.2 --os-arch darwin_amd64 --os-arch linux_amd64 --plugin-scope-association-file ./cmd/plugin/plugin-scope-association.yaml` command. Assuming we have 2 plugins `foo` with a `global` target and `bar` with a `kubernetes` target available under `./cmd/plugin` directory.
Expand Down Expand Up @@ -288,15 +309,15 @@ created: 2023-03-17T17:12:35.519419-07:00
plugins:
- name: foo
target: global
scope: Standalone
isContextScoped: false
version: v0.2.0
- name: bar
target: kubernetes
scope: Context
isContextScoped: true
version: v0.2.0
- name: baz
target: mission-control
scope: Context
isContextScoped: true
version: v0.3.0
```
Expand Down

0 comments on commit 9dbb887

Please sign in to comment.