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
90cacf71
Unverified
Commit
90cacf71
authored
Mar 12, 2019
by
Torkel Ödegaard
Committed by
GitHub
Mar 12, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #15944 from grafana/ci-metrics
Collecting metrics in ci process
parents
51c06a8c
9f4bca50
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
29 additions
and
0 deletions
+29
-0
scripts/circle-metrics.sh
+23
-0
scripts/circle-test-frontend.sh
+6
-0
No files found.
scripts/circle-metrics.sh
0 → 100755
View file @
90cacf71
#!/bin/bash
echo
"Collecting code stats (typescript errors & more)"
ERROR_COUNT
=
"
$(
./node_modules/.bin/tsc
--project
tsconfig.json
--noEmit
--noImplicitAny
true
|
grep
-oP
'Found \K(\d+)'
)
"
DIRECTIVES
=
"
$(
grep
-r
-o
directive public/app/
**
/
*
| wc
-l
)
"
CONTROLLERS
=
"
$(
grep
-r
-oP
'class .*Ctrl'
public/app/
**
/
*
| wc
-l
)
"
echo
"Typescript errors:
$ERROR_COUNT
"
echo
"Directives:
$DIRECTIVES
"
echo
"Controllers:
$CONTROLLERS
"
curl
\
-d
"{
\"
metrics
\"
: {
\"
ci.code.noImplicitAny
\"
:
$ERROR_COUNT
,
\"
ci.code.directives
\"
:
$DIRECTIVES
,
\"
ci.code.controllers
\"
:
$CONTROLLERS
}
}"
\
-H
"Content-Type: application/json"
\
-u
ci:
$CIRCLE_STATS_PWD
\
-X
POST https://stats.grafana.org/metric-receiver
scripts/circle-test-frontend.sh
View file @
90cacf71
...
@@ -12,3 +12,9 @@ function exit_if_fail {
...
@@ -12,3 +12,9 @@ function exit_if_fail {
exit_if_fail npm run prettier:check
exit_if_fail npm run prettier:check
exit_if_fail npm run
test
exit_if_fail npm run
test
# On master also collect some and send some metrics
branch
=
"
$(
git rev-parse
--abbrev-ref
HEAD
)
"
if
[
"
${
branch
}
"
==
"master"
]
;
then
exit_if_fail ./scripts/circle-metrics.sh
fi
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