diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-09 14:35:24 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-09 19:02:50 +0200 |
commit | 5cac124d864b3b0aede2bc0c3af4f9788456b5dc (patch) | |
tree | 40d6351f78120e7991d8fe376e63a8fb26f8c1be | |
parent | 6c4c250c9ad5eeda71436fddb5c4b63fed1fede4 (diff) | |
download | jenkins.debian.net-5cac124d864b3b0aede2bc0c3af4f9788456b5dc.tar.xz |
reproducible: add views for states
-rw-r--r-- | TODO | 1 | ||||
-rwxr-xr-x | bin/reproducible_stats.sh | 86 |
2 files changed, 72 insertions, 15 deletions
@@ -110,7 +110,6 @@ See link:https://jenkins.debian.net/userContent/about.html["about jenkins.debian *** killer job is run before setup *** scheduler and builder jobs are started after -* generate views for (all?/last 24h?) FTBR packages with|without .buildinfo files? * watch: zephyr (debbindiff timeout?) * watch: haskell-hsql-odbc (debbindiff error only in jenkins log, not in rbuild log * watch: cxxtest: dbd failure should be in rbuild output! 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 "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" > $NAVI - echo "<link href=\"../static/style.css\" type=\"text/css\" rel=\"stylesheet\" /></head>" >> $NAVI - echo "<body><table><tr><td><font size=+1>$1</font> $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 "<img src=\"../static/$ICON\" /> $3" >> $NAVI +} + +init_navi_frame() { + echo "<!DOCTYPE html><html><head><meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\" />" > $NAVI + echo "<link href=\"../static/style.css\" type=\"text/css\" rel=\"stylesheet\" /></head>" >> $NAVI + echo "<body><table><tr><td><font size=+1>$1</font> $2" >> $NAVI + set_icon $3 $5 + echo "<a href=\"$JENKINS_URL/userContent/index_${STATE_TARGET_NAME}.html\" target=\"_parent\"><img src=\"../static/$ICON\" /> $3</a>" >> $NAVI echo "<font size=-1>at $4:</font> " >> $NAVI } @@ -399,6 +406,10 @@ write_summary_footer() { write_summary "</p></body></html>" } +write_summary_beta_sign() { + write_summary "<p><font size=\"-1\">A β sign after a package which is unreproducible indicates that a .buildinfo file was generated." + write_summary "This means the <a href=\"https://wiki.debian.org/ReproducibleBuilds#The_basics_for_making_packages_build_reproducible\">basics for building packages reproducibly are covered</a> :-)</font></p>" +} publish_summary() { cp $SUMMARY /var/lib/jenkins/userContent/ if [ "$VIEW" = "$MAINVIEW" ] ; then @@ -444,8 +455,7 @@ for VIEW in $ALLVIEWS ; do write_summary "<p>$COUNT_GOOD packages ($PERCENT_GOOD%) successfully built reproducibly$FINISH <code>" link_packages ${GOOD[$VIEW]} write_summary "</code></p>" - write_summary "<p><font size=\"-1\">A β sign after a package which is unreproducible indicates that a .buildinfo file was generated." - write_summary "This means the <a href=\"https://wiki.debian.org/ReproducibleBuilds#The_basics_for_making_packages_build_reproducible\">basics for building packages reproducibly are covered</a> :-)</font></p>" + write_summary_beta_sign write_summary_footer publish_summary done @@ -491,4 +501,52 @@ write_summary "<p><font size=\"-1\">Notes are stored in <a href=\"https://anonsc write_summary_footer publish_summary +SPOKENTARGET["reproducible"]="packages which built reproducibly" +SPOKENTARGET["FTBR"]="packages which failed to build reproducibly" +#SPOKENTARGET["FTBR_with_buildinfo"]="packages which failed to build reproducibly and have a .buildinfo file" +SPOKENTARGET["FTBFS"]="packages which fail to build from source" +SPOKENTARGET["404"]="packages where the sources failed to downloaded" +SPOKENTARGET["not_for_us"]="packages which should not be build on 'amd64'" +SPOKENTARGET["blacklisted"]="packages which have been blacklisted" + +count_packages() { + COUNT=${#@} + PERCENT=$(echo "scale=1 ; ($COUNT*100/$COUNT_TOTAL)" | bc) +} + +#ALLSTATES="reproducible FTBR FTBR_with_buildinfo FTBFS 404 not_for_us blacklisted" +ALLSTATES="reproducible FTBR FTBFS 404 not_for_us blacklisted" +for STATE in $ALLSTATES ; do + SUMMARY=index_${STATE}.html + echo "Starting to write $SUMMARY page." + write_summary_header $STATE "Statistics for reproducible builds of ${SPOKENTARGET[$STATE]}" + case "$STATE" in + reproducible) PACKAGES=${GOOD["all"]} + ;; + FTBR) PACKAGES=${BAD["all"]} + ;; + FTBFS) PACKAGES=${UGLY["all"]} + ;; + 404) PACKAGES=${SOURCELESS["all"]} + ;; + not_for_us) PACKAGES=${NOTFORUS["all"]} + ;; + blacklisted) PACKAGES=${BLACKLISTED} + ;; + esac + count_packages ${PACKAGES} + write_summary "<p> $COUNT ($PERCENT%)" + set_icon $STATE # sets ICON and STATE_TARGET_NAME + write_summary "<a href=\"$JENKINS_URL/userContent/index_${STATE_TARGET_NAME}.html\" target=\"_parent\"><img src=\"static/$ICON\" /></a>" + write_summary " ${SPOKENTARGET[$STATE]}:<code>" + link_packages ${PACKAGES} + write_summary "</code></p>" + 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" |