Skip to content

Commit 002b2be

Browse files
authoredJul 11, 2024
Merge pull request #110 from questdb/insmac-patch-2
Update DEV_GUIDE.md
2 parents 5087340 + a6aff13 commit 002b2be

File tree

1 file changed

+24
-0
lines changed

1 file changed

+24
-0
lines changed
 

‎DEV_GUIDE.md

+24
Original file line numberDiff line numberDiff line change
@@ -48,3 +48,27 @@ docker run -d -p 9000:9000 -p 8812:8812 --name secure-questdb-server --ulimit no
4848
docker exec -it secure-questdb-server bash
4949
cp /var/lib/questdb/conf/keys/my-own-ca.crt /usr/local/share/ca-certificates/root.ca.crt
5050
update-ca-certificates
51+
52+
## Building the release artifact
53+
54+
⚠️ **Important:** The plugin has to be built from the `main` branch, if intended to be released into Grafana as version update. This is because the automated review process task compares the source tree inside the artifact with the current `main` branch of the repo, and fails if they don't match.
55+
56+
The final plugin artifact has to be signed either by a key using the [@grafana/sign-plugin](https://www.npmjs.com/package/@grafana/sign-plugin) tool. The script needs `GRAFANA_ACCESS_POLICY_TOKEN` ENV variable to be set before hand - it can be obtained in Grafana Cloud's personal account.
57+
58+
By default, all the assets are built into `dist` directory, which does not match the Grafana's required one, which should match the plugin ID (in this case, `questdb-questdb-datasource`). Therefore, we need to proceed as following:
59+
60+
```sh
61+
export GRAFANA_ACCESS_POLICY_TOKEN=your_token
62+
nvm use 20
63+
yarn build
64+
mage -v buildAll
65+
cp -r dist/ questdb-questdb-datasource
66+
npx @grafana/sign-plugin@latest --distDir questdb-questdb-datasource
67+
zip -r questdb-questdb-datasource.zip questdb-questdb-datasource -r
68+
md5 questdb-questdb-datasource.zip
69+
rm -rf questdb-questdb-datasource
70+
```
71+
72+
`md5` checksum is needed only during the process of releasing the plugin version update in Grafana Cloud.
73+
74+
If intended to release into Grafana, the ZIP file has to be uploaded into a publicly available server (i.e. S3 bucket), since the link to it has to be provided during the update process.

0 commit comments

Comments
 (0)