Skip to content

Commit f562b24

Browse files
Docs: Publish a plugin landing (#2028)
1 parent 62be711 commit f562b24

File tree

6 files changed

+101
-81
lines changed

6 files changed

+101
-81
lines changed

docusaurus/docs/publish-a-plugin/build-automation.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ to ensure that your plugin will be built and packaged in the correct format.
2020

2121
Additionally, we recommend using the zip file produced from this workflow to test the plugin.
2222

23-
If a Grafana Access Policy Token is included in your [Github repository secrets](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-development-environment-secrets-for-your-repository-or-organization), a signed build is automatically created, which you can use to test the plugin locally before submission. The [sign a plugin](./sign-a-plugin.md#generate-an-access-policy-token) documentation includes guidance on how to create this token.
23+
If you include a Grafana Access Policy Token in your [Github repository secrets](https://docs.github.com/en/codespaces/managing-codespaces-for-your-organization/managing-development-environment-secrets-for-your-repository-or-organization), a signed build is automatically created, and you can use it to test the plugin locally before submission. The [sign a plugin](./sign-a-plugin.md#generate-an-access-policy-token) documentation includes guidance on how to create this token.
2424

2525
By creating a release tag, the whole process becomes automated, resulting in a zip file that you can submit for publication to the [Grafana plugin catalog](https://grafana.com/plugins)
2626

@@ -93,7 +93,7 @@ After creating the tag, push it to the repository:
9393
git push origin main --follow-tags
9494
```
9595

96-
## Publish your release in Github
96+
## Publish your release in GitHub
9797

9898
After you [create and push the tag](#how-to-trigger-the-release-workflow), the release workflow will run, generating a release with all the artifacts needed to submit your plugin to the [Grafana plugin catalog](https://grafana.com/plugins).
9999

@@ -107,13 +107,13 @@ Once the draft release is published, you can use the release assets to submit yo
107107

108108
Access the release zip file directly from the GitHub repository release path (for example, `https://github.com/org/plugin-id/releases`).
109109

110-
## Signing your plugin automatically
110+
## Sign your plugin automatically
111111

112-
You can sign your plugin releases using the Github Action. First you will have to [Generate an Access Policy Token](./sign-a-plugin.md#generate-an-access-policy-token) and [save it in your repository secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository).
112+
You can sign your plugin releases using GitHub Action.
113113

114-
Save your Access Policy Token as `GRAFANA_ACCESS_POLICY_TOKEN`.
114+
First, [generate an Access Policy Token](./sign-a-plugin.md#generate-an-access-policy-token) and [save it in your repository secrets](https://docs.github.com/en/actions/security-for-github-actions/security-guides/using-secrets-in-github-actions#creating-secrets-for-a-repository) as `GRAFANA_ACCESS_POLICY_TOKEN`.
115115

116-
By default, create-plugin will add the following `release.yml` to your scaffolded plugin with the following contents. If this is missing from your plugin repository, copy the following to add the workflow:
116+
By default, create-plugin adds the following `release.yml` to your scaffolded plugin with the following contents. If this is missing from your plugin repository, copy the following to add the workflow:
117117

118118
```yaml title=".github/workflows/release.yml"
119119
name: Release
@@ -142,11 +142,11 @@ jobs:
142142
use_changelog_generator: true # Enable automatic changelog generation
143143
```
144144

145-
Then, follow the regular process to [trigger](#how-to-trigger-the-release-workflow) the release workflow. Your plugin will be signed automatically, and you can use the release assets for your plugin submission.
145+
Next, follow the regular process to [trigger](#how-to-trigger-the-release-workflow) the release workflow. Your plugin will be signed automatically, and you can use the release assets for your plugin submission.
146146

147-
## Provenance attestation for plugin builds
147+
## Attest provenance for plugin builds
148148

149-
Provenance attestation, that is, _a feature that generating verifiable records of the build's origin and process_, enhances the security of your plugin builds. This feature allows users to confirm that the plugin they are installing was created through your official build pipeline.
149+
Provenance attestation is a feature that generates verifiable records of the build's origin and process, enhancing the security of your plugin builds. With this feature users can confirm that the plugin they're installing was created through your official build pipeline.
150150

151151
Currently, this feature is available only with GitHub Actions in public repositories. While we recommend using GitHub Actions with provenance attestation for improved security, you can still build and distribute plugins using other CI/CD platforms or manual methods.
152152

@@ -172,7 +172,7 @@ permissions:
172172
attestation: true
173173
```
174174

175-
The workflow will generate attestations automatically when building your plugin zip file.
175+
The workflow generates attestations automatically when building your plugin zip file.
176176

177177
### Troubleshoot provenance attestation
178178

@@ -183,11 +183,11 @@ If you encounter errors in the plugin validator or your plugin submission like t
183183

184184
Follow the steps above to enable provenance attestation in your GitHub Actions workflow.
185185

186-
## Automatically Generate Changelogs
186+
## Generate changelogs automatically
187187

188188
Maintaining a detailed changelog is essential for communicating updates to your users and is displayed prominently in the Grafana plugin details page. To simplify this process, our plugin build workflow supports automatic changelog generation.
189189

190-
### Using the GitHub Actions Workflow for Changelog Generation
190+
### Use the GitHub Actions workflow to generate changelog
191191

192192
The build-plugin GitHub Action can automatically generate and maintain your plugin's changelog using the [github-changelog-generator](https://github.com/github-changelog-generator/github-changelog-generator) tool. This feature:
193193

@@ -216,7 +216,7 @@ permissions:
216216
contents: write
217217
```
218218

219-
The changelog generator requires write access to commit the updated CHANGELOG.md file to your repository.
219+
The changelog generator requires write access to commit the updated `CHANGELOG.md` file to your repository.
220220

221221
If your target branch is protected, the default github.token cannot push changes directly, even with write permissions. In this case, you need to:
222222

@@ -232,7 +232,7 @@ If your target branch is protected, the default github.token cannot push changes
232232
token: ${{ secrets.CHANGELOG_PAT }} # Replace default github.token
233233
```
234234

235-
### Generated Changelog Format
235+
### Generated changelog format
236236

237237
The generated changelog follows a standardized format that clearly categorizes changes:
238238

@@ -260,4 +260,4 @@ The generated changelog follows a standardized format that clearly categorizes c
260260

261261
## Next steps
262262

263-
When you've packaged your plugin, proceed to [publishing a plugin](./publish-or-update-a-plugin.md) or [installing a packaged plugin](https://grafana.com/docs/grafana/latest/administration/plugin-management/#install-a-packaged-plugin).
263+
After you've packaged your plugin, proceed to [publish a plugin](./publish-or-update-a-plugin.md) or [install a packaged plugin](https://grafana.com/docs/grafana/latest/administration/plugin-management/#install-a-packaged-plugin).
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
---
2+
id: publish-plugin-intro
3+
title: Publish your plugins
4+
description: Learn how to publish your Grafana plugins.
5+
keywords:
6+
- grafana
7+
- plugins
8+
- plugin
9+
- publish
10+
---
11+
12+
See the following docs to learn how to publish your Grafana plugin.
13+
14+
<DocLinkList />

docusaurus/docs/publish-a-plugin/provide-test-environment.md

Lines changed: 20 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -12,13 +12,19 @@ sidebar_position: 5
1212

1313
# Provide a test environment
1414

15-
Developers often ask us how long it takes for a plugin to be reviewed for publishing to the Grafana [plugin catalog](https://grafana.com/plugins). Although we [can't provide estimates](/publish-a-plugin/publish-a-plugin#how-long-does-it-take-to-review-a-submission), we are always looking for ways to reduce cycle times.
15+
:::note
16+
17+
Provisioning is not required as part of the plugin submission process but will speed the review.
18+
19+
:::
20+
21+
Developers often ask us how long it takes for a plugin to be reviewed for publishing to the Grafana [plugin catalog](https://grafana.com/plugins). Although we [can't provide estimates](/publish-a-plugin/publish-a-plugin#how-long-does-it-take-to-review-a-submission), there's ways to reduce cycle times.
1622

1723
By far the most time consuming aspect of a plugin's review is the creation of a suitable test environment so we can verify its behavior. This step often involves a number of back-and-forth conversations between the plugin developer and the review team.
1824

19-
To drastically improve the review time, developers can provide this themselves by [_provisioning_](https://grafana.com/docs/grafana/latest/administration/provisioning/#provision-grafana) their plugin. Provisioning refers to the process of preparing and configuring a test environment within the plugin's [Docker development environment](/get-started/set-up-development-environment).
25+
To improve the review time, add [_provisioning_](https://grafana.com/docs/grafana/latest/administration/provisioning/#provision-grafana) to your plugin. Provisioning refers to the process of preparing and configuring a test environment within the plugin's [Docker development environment](/get-started/set-up-development-environment).
2026

21-
## Why should plugin developers care about this?
27+
## Why provisioning test environments?
2228

2329
There are several benefits to provisioning:
2430

@@ -27,28 +33,25 @@ There are several benefits to provisioning:
2733
- **Easier set up for e2e tests.** By provisioning dashboards, e2e tests can run against specific scenarios across local development and in CI.
2834
- **Improved clarity.** We have found that provisioned plugins make it easier for tech-savvy users to understand how the plugin works.
2935

30-
## Mechanism to provide a test environment
36+
## How to provide a test environment
3137

32-
Grafana can be configured to have resources installed and enabled through a mechanism known as [provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/#provision-grafana), where resources are configured in a YAML file under a `/provisioning` directory.
38+
You can configure Grafana to have resources installed and enabled through a mechanism known as [provisioning](https://grafana.com/docs/grafana/latest/administration/provisioning/#provision-grafana), where resources are configured in a YAML file under a `/provisioning` directory.
3339

34-
Since create-plugin v2.8.0, we generate provisioning capabilities for all plugin types (apps, scenes-apps, datasources, panels), and to include a sample dashboard as part of create-plugin.
40+
Starting in v2.8.0, `create-plugin` generates provisioning capabilities for all plugin types (apps, scenes-apps, datasources, panels) and includes a sample dashboard.
3541

36-
## What do plugin developers need to do?
42+
### What do you need to do?
3743

38-
:::note
44+
To provision follow these steps:
3945

40-
Provisioning is not required; it's an optional part of the plugin submission process that will speed the review.
46+
1. Run the `create-plugin` tool to generate the `provisioning` folder with additional files based on the plugin type selected.
47+
1. When you run the Docker development environment, these files are used to automatically install (and if applicable, _enable_) your plugin and a sample dashboard.
4148

42-
:::
49+
Notes:
4350

44-
1. When you run the create-plugin tool, it will generate a folder called `provisioning` with additional files based on the plugin type selected.
45-
1. When you run the Docker development environment, these files are used to automatically install (and if applicable, _enable_) your plugin and a sample dashboard.
46-
1. We recommended that you use and update the sample dashboard to continuously verify behavior as part of your development process. And, as appropriate, configure your plugin so that it can return data.
51+
- Use and update the sample dashboard to continuously verify behavior as part of your development process. If appropriate, configure your plugin so that it can return data.
52+
53+
- If you scaffolded your plugin with a previous version of `create-plugin`, you can run a new command to add the missing provisioning files.
4754

48-
:::note
4955

50-
In the case where a plugin has been scaffolded with a previous version of create-plugin, a new command can be run to retrospectively add the provisioning files.
5156

52-
:::
5357

54-
---

docusaurus/docs/publish-a-plugin/publish-or-update-a-plugin.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@ keywords:
1414

1515
# Publish or update a plugin
1616

17-
You've just built your plugin; now you want to share it with the world. Publishing your plugin to the [Grafana plugin catalog](https://grafana.com/plugins) makes it easily discoverable by millions of Grafana users.
17+
You've just built your plugin and now you want to share it with the world!
1818

19-
In this guide you learn how to manage the lifecycle of a plugin in the catalog, from publishing and updating to potentially deprecating.
19+
Publishing your plugin to the [Grafana plugin catalog](https://grafana.com/plugins) makes it easily discoverable by millions of Grafana users. Read on to learn how to manage the lifecycle of a plugin in the catalog, from publishing and updating to potentially deprecating.
2020

2121
## Before you begin
2222

0 commit comments

Comments
 (0)