Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
geomultisens
gms-aux
Commits
a17ffcb4
Commit
a17ffcb4
authored
Aug 25, 2017
by
Daniel Eggert
Browse files
added xpath|grep|awk coverage parsing command
parent
d8ceaa77
Changes
1
Hide whitespace changes
Inline
Side-by-side
.gitlab-ci.yml
View file @
a17ffcb4
...
...
@@ -41,7 +41,11 @@ pages:
stage
:
deploy
script
:
-
mvn clean cobertura:cobertura
-
grep 'coverage line-rate' usgs-api/target/site/cobertura/coverage.xml
# now extract the actual value from the coverage report and print it to the console
# [1] (xpath) extract the line-rate attribute out of the xml file, uses xpath, so 'libxml-xpath-perl' has to be installed on the runner
# [2] (grep) get rid of the attribute text so only the actual number remains
# [3] (awk) multiply the value (0..1) to get the need percent value
-
xpath -q -e '/coverage/@line-rate' workspace/gms-aux/usgs-api/target/site/cobertura/coverage.xml | grep -o '[[:digit:]]\.[[:digit:]]\{1,\}' | awk '{print "Coverage
:
"
$0*100}'
-
mv
usgs-api/target/site/cobertura/
public/
artifacts:
paths:
...
...
Write
Preview
Supports
Markdown
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