diff options
author | Holger Levsen <holger@layer-acht.org> | 2015-12-11 13:53:55 +0100 |
---|---|---|
committer | Holger Levsen <holger@layer-acht.org> | 2015-12-11 13:53:55 +0100 |
commit | 8a0a4485edff9d21fffb02f763c65afd14c97769 (patch) | |
tree | c390bedece32d75391b166ca90ab1f95bf9c7bb7 /bin/reproducible_html_archlinux.sh | |
parent | 87556326b8e7b34356762a06f879d91dd451a0c5 (diff) | |
download | jenkins.debian.net-8a0a4485edff9d21fffb02f763c65afd14c97769.tar.xz |
reproducible archlinux: refactor to support multiple repositories
Diffstat (limited to 'bin/reproducible_html_archlinux.sh')
-rwxr-xr-x | bin/reproducible_html_archlinux.sh | 73 |
1 files changed, 38 insertions, 35 deletions
diff --git a/bin/reproducible_html_archlinux.sh b/bin/reproducible_html_archlinux.sh index aa948f58..0e92e0e9 100755 --- a/bin/reproducible_html_archlinux.sh +++ b/bin/reproducible_html_archlinux.sh @@ -37,45 +37,48 @@ cat > $PAGE <<- EOF EOF write_page_intro 'Arch Linux' write_explaination_table 'Arch Linux' -write_page " <table><tr><th>source package</th><th>test result</th><th>test date</th><th>1st build log</th><th>2nd build log</th></tr>" -for PKG in $(find $ARCHBASE/* -maxdepth 1 -type d -exec basename {} \;) ; do - write_page " <tr>" - write_page " <td>$PKG</td>" - write_page " <td>" - if [ -z "$(cd $ARCHBASE/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then - if [ ! -z "$(grep '==> ERROR: Could not resolve all dependencies' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> could not resolve dependencies" - elif [ ! -z "$(egrep '==> ERROR: .pacman. failed to install missing dependencies.' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> failed to install dependencies" - elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source" - elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source, while running tests" - elif [ ! -z "$(egrep '==> ERROR: Failure while downloading' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-severe-alert.png\" alt=\"404 icon\" /> failed to download source" - elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to verify source" - elif [ ! -z "$(egrep 'makepkg was killed by timeout after 4h' $ARCHBASE/$PKG/build1.log)" ] ; then - write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout after 4h" +write_page " <table><tr><th>repository</th><th>source package</th><th>test result</th><th>test date</th><th>1st build log</th><th>2nd build log</th></tr>" +for REPOSITORY in "core" ; do + for PKG in $(find $ARCHBASE/$REPOSITORY/* -maxdepth 1 -type d -exec basename {} \;) ; do + write_page " <tr>" + write_page " <td>$REPOSITORY</td>" + write_page " <td>$PKG</td>" + write_page " <td>" + if [ -z "$(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html 2>/dev/null)" ] ; then + if [ ! -z "$(grep '==> ERROR: Could not resolve all dependencies' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> could not resolve dependencies" + elif [ ! -z "$(egrep '==> ERROR: .pacman. failed to install missing dependencies.' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-snow.png\" alt=\"depwait icon\" /> failed to install dependencies" + elif [ ! -z "$(egrep '==> ERROR: A failure occurred in (build|package)' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source" + elif [ ! -z "$(egrep '==> ERROR: A failure occurred in check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build from source, while running tests" + elif [ ! -z "$(egrep '==> ERROR: Failure while downloading' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-severe-alert.png\" alt=\"404 icon\" /> failed to download source" + elif [ ! -z "$(egrep '==> ERROR: One or more files did not pass the validity check' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to verify source" + elif [ ! -z "$(egrep 'makepkg was killed by timeout after 4h' $ARCHBASE/$REPOSITORY/$PKG/build1.log)" ] ; then + write_page " <img src=\"/userContent/static/weather-storm.png\" alt=\"ftbfs icon\" /> failed to build, killed by timeout after 4h" + else + write_page " probably failed to build from source, please investigate" + # or is it reproducible??? + fi else - write_page " probably failed to build from source, please investigate" - # or is it reproducible??? + for ARTIFACT in $(cd $ARCHBASE/$REPOSITORY/$PKG/ ; ls *.pkg.tar.xz.html) ; do + write_page " <img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> <a href=\"/archlinux/$REPOSITORY/$PKG/$ARTIFACT\">${ARTIFACT:0:-5}</a> is unreproducible<br />" + done fi - else - for ARTIFACT in $(cd $ARCHBASE/$PKG/ ; ls *.pkg.tar.xz.html) ; do - write_page " <img src=\"/userContent/static/weather-showers-scattered.png\" alt=\"unreproducible icon\" /> <a href=\"/archlinux/$PKG/$ARTIFACT\">${ARTIFACT:0:-5}</a> is unreproducible<br />" + write_page " </td>" + write_page " <td>$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$REPOSITORY/$PKG/build1.log | cut -d ' ' -f6 )</td>" + for LOG in build1.log build2.log ; do + if [ -f $ARCHBASE/$REPOSITORY/$PKG/$LOG ] ; then + write_page " <td><a href=\"/archlinux/$REPOSITORY/$PKG/$LOG\">$LOG</a></td>" + else + write_page " <td> </td>" + fi done - fi - write_page " </td>" - write_page " <td>$(LANG=C TZ=UTC ls --full-time $ARCHBASE/$PKG/build1.log | cut -d ' ' -f6 )</td>" - for LOG in build1.log build2.log ; do - if [ -f $ARCHBASE/$PKG/$LOG ] ; then - write_page " <td><a href=\"/archlinux/$PKG/$LOG\">$LOG</a></td>" - else - write_page " <td> </td>" - fi + write_page " </tr>" done - write_page " </tr>" done write_page " </table>" write_page "</div></div>" |