From 5cac124d864b3b0aede2bc0c3af4f9788456b5dc Mon Sep 17 00:00:00 2001 From: Holger Levsen Date: Thu, 9 Oct 2014 14:35:24 +0200 Subject: reproducible: add views for states --- bin/reproducible_stats.sh | 86 +++++++++++++++++++++++++++++++++++++++-------- 1 file changed, 72 insertions(+), 14 deletions(-) (limited to 'bin/reproducible_stats.sh') diff --git a/bin/reproducible_stats.sh b/bin/reproducible_stats.sh index f96c03c0..6bc68acf 100755 --- a/bin/reproducible_stats.sh +++ b/bin/reproducible_stats.sh @@ -262,31 +262,38 @@ write_pkg_frameset() { EOF } -init_navi_frame() { - echo "" > $NAVI - echo "" >> $NAVI - echo "
$1 $2" >> $NAVI +set_icon() { # icons taken from tango-icon-theme (0.8.90-5) # licenced under http://creativecommons.org/licenses/publicdomain/ - case "$3" in - "reproducible") ICON=weather-clear.png + STATE_TARGET_NAME=$1 + case "$1" in + reproducible) ICON=weather-clear.png ;; - "unreproducible") if [ "$5" != "" ] ; then + unreproducible|FTBR) if [ "$2" != "" ] ; then ICON=weather-showers-scattered.png else ICON=weather-showers.png fi + STATE_TARGET_NAME=FTBR ;; - "FTBFS") ICON=weather-storm.png + FTBFS) ICON=weather-storm.png ;; - "404") ICON=weather-severe-alert.png + 404) ICON=weather-severe-alert.png ;; - "not for us") ICON=weather-few-clouds-night.png + not_for_us) ICON=weather-few-clouds-night.png ;; - "blacklisted") ICON=error.png + blacklisted) ICON=error.png ;; + *) ICON="" esac - echo " $3" >> $NAVI +} + +init_navi_frame() { + echo "" > $NAVI + echo "" >> $NAVI + echo "
$1 $2" >> $NAVI + set_icon $3 $5 + echo " $3" >> $NAVI echo "at $4: " >> $NAVI } @@ -399,6 +406,10 @@ write_summary_footer() { write_summary "

" } +write_summary_beta_sign() { + write_summary "

A β sign after a package which is unreproducible indicates that a .buildinfo file was generated." + write_summary "This means the basics for building packages reproducibly are covered :-)

" +} publish_summary() { cp $SUMMARY /var/lib/jenkins/userContent/ if [ "$VIEW" = "$MAINVIEW" ] ; then @@ -444,8 +455,7 @@ for VIEW in $ALLVIEWS ; do write_summary "

$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly$FINISH " link_packages ${GOOD[$VIEW]} write_summary "

" - write_summary "

A β sign after a package which is unreproducible indicates that a .buildinfo file was generated." - write_summary "This means the basics for building packages reproducibly are covered :-)

" + write_summary_beta_sign write_summary_footer publish_summary done @@ -491,4 +501,52 @@ write_summary "

Notes are stored in $COUNT ($PERCENT%)" + set_icon $STATE # sets ICON and STATE_TARGET_NAME + write_summary "" + write_summary " ${SPOKENTARGET[$STATE]}:" + link_packages ${PACKAGES} + write_summary "

" + write_summary + if [ "${STATE:0:4}" = "FTBR" ] ; then + write_summary_beta_sign + fi + write_summary_footer + publish_summary +done + echo "Enjoy https://jenkins.debian.net/userContent/reproducible.html" -- cgit v1.2.3-54-g00ecf