-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
29 changed files
with
6,583 additions
and
2,938 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,158 @@ | ||
version: 2 | ||
jobs: | ||
build: | ||
build_plugin: | ||
docker: | ||
# specify the version you desire here | ||
- image: circleci/node:8 | ||
|
||
working_directory: ~/repo | ||
|
||
- image: circleci/node:10 | ||
working_directory: ~/plugin | ||
steps: | ||
- checkout | ||
- run: | ||
name: install yarn | ||
command: 'sudo npm install -g yarn --quiet' | ||
- restore_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: yarn install | ||
command: 'yarn install --pure-lockfile --no-progress' | ||
- save_cache: | ||
key: dependency-cache-{{ checksum "yarn.lock" }} | ||
paths: | ||
- node_modules | ||
# - run: | ||
# name: test | ||
# command: 'yarn test' | ||
- run: | ||
name: build | ||
command: 'yarn build' | ||
- store_artifacts: | ||
path: dist | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Install yarn | ||
command: | | ||
sudo npm install -g yarn --quiet | ||
yarn install --pure-lockfile | ||
- run: | ||
name: Run Toolkit Build | ||
command: npx grafana-toolkit plugin:ci-build | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: yarn-packages-{{ checksum "yarn.lock" }} | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ci | ||
package: | ||
docker: | ||
- image: circleci/node:10 | ||
working_directory: ~/plugin | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Package Distribution | ||
command: npx grafana-toolkit plugin:ci-package | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ci/jobs/package | ||
- ci/packages | ||
- ci/dist | ||
- ci/grafana-test-env | ||
test_6_2_5: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
working_directory: ~/plugin | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Setup Grafana (local install) | ||
command: | | ||
wget https://dl.grafana.com/oss/release/grafana_6.2.5_amd64.deb | ||
sudo apt-get install -y adduser libfontconfig1 | ||
sudo dpkg -i grafana_6.2.5_amd64.deb | ||
sudo apt-get install locate | ||
sudo updatedb | ||
sudo locate grafana | ||
sudo cat /etc/grafana/grafana.ini | ||
sudo echo ------------------------ | ||
sudo cp ci/grafana-test-env/custom.ini /usr/share/grafana/conf/custom.ini | ||
sudo cp ci/grafana-test-env/custom.ini /etc/grafana/grafana.ini | ||
sudo service grafana-server start | ||
sudo grafana-cli --version | ||
- run: | ||
name: Run e2e tests | ||
command: | | ||
npx grafana-toolkit plugin:ci-test | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ci/jobs/test_6_2_5 | ||
- store_test_results: | ||
path: ci/jobs/test_6_2_5 | ||
- store_artifacts: | ||
path: ci/jobs/test_6_2_5 | ||
test_6_3_0_beta1: | ||
docker: | ||
- image: circleci/node:10-browsers | ||
working_directory: ~/plugin | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Setup Grafana (local install) | ||
command: | | ||
wget https://dl.grafana.com/oss/release/grafana_6.3.0-beta1_amd64.deb | ||
sudo apt-get install -y adduser libfontconfig1 | ||
sudo dpkg -i grafana_6.3.0-beta1_amd64.deb | ||
sudo apt-get install locate | ||
sudo updatedb | ||
sudo locate grafana | ||
sudo cat /etc/grafana/grafana.ini | ||
sudo echo ------------------------ | ||
sudo cp ci/grafana-test-env/custom.ini /usr/share/grafana/conf/custom.ini | ||
sudo cp ci/grafana-test-env/custom.ini /etc/grafana/grafana.ini | ||
sudo service grafana-server start | ||
sudo grafana-cli --version | ||
- run: | ||
name: Run e2e tests | ||
command: | | ||
npx grafana-toolkit plugin:ci-test | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ci/jobs/test_6_3_0_beta1 | ||
- store_test_results: | ||
path: ci/jobs/test_6_3_0_beta1 | ||
- store_artifacts: | ||
path: ci/jobs/test_6_3_0_beta1 | ||
report: | ||
docker: | ||
- image: circleci/node:10 | ||
working_directory: ~/plugin | ||
steps: | ||
- checkout | ||
- attach_workspace: | ||
at: . | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Toolkit Report | ||
command: npx grafana-toolkit plugin:ci-report | ||
- store_artifacts: | ||
path: ci | ||
workflows: | ||
version: 2 | ||
plugin_workflow: | ||
jobs: | ||
- build_plugin | ||
- package: | ||
requires: | ||
- build_plugin | ||
- test_6_2_5: | ||
requires: | ||
- package | ||
- test_6_3_0_beta1: | ||
requires: | ||
- package | ||
- report: | ||
requires: | ||
- test_6_2_5 | ||
- test_6_3_0_beta1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,41 +1,5 @@ | ||
## Grafana Streaming Datasource (WORK IN PROGRESS) | ||
# Simple Data Source | ||
|
||
[](https://circleci.com/gh/ryantxu/streaming-datasource/tree/master) | ||
[](https://david-dm.org/ryantxu/streaming-datasource) | ||
[](https://david-dm.org/ryantxu/streaming-datasource?type=dev) | ||
[](https://circleci.com/gh/grafana/simple-datasource/tree/master) | ||
|
||
Simple streaming datasource. See also: | ||
https://github.com/seanlaff/simple-streaming-datasource/ | ||
|
||
|
||
This currently does a javascript only random walk | ||
|
||
|
||
### Example Server | ||
|
||
To run the sample server run: | ||
``` | ||
go run server.go | ||
``` | ||
|
||
|
||
To see the output it produces, run: | ||
``` | ||
curl --no-buffer http://localhost:7777 | ||
``` | ||
|
||
|
||
### Building | ||
|
||
To complie, run: | ||
|
||
``` | ||
yarn install --pure-lockfile | ||
yarn build | ||
``` | ||
|
||
#### Changelog | ||
|
||
##### v0.0.1-dev | ||
|
||
* First working version | ||
This is a stub to show how to create a basic data source plugin. |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,53 +1,20 @@ | ||
{ | ||
"name": "ryantxu-streaming-datasource", | ||
"version": "0.0.1-dev", | ||
"description": "Streaming Datasource", | ||
"version": "0.0.1", | ||
"description": "Example of a Grafana Data Source", | ||
"scripts": { | ||
"build": "webpack --config webpack.config.prod.js", | ||
"dev": "webpack --mode development", | ||
"watch": "webpack --mode development --watch", | ||
"test": "jest --config jest.config.js", | ||
"release": "node release.js", | ||
"precommit": "pretty-quick --staged", | ||
"pretty": "prettier --write src/**/*.ts" | ||
"build": "grafana-toolkit plugin:build", | ||
"test": "grafana-toolkit plugin:test", | ||
"dev": "grafana-toolkit plugin:dev", | ||
"watch": "grafana-toolkit plugin:dev --watch" | ||
}, | ||
"author": "Ryan McKinley", | ||
"license": "Apache", | ||
"dependencies": { | ||
"lodash": "^4.17.10", | ||
"react": "^16.2.0", | ||
"react-dom": "^16.2.0" | ||
}, | ||
"prettier": { | ||
"trailingComma": "es5", | ||
"singleQuote": true, | ||
"printWidth": 120 | ||
}, | ||
"license": "Apache-2.0", | ||
"devDependencies": { | ||
"@types/grafana": "github:CorpGlory/types-grafana.git", | ||
"@types/jest": "^23.3.1", | ||
"@types/lodash": "^4.14.74", | ||
"@types/react": "^16.2.0", | ||
"babel-core": "^6.26.3", | ||
"babel-jest": "^23.0.1", | ||
"babel-loader": "^7.1.4", | ||
"babel-preset-env": "^1.7.0", | ||
"clean-webpack-plugin": "^0.1.19", | ||
"copy-webpack-plugin": "^4.5.1", | ||
"css-loader": "^1.0.0", | ||
"grafana-sdk-mocks": "github:ryantxu/grafana-sdk-mocks", | ||
"jest": "^23.0.1", | ||
"ng-annotate-webpack-plugin": "^0.3.0", | ||
"prettier": "^1.14", | ||
"pretty-quick": "^1.4.1", | ||
"replace-in-file-webpack-plugin": "^1.0.6", | ||
"rxjs": "^6.3.3", | ||
"style-loader": "^0.22", | ||
"ts-jest": "^23", | ||
"ts-loader": "^4.3.0", | ||
"typescript": "^3", | ||
"webpack": "^4.17", | ||
"webpack-cli": "^3.1", | ||
"uglifyjs-webpack-plugin": "^2.1.1" | ||
"@grafana/data": "next", | ||
"@grafana/toolkit": "next", | ||
"@grafana/ui": "next", | ||
"@types/lodash": "^4.14.134", | ||
"lodash": "^4.17.15" | ||
} | ||
} |
Oops, something went wrong.