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

Move to monorepo to introduce sign-plugin #72

Merged
merged 13 commits into from
Oct 19, 2022
Merged

Conversation

jackw
Copy link
Collaborator

@jackw jackw commented Oct 18, 2022

This PR is a starting point to move plugin signing out of toolkit and into its own package. Currently we have a workflow in create-plugin that includes signing a plugin. This has a dependency on toolkit which I'm keen to remove before we launch create-plugin@v1.0.0.

Consensus is needed on the following points for us to move forward with this PR: (Based on discussions and comments in the PR consensus seems to be this is a good direction.)

  • Make this repo a monorepo
  • Introduce sign-plugin package
  • Update workflows to cater for multiple packages
  • Update NPM bump and release workflows so create-plugin can still be released
  • Merge all open pull requests prior to merging this
  • Define what to do with version parameter of ManifestInfo and adjust the code accordingly

Alternatively we take the contents of sign-plugin in this PR and put it in its own repo.

Notes for reviewers
I've lifted most of the signing code from toolkit into this repo. I haven't made any changes other than removing the dependency on grafana/data and setting the toolkit version to an empty string just to get it working. I'm thinking we can clean all this up iteratively.

Follow Up Tasks

  • Rename repo to grafana/plugin-tools
  • Change the references in this PR's readme and other files from create-plugin to plugin-tools
  • Define a release strategy for multiple packages

@jackw jackw added enhancement New feature or request dependencies Update one or more dependencies version labels Oct 18, 2022
@jackw jackw self-assigned this Oct 18, 2022
@mckn
Copy link
Collaborator

mckn commented Oct 18, 2022

Love it! Go go go 🚀

Copy link
Collaborator

@mckn mckn left a comment

Choose a reason for hiding this comment

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

I think this looks good! Should the example.mp4 be added to git?

@academo
Copy link
Member

academo commented Oct 18, 2022

  • I like grafana/plugin-tools as the repo name.

@leventebalogh
Copy link
Collaborator

I like the idea as well! 🚀

@jackw jackw force-pushed the jackw/introduce-plugin-sign branch from 45b2b9c to a875274 Compare October 18, 2022 13:51
@jackw jackw marked this pull request as ready for review October 18, 2022 15:07
@jackw
Copy link
Collaborator Author

jackw commented Oct 18, 2022

Should the example.mp4 be added to git?

It was already in the repo but looking at the docs it doesn't appear to be referenced anywhere. I'm thinking we can 🔪 it. WDYT @mckn ?

@jackw jackw changed the title PoC: Move to monorepo to introduce sign-plugin Move to monorepo to introduce sign-plugin Oct 18, 2022
Copy link
Collaborator

@mckn mckn left a comment

Choose a reason for hiding this comment

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

LGTM!

@mckn
Copy link
Collaborator

mckn commented Oct 18, 2022

Should the example.mp4 be added to git?

It was already in the repo but looking at the docs it doesn't appear to be referenced anywhere. I'm thinking we can 🔪 it. WDYT @mckn ?

go go go 🔥

Copy link
Collaborator

@leventebalogh leventebalogh left a comment

Choose a reason for hiding this comment

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

Amazing work! 🚀

In your plugin directory, run the following to create a MANIFEST.txt file in the dist directory of your plugin.

```bash
npx @grafana/sign-plugin --rootUrls https://example.com/grafana
Copy link
Collaborator

Choose a reason for hiding this comment

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

Not something necessarily for now: maybe it could be good to add some explanation on what the --rootUrls flag is exactly and how they should use it? (I don't think it's straightforward for everyone by the first sight.)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Noted in #74 ! 🙏

packages/sign-plugin/src/utils/pluginValidation.test.ts Outdated Show resolved Hide resolved
Copy link
Member

@academo academo left a comment

Choose a reason for hiding this comment

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

Thanks for the setup!

@jackw jackw force-pushed the jackw/introduce-plugin-sign branch from 38a36b8 to 38e4097 Compare October 19, 2022 07:34
@jackw jackw mentioned this pull request Oct 19, 2022
5 tasks
@jackw jackw merged commit cc679e9 into main Oct 19, 2022
@jackw jackw deleted the jackw/introduce-plugin-sign branch October 19, 2022 07:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Update one or more dependencies version enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants