-
Notifications
You must be signed in to change notification settings - Fork 34
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
Add documentation for custom plugins #137
Merged
Merged
Changes from all commits
Commits
Show all changes
6 commits
Select commit
Hold shift + click to select a range
a2abfc0
Add documentation for custom plugins
martina-if c2ae8a6
Fix comments
martina-if 4065c68
Add custom plugin docs to sidebar
martina-if 98ced58
Add steps, explain results and add conclusion
martina-if d546724
Fix conclusion
martina-if 9ee9d79
Fix pre-req
martina-if File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
--- | ||
title: Installing Custom Plugins | ||
lastUpdated: '2021-03-17T12:11:00.0Z' | ||
description: How to add a custom Backstage plugin to Roadie | ||
--- | ||
|
||
## Introduction | ||
|
||
Your plugins can be published via npm or yarn, like publishing a normal package. We will provide you a unique scope for | ||
your plugins, and we host a dedicated npm registry which you can publish to. | ||
|
||
## Prerequisites | ||
|
||
For our alpha release you'll need to give us some information upfront about your plugin. We plan to make all of this | ||
self-service going forward but currently Roadie doesn't support this out-of-the-box. For now, we will need you to | ||
fill out [this form][form] the first time you want to add a new plugin. Pushing new versions will not require you | ||
to fill the form again. | ||
|
||
## Pushing the plugin to Roadie | ||
|
||
### Step 1. Get credentials | ||
|
||
Get your credentials for the npm registry. Follow [this link][forgot-password] to reset your password. The username is | ||
`<your-company>-roadie`. This will send a reset link to the email we have associated with your account. You can | ||
change this email as you wish. | ||
|
||
### Step 2. Configure NPM | ||
|
||
To configure NPM there are two options: | ||
|
||
- Interactively using npm login. Suitable for a developer testing the process. | ||
<pre> | ||
npm config set @<b><your-company></b>-roadie:registry https://roadiehq.jfrog.io/artifactory/api/npm/<b><your-company></b>-roadie/ | ||
npm login --scope=@<b><your-company></b>-roadie | ||
# This will prompt for your username, password and email | ||
</pre> | ||
|
||
- In a CI/CD environment you can write a local `.npmrc` file | ||
<pre> | ||
@<b><your-company></b>-roadie:registry <https://roadiehq.jfrog.io/artifactory/api/npm/<b><your-company></b>-roadie/> | ||
_auth = username:password # converted to base64 | ||
# _auth = ${NPM_AUTH} # You can also use an environment variable | ||
always-auth = true | ||
</pre> | ||
|
||
### Step 3. Publishing | ||
|
||
Once you're ready to publish your plugin these are the steps you'll need to follow: | ||
|
||
1. Ensure your package is scoped correctly in package.json. The name field should follow this pattern | ||
`@<your-company>-roadie/<package-name>` | ||
2. Select a new package version to publish. You can't overwrite a version once published (e.g. npm version patch) | ||
3. Build your plugin (e.g. yarn install && yarn tsc && yarn build) | ||
4. Publish your plugin npm publish | ||
5. (Optional) Check the registry npm info `@<your-company>-roadie/<package-name>` | ||
|
||
We will notify you via Slack once the plugin is ready in your Roadie Backstage instance. Further updates to the npm | ||
package will be picked up and released automatically and you can expect the changes to appear in Backstage after 15-20 | ||
minutes. | ||
|
||
## Conclusion | ||
|
||
Once the steps above have been completed successfully and you have been notified that your plugin is ready to use, you | ||
should be able to log into your Backstage instance and use the plugin just like any other plugin. | ||
|
||
You can update your plugin at will and the changes will appear in Backstage. The form is only required when installing a | ||
new plugin for the first time. | ||
|
||
[forgot-password]: https://roadiehq.jfrog.io/ui/login/forgot-password | ||
[form]: https://docs.google.com/forms/d/e/1FAIpQLSdSNr4Ps_RpKEx0V2QbxWaKLb3-DKi0W7U09Wth0SXHQoPyXQ/viewform |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Is there a way to verify that everything worked or something we can tell the user to do as a next step? It feels kinda inconclusive down here.
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.
AFAIK we don't have anything for that yet. I added this story to the custom plugin epic https://app.clubhouse.io/larder/story/1571/give-user-feedback-on-publishing-operation
This is for the old way of adding a custom plugin so we should decide if we want to build that or just add the feedback in the new way of adding custom plugins. I will ask Iain anyways in case I missed something.
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.
Perhaps we could explain how we will notify them when their custom plugin shows up?
It might also be worth saying that future updates to the plugin won't require re-submission of the form or manual steps and thus should be must faster.
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.
Not sure what you mean by this
We can't see when it shows up. Should we say, we will notify them on slack when the first build is ready?
I will add now the second part you mention
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.
Yeah exactly. We haven't told them what happens after they submit the Google form, so they won't know when the plugin is installed and ready to use. We should tell them that we will notify them via their shared Slack channel or via email when the plugin is ready to use after being installed the first time.
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.
Added some comments to the prerequisites, and the end of the file. Let me know what you think about those