Skip to content
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

Update plugin-tooling.mk, Update tanzu builder init to include plugin-tooling.mk to build and publish plugins #139

Merged
merged 2 commits into from
Apr 3, 2023

Conversation

anujc25
Copy link
Contributor

@anujc25 anujc25 commented Mar 30, 2023

What this PR does / why we need it

  • Update plugin-tooling.mk within the repo.
  • Add a make plugin-install-local target to install locally built plugins.
  • Update builder plugin templates to use the new plugin-tooling.mk file to build the plugins.

Which issue(s) this PR fixes

Fixes #86

Describe testing done for PR

# Initialize a new repository
$ tanzu builder init hello-world --repo-type github
$ cd hello-world

# Add a new plugin with name foo
$ tanzu builder cli add-plugin foo

# Commit the base changes
$ git add -A
$ git commit -m "Initialize plugin repository"

# Go get the latest tanzu-plugin-runtime from the main branch. [NOTE: This step should not be needed once we have an official tag on the `tanzu-plugin-runtime` repository]
$ go get github.com/vmware-tanzu/tanzu-plugin-runtime@main
$ make gomod

# Building Plugin
$ make plugin-build-local

# Installing plugins from a local source
$ make plugin-install-local

# OR Combined Build and Install target is also available
$ make plugin-build-install-local

# Publish the plugin as oci image to the local oci repository
$ make plugin-publish-packages

# Combined target to build and publish plugins
$ make plugin-build-and-publish-packages

# Initialize a local inventory database by running the below command
$ make inventory-plugin-add

# Add plugin to the local inventory database
$ make inventory-plugin-add

# Configure below environment variable to point to the inventory database as discovery image 
$ tanzu config set env.TANZU_CLI_ADDITIONAL_PLUGIN_DISCOVERY_IMAGES_TEST_ONLY localhost:5001/test/v1/tanzu-cli/plugins/plugin-inventory:latest

# Run plugin search
$ tz plugin search
  NAME                DESCRIPTION                                                        TARGET           LATEST
  foo                 foo plugin v2                                                      global           v0.0.0

Release note

Update `tanzu builder init` to include `plugin-tooling.mk` file containing the tooling to build and publish plugins

Additional information

Special notes for your reviewer

@anujc25 anujc25 requested a review from a team as a code owner March 30, 2023 08:31
@anujc25 anujc25 mentioned this pull request Mar 30, 2023
@anujc25 anujc25 changed the title Update plugin-tooling.mk, Update builder plugin to bootstrap using plugin-tooling.mk Update plugin-tooling.mk, Update tanzu builder init to include plugin-tooling.mk to build and publish plugins Mar 30, 2023
Copy link
Contributor

@marckhouzam marckhouzam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Two minor nits only.

plugin-tooling.mk Outdated Show resolved Hide resolved
plugin-tooling.mk Outdated Show resolved Hide resolved
@anujc25 anujc25 force-pushed the plugin-tooling-updates branch 2 times, most recently from 495e59f to 8862b56 Compare April 3, 2023 21:44
Copy link
Contributor

@vuil vuil left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@anujc25 anujc25 merged commit 069ff82 into vmware-tanzu:main Apr 3, 2023
@vuil vuil added the kind/refactor Categorizes issue or PR as related to a refactoring label Apr 7, 2023
@marckhouzam marckhouzam added this to the v0.90.0 milestone Oct 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
alpha-testing-prereq cla-not-required kind/refactor Categorizes issue or PR as related to a refactoring
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Include plugin-tooling.mk file as part of new plugin bootstrap using builder init
4 participants