Skip to content

Commit

Permalink
grafana/toolkit: improve CircleCI integration (grafana#18071)
Browse files Browse the repository at this point in the history
* don't actually install grafana in the setup step

* updat eversion changes

* add report stage

* update versions

* don't do failing test

* upate version

* print plugins

* update versions

* copy docs

* Update package.json
  • Loading branch information
ryantxu authored and dprokop committed Jul 12, 2019
1 parent 1cbec50 commit ca62883
Show file tree
Hide file tree
Showing 7 changed files with 148 additions and 137 deletions.
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,5 +2,5 @@
"npmClient": "yarn",
"useWorkspaces": true,
"packages": ["packages/*"],
"version": "6.4.0-alpha.6"
"version": "6.4.0-alpha.12"
}
2 changes: 1 addition & 1 deletion packages/grafana-data/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grafana/data",
"version": "6.4.0-alpha.2",
"version": "6.4.0-alpha.12",
"description": "Grafana Data Library",
"keywords": [
"typescript"
Expand Down
2 changes: 1 addition & 1 deletion packages/grafana-runtime/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grafana/runtime",
"version": "6.4.0-alpha.2",
"version": "6.4.0-alpha.12",
"description": "Grafana Runtime Library",
"keywords": [
"grafana"
Expand Down
2 changes: 1 addition & 1 deletion packages/grafana-toolkit/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@grafana/toolkit",
"version": "6.4.0-alpha.6",
"version": "6.4.0-alpha.12",
"description": "Grafana Toolkit",
"keywords": [
"grafana",
Expand Down
33 changes: 20 additions & 13 deletions packages/grafana-toolkit/src/cli/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,11 @@ import { closeMilestoneTask } from './tasks/closeMilestone';
import { pluginDevTask } from './tasks/plugin.dev';
import {
ciBuildPluginTask,
ciBuildPluginDocsTask,
ciBundlePluginTask,
ciTestPluginTask,
ciPluginReportTask,
ciDeployPluginTask,
ciSetupPluginTask,
} from './tasks/plugin.ci';
import { buildPackageTask } from './tasks/package.build';

Expand Down Expand Up @@ -148,39 +149,45 @@ export const run = (includeInternalScripts = false) => {

program
.command('plugin:ci-build')
.option('--platform <platform>', 'For backend task, which backend to run')
.option('--backend <backend>', 'For backend task, which backend to run')
.description('Build the plugin, leaving artifacts in /dist')
.action(async cmd => {
await execTask(ciBuildPluginTask)({
platform: cmd.platform,
backend: cmd.backend,
});
});

program
.command('plugin:ci-bundle')
.description('Create a zip artifact for the plugin')
.command('plugin:ci-docs')
.description('Build the HTML docs')
.action(async cmd => {
await execTask(ciBundlePluginTask)({});
await execTask(ciBuildPluginDocsTask)({});
});

program
.command('plugin:ci-setup')
.option('--installer <installer>', 'Name of installer to download and run')
.description('Install and configure grafana')
.command('plugin:ci-bundle')
.description('Create a zip artifact for the plugin')
.action(async cmd => {
await execTask(ciSetupPluginTask)({
installer: cmd.installer,
});
await execTask(ciBundlePluginTask)({});
});

program
.command('plugin:ci-test')
.option('--full', 'run all the tests (even stuff that will break)')
.description('end-to-end test using bundle in /artifacts')
.action(async cmd => {
await execTask(ciTestPluginTask)({
platform: cmd.platform,
full: cmd.full,
});
});

program
.command('plugin:ci-report')
.description('Build a report for this whole process')
.action(async cmd => {
await execTask(ciPluginReportTask)({});
});

program
.command('plugin:ci-deploy')
.description('Publish plugin CI results')
Expand Down
Loading

0 comments on commit ca62883

Please sign in to comment.