For end‑user plugin docs, see
src/README.md.
For scaffold details and common commands, seecreate-plugin-README.mdin this repo.
This guide covers local development, running a local Grafana, and creating releases either via GitHub Actions from a git tag (CI path) or locally with create_release.sh (for test packaging).
- Git
- Node.js ≥ 22 and npm
- Go ≥ 1.21
- Docker with the Compose plugin
- CLI tools:
zip,awk,sed,jq
Target environment: Grafana 12.1+. Backend binaries are built via Magefile.go.
sudo apt install -y git zip unzip gawk sed jq golang-go nodejs npm docker.io docker-compose
sudo usermod -aG docker $USERgit clone https://github.com/kljama/grafana-catalyst-datasource.git
cd grafana-catalyst-datasource
npm ciDev UI (hot reload):
npm run devLint & tests:
npm run lint
npm run testA docker-compose.yaml is included to run a local Grafana with the plugin mounted.
# rebuild containers when UI or backend changes
docker compose down
docker compose up -d --build
# force a clean re-create (e.g., after dependency updates)
docker compose up -d --force-recreateUnsigned plugins are allowed in this dev setup. For production, follow Grafana’s signing guide.
git checkout -b feat/my-change
git add -A
git commit -m "feat: concise summary"
git push -u origin feat/my-changeKeep CHANGELOG.md updated. Commits should follow the Conventional Commits specification to facilitate release note generation. The changelog is updated manually.
Choose one path below. Do not mix them.
Minimal commands (trigger CI by pushing a tag):
# 1) create and push the annotated tag
export V=1.0.5
git tag -a v$V -m "Release v$V"
git push origin v$V
# optional: push pending commits to main
git push origin mainWhat happens next (handled by .github/workflows/release.yml):
- The workflow reads the tag (
v1.0.5 → 1.0.5) and injects it at build time. - Runs
npm ciandnpm run buildto producedist/(including transformeddist/plugin.json). - Builds the backend with
go run github.com/magefile/mage -v BuildAll(currently linux/amd64 only). - Zips the plugin (
<plugin-id>-<version>.zip) and auto‑creates a GitHub Release for the tag, attaching the ZIP (and.sha1).- To create a draft instead of publishing immediately, set
draft: truein the workflow’s “Create GitHub Release” step.
- To create a draft instead of publishing immediately, set
Note: Local scripts are not used in the CI path.
Use this to build a ZIP locally for testing.
- (Recommended) Tag first so the local packager uses the correct version:
export V=1.0.5
git tag -a v$V -m "Release v$V"- Package locally (frontend + backend + zip):
./create_release.shOutput: grafana-catalyst-datasource-<version>.zip in the repo root.
-
Plugin not visible
- Confirm Grafana 12.1+
- Check container logs for plugin load errors
- Ensure the build created
dist/with processedplugin.json(placeholders like%VERSION%/%TODAY%are replaced during build)
-
Backend missing in package
- Ensure
Magefile.gois present and used by the build - Confirm
plugin.jsonhas"backend": trueand"executable": "grafana-catalyst-datasource"
- Ensure
-
Windows ADS file in zip
- Remove any
*:Zone.Identifierfile and add this to.gitignore:*:Zone.Identifier
- Remove any
Apache-2.0 © kljama