Skip to content

Commit

Permalink
Release v1.0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
sni committed Feb 11, 2022
1 parent 104dcab commit 34797e0
Show file tree
Hide file tree
Showing 8 changed files with 4,999 additions and 5,132 deletions.
29 changes: 29 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
### Changelog

1.0.7 2022-02-11
- rebuild for grafana 8
- update dependencies

1.0.6 2021-01-04
- sign plugin
- switch package builds to yarn

1.0.5 2020-09-11
- improve packaging

1.0.4 2020-06-29
- fix export with "Export for sharing externally" enabled

1.0.3 2019-02-15
- support aggregation functions
- convert hash responses into tables
- support timeseries based panels

1.0.2 2019-01-04
- add more time styles

1.0.1 2018-09-30
- fix annotation query parser

1.0.0 2018-09-14
- inital release
42 changes: 25 additions & 17 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,36 +1,44 @@
PLUGINNAME=sni-thruk-datasource
TAGVERSION=$(shell git describe --tag --exact-match 2>/dev/null | sed -e 's/^v//')
DOCKER=docker run \
-t \
--rm \
-v $(shell pwd):/src \
-w "/src" \
-u $(shell id -u) \
-e GRAFANA_API_KEY="$(GRAFANA_API_KEY)" \
node:latest
-e NODE_OPTIONS"=--openssl-legacy-provider" \
-e "GRAFANA_API_KEY=$(GRAFANA_API_KEY)"

build:
$(DOCKER) bash -c "yarn install && yarn run build"
$(DOCKER) node:latest bash -c "yarn install && yarn run build"

buildwatch:
$(DOCKER) bash -c "yarn install && yarn run watch"
$(DOCKER) node:latest bash -c "yarn install && yarn run watch"

buildupgrade:
$(DOCKER) node:latest bash -c "yarn install && yarn upgrade"

buildsign:
$(DOCKER) \
npx @grafana/toolkit plugin:sign
$(DOCKER) node:latest \
npx --legacy-peer-deps @grafana/toolkit plugin:sign

buildshell:
$(DOCKER) -i node:latest bash

grafanadev:
docker run --rm -it -v $(shell pwd):/var/lib/grafana/plugins/$(PLUGINNAME) \
-p 3000:3000 --name grafana.docker \
-e "GF_PLUGINS_ALLOW_LOADING_UNSIGNED_PLUGINS=$(PLUGINNAME)" \
-e "GF_USERS_DEFAULT_THEME=light" \
grafana/grafana

clean:
rm -rf dist

releasebuild:
git checkout -b release-$(TAGVERSION)
@if [ "x$(TAGVERSION)" = "x" ]; then echo "ERROR: must be on a git tag, got: $(shell git describe --tag --dirty)"; exit 1; fi
make clean
make GRAFANA_API_KEY=$(GRAFANA_API_KEY) build buildsign
git add -f dist
git commit -m "Release build v$(TAGVERSION)"
git log -1
git checkout master

releasepush:
git push --set-upstream origin release-$(TAGVERSION)
git checkout master
git push
git push --tags
mv dist/ $(PLUGINNAME)
zip $(PLUGINNAME)-$(TAGVERSION).zip $(PLUGINNAME) -r
rm -rf $(PLUGINNAME)
39 changes: 8 additions & 31 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -110,52 +110,29 @@ which is the same as
To test and improve the plugin you can run Grafana instance in Docker using
following command (in the source directory of this plugin):

docker run --rm -it -v $PWD:/var/lib/grafana/plugins/sni-thruk-datasource \
-p 3000:3000 --name grafana.docker \
--env=GF_USERS_DEFAULT_THEME=light \
grafana/grafana
%> make grafanadev

This will expose local plugin from your machine to Grafana container. Now
run `make buildwatch` to compile dist directory and start changes watcher:

%> make buildwatch


#### Create Release

How to create a new release:

%> export RELVERSION=1.0.6
%> export RELVERSION=1.0.7
%> export GRAFANA_API_KEY=...
%> vi README.md # add changelog entry
%> vi package.json # replace version
%> vi CHANGELOG.md # add changelog entry
%> git commit -am "Release v${RELVERSION}"
%> git tag -a v${RELVERSION} -m "Create release tag v${RELVERSION}"
%> make GRAFANA_API_KEY=${GRAFANA_API_KEY} clean releasebuild
%> make releasepush
# upload zip somewhere and validate on https://plugin-validator.grafana.net/
# create release here https://github.com/sni/grafana-thruk-datasource/releases/new
# submit plugin update here https://grafana.com/orgs/sni/plugins


### Changelog

1.0.6 2021-01-04
- sign plugin
- switch package builds to yarn

1.0.5 2020-09-11
- improve packaging

1.0.4 2020-06-29
- fix export with "Export for sharing externally" enabled

1.0.3 2019-02-15
- support aggregation functions
- convert hash responses into tables
- support timeseries based panels

1.0.2 2019-01-04
- add more time styles

1.0.1 2018-09-30
- fix annotation query parser

1.0.0 2018-09-14
- inital release
see CHANGELOG.md
14 changes: 7 additions & 7 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "grafana-thruk-datasource",
"version": "1.0.3",
"version": "1.0.7",
"description": "grafana thruk datasource",
"main": "index.js",
"scripts": {
Expand All @@ -21,14 +21,14 @@
"url": "https://github.com/sni/grafana-thruk-datasource/issues"
},
"devDependencies": {
"@grafana/data": "^7.1.5",
"@grafana/runtime": "^7.1.5",
"@grafana/toolkit": "^7.1.5",
"@grafana/ui": "^7.1.5",
"@types/lodash": "^4.14.160"
"@grafana/data": ">=8.0.0",
"@grafana/runtime": ">=8.0.0",
"@grafana/toolkit": ">=8.0.0",
"@grafana/ui": ">=8.0.0",
"@types/lodash": ">=4.0.0"
},
"dependencies": {
"lodash": ">=4.17.20"
"lodash": ">=4.0.0"
},
"homepage": "https://github.com/sni/grafana-thruk-datasource#readme"
}
Binary file added src/img/screenshot.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
16 changes: 9 additions & 7 deletions src/plugin.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,6 @@
"id": "sni-thruk-datasource",
"type": "datasource",

"partials": {
"config": "public/app/plugins/datasource/thruk/partials/config.html"
},

"includes": [
],

Expand All @@ -21,19 +17,25 @@
"url": "http://labs.consol.de"
},
"logos": {
"small": "src/img/logo.svg",
"large": "src/img/logo.svg"
"small": "img/logo.svg",
"large": "img/logo.svg"
},
"links": [
{"name": "GitHub", "url": "https://github.com/sni/grafana-thruk-datasource"},
{"name": "MIT License", "url": "https://github.com/sni/grafana-thruk-datasource/blob/master/LICENSE"}
],
"keywords": [
"naemon", "nagios", "thruk"
],
"screenshots": [
{"name": "thruk-datasource query editor", "path": "img/screenshot.png"}
],
"version": "%VERSION%",
"updated": "%TODAY%"
},

"dependencies": {
"grafanaVersion": "7.0.x",
"grafanaDependency": ">=8.0.0",
"plugins": [ ]
}
}
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
"jsx": "react"
},
"extends": "@grafana/toolkit/src/config/tsconfig.plugin.json",
"include": ["src", "types"]
"include": ["src"]
}
Loading

0 comments on commit 34797e0

Please sign in to comment.