You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(build): update out-of-date dependencies and documentation and also improve makefile
fix(build): improve makefile to run different kind of commands necessary to build the plugin locally
fix(build): added typescript explicit dependency
fix(build): upgraded grafana-plugin-sdk-go module
fix(docs): add link to Grafana's how to publish plugin
fix(docs): add summary to the readme
fix(build): rename ci.yaml github action to validate-build.yaml to have a more precise meaning
fix(build): switch from master branch to main branch in the worflow_dispatch
run: if [ "v${{ steps.metadata.outputs.plugin-version }}" != "${{ steps.metadata.outputs.github-tag }}" ]; then printf "\033[0;31mPlugin version doesn't match tag name\033[0m\n"; exit 1; fi
101
108
@@ -106,13 +113,15 @@ jobs:
106
113
zip ${{ steps.metadata.outputs.archive }} ${{ steps.metadata.outputs.plugin-id }} -r
Copy file name to clipboardExpand all lines: CONTRIBUTING.md
+63-35Lines changed: 63 additions & 35 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,4 +1,20 @@
1
-
# <aname="commit"></a> Commit Message Format
1
+
# What is Grafana Data Source Backend Plugin?
2
+
3
+
Grafana supports a wide range of data sources, including Prometheus, MySQL, and even Datadog. There’s a good chance you can already visualize metrics from the systems you have set up. In some cases, though, you already have an in-house metrics solution that you’d like to add to your Grafana dashboards. Grafana Data Source Plugins enables integrating such solutions with Grafana.
4
+
5
+
For more information about backend plugins, refer to the documentation on [Backend plugins](https://grafana.com/docs/grafana/latest/developers/plugins/backend/).
6
+
7
+
A backend data source plugin consists of both frontend and backend components.
8
+
9
+
In this case, the frontend is written in javascript and the backend is written in golang.
10
+
11
+
# Summary
12
+
13
+
-[Commits format](#commit)
14
+
-[Building and running locally](#run-locally)
15
+
-[Learn More related contents](#learn-more)
16
+
17
+
# <aname="commit"id="commit"></a> Commit Message Format
2
18
3
19
We have very precise rules over how our Git commit messages must be formatted.
4
20
This format leads to **easier to read commit history**.
@@ -89,7 +105,7 @@ Breaking Change section should start with the phrase "BREAKING CHANGE: " followe
89
105
90
106
Similarly, a Deprecation section should start with "DEPRECATED: " followed by a short description of what is deprecated, a blank line, and a detailed description of the deprecation that also mentions the recommended update path.
91
107
92
-
### Revert commits
108
+
### <aname="revert-commit"></a>Revert commits
93
109
94
110
If the commit reverts a previous commit, it should begin with `revert: `, followed by the header of the reverted commit.
95
111
@@ -98,19 +114,11 @@ The content of the commit message body should contain:
98
114
- information about the SHA of the commit being reverted in the following format: `This reverts commit <SHA>`,
99
115
- a clear description of the reason for reverting the commit message.
100
116
101
-
# Instructions for Building and Running Locally
102
-
103
-
This is a starting point for building Grafana Data Source Backend Plugins
104
-
105
-
## What is Grafana Data Source Backend Plugin?
106
-
107
-
Grafana supports a wide range of data sources, including Prometheus, MySQL, and even Datadog. There’s a good chance you can already visualize metrics from the systems you have set up. In some cases, though, you already have an in-house metrics solution that you’d like to add to your Grafana dashboards. Grafana Data Source Plugins enables integrating such solutions with Grafana.
108
-
109
-
For more information about backend plugins, refer to the documentation on [Backend plugins](https://grafana.com/docs/grafana/latest/developers/plugins/backend/).
117
+
---
110
118
111
-
## Getting started
119
+
#Instructions for Building and Running it Locally <aname="run-locally"id="run-locally"></a>
112
120
113
-
A data source backend plugin consists of both frontend and backend components.
121
+
This is a starting point for building Grafana Data Source Backend Plugins
114
122
115
123
### Install Toolchain
116
124
@@ -241,19 +249,43 @@ A data source backend plugin consists of both frontend and backend components.
241
249
mage -l
242
250
```
243
251
244
-
### Run the Grafana
252
+
### Sign the Grafana plugin (Golioth Maintainers)
253
+
254
+
In case you have a Grafana API KEY, you can sign the plugin locally.
245
255
246
-
1. Start the docker container
256
+
Set the GRAFANA_API_KEY:
257
+
```
258
+
$ export GRAFANA_API_KEY=<api-key-here>
259
+
```
247
260
261
+
Sign the plugin:
262
+
```
263
+
$ npm run sign
264
+
```
265
+
266
+
### Run the Grafana with Docker
267
+
268
+
1. Start the docker container:
269
+
270
+
- Run Grafana able to execute **unsigned** plugins
- Restart container after first run: `docker start grafana`
259
291
- Restart container after first run as daemon: `docker start grafana`
@@ -309,44 +341,36 @@ Every time you modify locally the plugin and desire send this change to be publi
309
341
310
342
For example, if you put some relative link in the README or some broken link, the validation will claim to you about them. And you'll need fix all of the claims before the submission.
311
343
312
-
To perform the local validation you must have the `Make` tool installed so that you can run the Makefile's commands and the Grafana's plugin validator `plugincheck`in order to your validate it.
313
-
314
-
In the root directory you can find a `Makefile` and it contains two commands:
344
+
To perform the local validation you must have the `Make` tool installed so that you can run the Makefile's commands and the Grafana's [plugin validator](https://github.com/grafana/plugin-validator) `plugincheck`in order to your validate it.
315
345
316
-
- **setup**
346
+
Or, you can skip installing the `plugincheck` locally and just run it through its binary using the `Node Package eXecute - npx command`. This tutorial will run the plugin validation using the `npx` command.
317
347
318
-
Run this commandifyou don't have installed yet the `plugincheck` tool in order to install it.
348
+
In the root directory you can find a `Makefile` with the following commands:
319
349
320
350
- **validate-plugin**
321
351
322
-
Run this command after have installed the plugincheck. It will prepare and perform the plugin validation.
352
+
Run this commandin order to validate the plugin.
323
353
324
-
To run the commands go to the terminal and goes to the plugin's root directory:
354
+
To run the command open the terminal and goes to the plugin's root directory:
325
355
326
356
```
327
-
cd path/to/your/clone/grafana-websocket-plugin
357
+
$ cd path/to/your/clone/grafana-websocket-plugin
328
358
```
329
359
330
-
Next, install the plugin validator
360
+
Run the validator:
331
361
332
362
```
333
-
make setup
363
+
$ make validate-plugin
334
364
```
335
365
336
-
Finally, run the validator:
337
-
338
-
```
339
-
make validate-plugin
340
-
```
341
-
342
-
Case the validator realizes some error or warning in your plugin, it will generate in your terminal some kind of output like the following:
366
+
Case the validator realizes any error or warning in your plugin, it will generate in your terminal some kind of output like the following:
0 commit comments