This repository has been archived by the owner on Jan 23, 2025. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Sync with simple datasource repo (#11)
* Sync circleci config * Sync changes from simple-datasource master branch * Update readme * yarn install * Build and test backend in ci Fixes #5
- Loading branch information
Showing
11 changed files
with
483 additions
and
493 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,158 +1,75 @@ | ||
version: 2 | ||
jobs: | ||
build_plugin: | ||
docker: | ||
- image: circleci/node:12 | ||
working_directory: ~/plugin | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
keys: | ||
- yarn-packages-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Install yarn | ||
command: yarn install --pure-lockfile | ||
- run: | ||
name: Run Toolkit Build | ||
command: | | ||
npx grafana-toolkit plugin:ci-build | ||
npx grafana-toolkit plugin:ci-build --finish | ||
- save_cache: | ||
paths: | ||
- node_modules | ||
key: yarn-packages-{{ checksum "yarn.lock" }} | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ci | ||
package: | ||
docker: | ||
- image: circleci/node:12 | ||
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:12-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:12-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:12 | ||
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 | ||
version: 2.1 | ||
|
||
parameters: | ||
ssh-fingerprint: | ||
type: string | ||
default: ${GITHUB_SSH_FINGERPRINT} | ||
|
||
aliases: | ||
# Workflow filters | ||
- &filter-only-master | ||
branches: | ||
only: master | ||
- &filter-only-release | ||
branches: | ||
only: /^v[1-9]*[0-9]+\.[1-9]*[0-9]+\.x$/ | ||
|
||
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 | ||
- build | ||
|
||
executors: | ||
default_exec: # declares a reusable executor | ||
docker: | ||
- image: srclosson/grafana-plugin-ci-alpine:latest | ||
e2e_exec: | ||
docker: | ||
- image: srclosson/grafana-plugin-ci-e2e:latest | ||
|
||
jobs: | ||
build: | ||
executor: default_exec | ||
steps: | ||
- checkout | ||
- restore_cache: | ||
name: restore node_modules | ||
keys: | ||
- build-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Install dependencies | ||
command: | | ||
mkdir ci | ||
[ -f ~/project/node_modules/.bin/grafana-toolkit ] || yarn install --frozen-lockfile | ||
- save_cache: | ||
name: save node_modules | ||
paths: | ||
- ~/project/node_modules | ||
key: build-cache-{{ .Environment.CACHE_VERSION }}-{{ checksum "yarn.lock" }} | ||
- run: | ||
name: Build and test frontend | ||
command: ./node_modules/.bin/grafana-toolkit plugin:ci-build | ||
- run: | ||
name: Build backend | ||
command: mage -v buildAll | ||
- run: | ||
name: Test backend | ||
command: | | ||
mage -v lint | ||
mage -v coverage | ||
- run: | ||
name: Move results to ci folder | ||
command: ./node_modules/.bin/grafana-toolkit plugin:ci-build --finish | ||
- run: | ||
name: Package distribution | ||
command: | | ||
./node_modules/.bin/grafana-toolkit plugin:ci-package | ||
- persist_to_workspace: | ||
root: . | ||
paths: | ||
- ci/jobs/package | ||
- ci/packages | ||
- ci/dist | ||
- ci/grafana-test-env | ||
- store_artifacts: | ||
path: ci |
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 |
---|---|---|
|
@@ -26,3 +26,5 @@ work/ | |
ci/ | ||
e2e-results/ | ||
|
||
# Editor | ||
.idea |
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,3 +1,3 @@ | ||
module.exports = { | ||
...require("./node_modules/@grafana/toolkit/src/config/prettier.plugin.config.json"), | ||
}; | ||
}; |
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
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
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
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,9 +1,9 @@ | ||
{ | ||
"extends": "@grafana/toolkit/src/config/tsconfig.plugin.json", | ||
"extends": "./node_modules/@grafana/toolkit/src/config/tsconfig.plugin.json", | ||
"include": ["src", "types"], | ||
"compilerOptions": { | ||
"rootDir": "./src", | ||
"baseUrl": "./src", | ||
"typeRoots": ["./node_modules/@types"] | ||
} | ||
} | ||
} |
Oops, something went wrong.