Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
N
nexpie-grafana-theme
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Registry
Registry
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Kornkitt Poolsup
nexpie-grafana-theme
Commits
e4e77194
Unverified
Commit
e4e77194
authored
Sep 12, 2019
by
Ryan McKinley
Committed by
GitHub
Sep 12, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
toolkit: run make for backend plugins (#19029)
parent
bc4ba64a
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
11 deletions
+15
-11
packages/grafana-toolkit/src/cli/index.ts
+6
-2
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
+9
-9
No files found.
packages/grafana-toolkit/src/cli/index.ts
View file @
e4e77194
...
@@ -156,9 +156,13 @@ export const run = (includeInternalScripts = false) => {
...
@@ -156,9 +156,13 @@ export const run = (includeInternalScripts = false) => {
program
program
.
command
(
'plugin:ci-build'
)
.
command
(
'plugin:ci-build'
)
.
option
(
'--backend
<backend>'
,
'For backend task, which backend to run'
)
.
option
(
'--backend
'
,
'Run Makefile for backend task'
,
false
)
.
description
(
'Build the plugin, leaving
artifacts in /dist
'
)
.
description
(
'Build the plugin, leaving
results in /dist and /coverage
'
)
.
action
(
async
cmd
=>
{
.
action
(
async
cmd
=>
{
if
(
typeof
cmd
===
'string'
)
{
console
.
error
(
`Invalid argument:
${
cmd
}
\nSee --help for a list of available commands.`
);
process
.
exit
(
1
);
}
await
execTask
(
ciBuildPluginTask
)({
await
execTask
(
ciBuildPluginTask
)({
backend
:
cmd
.
backend
,
backend
:
cmd
.
backend
,
});
});
...
...
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
View file @
e4e77194
...
@@ -35,7 +35,7 @@ import { runEndToEndTests } from '../../plugins/e2e/launcher';
...
@@ -35,7 +35,7 @@ import { runEndToEndTests } from '../../plugins/e2e/launcher';
import
{
getEndToEndSettings
}
from
'../../plugins/index'
;
import
{
getEndToEndSettings
}
from
'../../plugins/index'
;
export
interface
PluginCIOptions
{
export
interface
PluginCIOptions
{
backend
?:
string
;
backend
?:
boolean
;
full
?:
boolean
;
full
?:
boolean
;
upload
?:
boolean
;
upload
?:
boolean
;
}
}
...
@@ -58,14 +58,14 @@ const buildPluginRunner: TaskRunner<PluginCIOptions> = async ({ backend }) => {
...
@@ -58,14 +58,14 @@ const buildPluginRunner: TaskRunner<PluginCIOptions> = async ({ backend }) => {
fs
.
mkdirSync
(
workDir
);
fs
.
mkdirSync
(
workDir
);
if
(
backend
)
{
if
(
backend
)
{
cons
ole
.
log
(
'TODO, backend support?
'
);
cons
t
makefile
=
path
.
resolve
(
process
.
cwd
(),
'Makefile
'
);
fs
.
mkdirSync
(
path
.
resolve
(
process
.
cwd
(),
'dist'
));
if
(
!
fs
.
existsSync
(
makefile
))
{
const
file
=
path
.
resolve
(
process
.
cwd
(),
'dist'
,
`README_
${
backend
}
.txt
`
);
throw
new
Error
(
`Missing:
${
makefile
}
. A Makefile is required for backend plugins.
`
);
fs
.
writeFile
(
file
,
`TODO... build bakend plugin:
${
backend
}
!`
,
err
=>
{
}
if
(
err
)
{
throw
new
Error
(
'Unable to write: '
+
file
);
// Run plugin-ci task
}
const
exe
=
await
execa
(
'make'
,
[
'backend-plugin-ci'
]);
}
);
console
.
log
(
exe
.
stdout
);
}
else
{
}
else
{
// Do regular build process with coverage
// Do regular build process with coverage
await
pluginBuildRunner
({
coverage
:
true
});
await
pluginBuildRunner
({
coverage
:
true
});
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment