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
e27731bc
Unverified
Commit
e27731bc
authored
Aug 14, 2019
by
Ryan McKinley
Committed by
GitHub
Aug 14, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Toolkit: write PR report to a folder with the circle build number (#18560)
parent
11f90499
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
13 deletions
+14
-13
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
+13
-12
packages/grafana-toolkit/src/plugins/aws.ts
+1
-1
No files found.
packages/grafana-toolkit/src/cli/tasks/plugin.ci.ts
View file @
e27731bc
...
...
@@ -352,10 +352,10 @@ const pluginReportRunner: TaskRunner<PluginCIOptions> = async ({ upload }) => {
const
branch
=
build
.
branch
||
'unknown'
;
const
buildNumber
=
getBuildNumber
();
const
root
=
`dev/
${
pluginMeta
.
id
}
`
;
const
dirKey
=
pr
?
`
${
root
}
/pr/
${
pr
}
`
:
`
${
root
}
/branch/
${
branch
}
/
${
buildNumber
}
`
;
const
dirKey
=
pr
?
`
${
root
}
/pr/
${
pr
}
/
${
buildNumber
}
`
:
`
${
root
}
/branch/
${
branch
}
/
${
buildNumber
}
`
;
const
jobKey
=
`
${
dirKey
}
/index.json`
;
if
(
await
s3
.
exits
(
jobKey
))
{
if
(
await
s3
.
exi
s
ts
(
jobKey
))
{
throw
new
Error
(
'Job already registered: '
+
jobKey
);
}
...
...
@@ -378,20 +378,21 @@ const pluginReportRunner: TaskRunner<PluginCIOptions> = async ({ upload }) => {
version
,
};
let
base
=
`
${
root
}
/branch/
${
branch
}
/`
;
latest
.
build
.
number
=
buildNumber
;
if
(
pr
)
{
latest
.
build
.
pr
=
pr
;
}
else
{
latest
.
build
.
number
=
buildNumber
;
const
base
=
`
${
root
}
/branch/
${
branch
}
/`
;
const
historyKey
=
base
+
`history.json`
;
console
.
log
(
'Read'
,
historyKey
);
const
history
:
PluginHistory
=
await
s3
.
readJSON
(
historyKey
,
defaultPluginHistory
);
appendPluginHistory
(
report
,
latest
,
history
);
await
s3
.
writeJSON
(
historyKey
,
history
);
console
.
log
(
'wrote history'
);
base
=
`
${
root
}
/pr/
${
pr
}
/`
;
}
const
historyKey
=
base
+
`history.json`
;
console
.
log
(
'Read'
,
historyKey
);
const
history
:
PluginHistory
=
await
s3
.
readJSON
(
historyKey
,
defaultPluginHistory
);
appendPluginHistory
(
report
,
latest
,
history
);
await
s3
.
writeJSON
(
historyKey
,
history
);
console
.
log
(
'wrote history'
);
// Private things may want to upload
if
(
upload
)
{
s3
.
uploadPackages
(
packageInfo
,
{
...
...
packages/grafana-toolkit/src/plugins/aws.ts
View file @
e27731bc
...
...
@@ -94,7 +94,7 @@ export class S3Client {
});
}
async
exits
(
key
:
string
):
Promise
<
boolean
>
{
async
exi
s
ts
(
key
:
string
):
Promise
<
boolean
>
{
return
new
Promise
((
resolve
,
reject
)
=>
{
this
.
s3
.
getObject
(
{
...
...
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