Skip to content

Instantly share code, notes, and snippets.

@markuman
Created May 26, 2015 18:44
Show Gist options
  • Save markuman/d5bafbae49045549a44a to your computer and use it in GitHub Desktop.
Save markuman/d5bafbae49045549a44a to your computer and use it in GitHub Desktop.
jenkins failed/pass ratio SVG
#!/bin/bash
JSON=$(curl --silent http://127.0.0.1:8080/job/mutest/lastBuild/testReport/api/json?pretty=true)
# get fail counts
FC=$(echo $JSON| sed s#,#\\n#g|grep failCount|awk -F : '{print$2}')
# get pass counts
PC=$(echo $JSON| sed s#,#\\n#g|grep passCount|awk -F : '{print$2}')
NC=$(echo $FC "/" $PC|sed 's/ //g')
sed s,unknown,"$NC",g counts.svg > test.svg
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment