diff options
author | Holger Levsen <holger@layer-acht.org> | 2014-10-17 16:02:50 +0200 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2014-10-17 16:08:44 +0200 |
commit | 1aa7e0422d9f0a4561aa952ce6a89a1ba9bedd31 (patch) | |
tree | 4d1349b8270187c0ff4c5c192b034b3eb24da0e0 /bin/reproducible_html_dd_list.sh | |
parent | 3eedec3a7cdbe2e364cd2783f4f8ef7873041cd4 (diff) | |
download | jenkins.debian.net-1aa7e0422d9f0a4561aa952ce6a89a1ba9bedd31.tar.xz |
reproducible: refactor, move common functions out, new script+job to just create the dd-list page daily
Diffstat (limited to 'bin/reproducible_html_dd_list.sh')
-rwxr-xr-x | bin/reproducible_html_dd_list.sh | 41 |
1 files changed, 41 insertions, 0 deletions
diff --git a/bin/reproducible_html_dd_list.sh b/bin/reproducible_html_dd_list.sh new file mode 100755 index 00000000..07c6ba5a --- /dev/null +++ b/bin/reproducible_html_dd_list.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# Copyright 2014 Holger Levsen <holger@layer-acht.org> +# released under the GPLv=2 + +. /srv/jenkins/bin/common-functions.sh +common_init "$@" + +# common code defining db access +. /srv/jenkins/bin/reproducible_common.sh + +set +x +init_html + +VIEW=dd-list +PAGE=index_${VIEW}.html +echo "$(date) - starting to write $PAGE page." +write_page_header $VIEW "Overview of ${SPOKENTARGET[$VIEW]}" +TMPFILE=$(mktemp) +BAD=$(sqlite3 -init $INIT $PACKAGES_DB "SELECT name FROM source_packages WHERE status = \"unreproducible\" ORDER BY build_date DESC" | xargs echo) +echo "${BAD}" | dd-list -i > $TMPFILE || true +write_page "<p>The following maintainers and uploaders are listed for packages which have built unreproducibly:</p><p><pre>" +while IFS= read -r LINE ; do + if [ "${LINE:0:3}" = " " ] ; then + PACKAGE=$(echo "${LINE:3}" | cut -d " " -f1) + UPLOADERS=$(echo "${LINE:3}" | cut -d " " -f2-) + if [ "$UPLOADERS" = "$PACKAGE" ] ; then + UPLOADERS="" + fi + write_page " <a href=\"$JENKINS_URL/userContent/rb-pkg/$PACKAGE.html\">$PACKAGE</a> $UPLOADERS" + else + LINE="$(echo $LINE | sed 's#&#\&#g ; s#<#\<#g ; s#>#\>#g')" + write_page "$LINE" + fi +done < $TMPFILE +write_page "</pre></p>" +rm $TMPFILE +write_page_footer +publish_page + +echo "Enjoy $JENKINS_URL/userContent/$PAGE" |