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
2d7d171e
Commit
2d7d171e
authored
Oct 31, 2019
by
Dominik Prokop
Committed by
Ryan McKinley
Oct 31, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
grafana/toolkit: save artifacts in a zip id in the folder (#20123)
parent
c032399e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
2 deletions
+7
-2
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
+7
-2
No files found.
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
View file @
2d7d171e
...
@@ -3,6 +3,7 @@ import { pluginBuildRunner } from './plugin.build';
...
@@ -3,6 +3,7 @@ import { pluginBuildRunner } from './plugin.build';
import
{
restoreCwd
}
from
'../utils/cwd'
;
import
{
restoreCwd
}
from
'../utils/cwd'
;
import
{
S3Client
}
from
'../../plugins/aws'
;
import
{
S3Client
}
from
'../../plugins/aws'
;
import
{
getPluginJson
}
from
'../../config/utils/pluginValidation'
;
import
{
getPluginJson
}
from
'../../config/utils/pluginValidation'
;
import
{
getPluginId
}
from
'../../config/utils/getPluginId'
;
import
{
PluginMeta
}
from
'@grafana/data'
;
import
{
PluginMeta
}
from
'@grafana/data'
;
// @ts-ignore
// @ts-ignore
...
@@ -129,12 +130,16 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -129,12 +130,16 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
const
start
=
Date
.
now
();
const
start
=
Date
.
now
();
const
ciDir
=
getCiFolder
();
const
ciDir
=
getCiFolder
();
const
packagesDir
=
path
.
resolve
(
ciDir
,
'packages'
);
const
packagesDir
=
path
.
resolve
(
ciDir
,
'packages'
);
cons
t
distDir
=
path
.
resolve
(
ciDir
,
'dist'
);
le
t
distDir
=
path
.
resolve
(
ciDir
,
'dist'
);
const
docsDir
=
path
.
resolve
(
ciDir
,
'docs'
);
const
docsDir
=
path
.
resolve
(
ciDir
,
'docs'
);
const
grafanaEnvDir
=
path
.
resolve
(
ciDir
,
'grafana-test-env'
);
const
grafanaEnvDir
=
path
.
resolve
(
ciDir
,
'grafana-test-env'
);
await
execa
(
'rimraf'
,
[
packagesDir
,
distDir
,
grafanaEnvDir
]);
await
execa
(
'rimraf'
,
[
packagesDir
,
distDir
,
grafanaEnvDir
]);
fs
.
mkdirSync
(
packagesDir
);
fs
.
mkdirSync
(
packagesDir
);
fs
.
mkdirSync
(
distDir
);
fs
.
mkdirSync
(
distDir
);
// Updating the dist dir to have a pluginId named directory in it
// The zip needs to contain the plugin code wrapped in directory with a pluginId name
distDir
=
path
.
resolve
(
ciDir
,
`dist/
${
getPluginId
()}
`
);
fs
.
mkdirSync
(
grafanaEnvDir
);
fs
.
mkdirSync
(
grafanaEnvDir
);
console
.
log
(
'Build Dist Folder'
);
console
.
log
(
'Build Dist Folder'
);
...
@@ -184,7 +189,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
...
@@ -184,7 +189,7 @@ const packagePluginRunner: TaskRunner<PluginCIOptions> = async () => {
plugin
:
await
getPackageDetails
(
zipFile
,
distDir
),
plugin
:
await
getPackageDetails
(
zipFile
,
distDir
),
};
};
console
.
log
(
'Setup Grafan Environment'
);
console
.
log
(
'Setup Grafan
a
Environment'
);
let
p
=
path
.
resolve
(
grafanaEnvDir
,
'plugins'
,
pluginInfo
.
id
);
let
p
=
path
.
resolve
(
grafanaEnvDir
,
'plugins'
,
pluginInfo
.
id
);
fs
.
mkdirSync
(
p
,
{
recursive
:
true
});
fs
.
mkdirSync
(
p
,
{
recursive
:
true
});
await
execa
(
'unzip'
,
[
zipFile
,
'-d'
,
p
]);
await
execa
(
'unzip'
,
[
zipFile
,
'-d'
,
p
]);
...
...
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