[Qa-jenkins-scm] [jenkins.debian.net] 03/12: reproducible: check if standard repo and branch exist and annotate if not

Holger Levsen holger at moszumanska.debian.org
Thu Mar 12 18:20:38 UTC 2015


This is an automated email from the git hooks/post-receive script.

holger pushed a commit to branch master
in repository jenkins.debian.net.

commit c3c1507b2379fe22e4cdd46d5c88885e467db322
Author: Holger Levsen <holger at layer-acht.org>
Date:   Thu Mar 12 16:28:53 2015 +0100

    reproducible: check if standard repo and branch exist and annotate if not
---
 bin/reproducible_html_repo_stats.sh | 25 ++++++++++++++++++-------
 1 file changed, 18 insertions(+), 7 deletions(-)

diff --git a/bin/reproducible_html_repo_stats.sh b/bin/reproducible_html_repo_stats.sh
index e1a88bc..ca1a521 100755
--- a/bin/reproducible_html_repo_stats.sh
+++ b/bin/reproducible_html_repo_stats.sh
@@ -16,6 +16,7 @@ ARCH="amd64"	# same
 VIEW=repo_stats
 PAGE=index_${VIEW}.html
 TMPFILE=$(mktemp)
+TMP2FILE=$(mktemp)
 
 echo "$(date) - starting to write $PAGE page."
 write_page_header $VIEW "Overview about the reproducible builds apt repository (and comparison to Debian suites)"
@@ -104,16 +105,26 @@ for PKG in $SOURCES ; do
 	#
 	# write output
 	#
-	write_page "<tr><td><a href=\"http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=pu/reproducible_builds\" target=\"_blank\">$PKG</a></td>"
-	write_page "<td>$CRUFT</td>"
-	write_page "<td>$BET</td>"
-	write_page "<td>$CTEST</td>"
-	write_page "<td>$CSID</td>"
-	write_page "<td>$CEXP</td>"
+	write_page "<tr><td>"
+	URL="http://anonscm.debian.org/cgit/reproducible/$PKG.git/?h=pu/reproducible_builds"
+	curl $URL > $TMP2FILE
+	if [ "$(grep "'error'>No repositories found" $TMP2FILE 2>/dev/null)" ] ; then
+		write_page "$PKG<br /><span class=\"red\">(no git repository)</span>"
+	elif [ "$(grep "'error'>Invalid branch" $TMP2FILE 2>/dev/null)" ] ; then
+		write_page "<a href=\"$URL\" target=\"_blank\">$PKG</a><br /><span class=\"purple\">(non-standard branch)</span>"
+	else
+		write_page "<a href=\"$URL\" target=\"_blank\">$PKG</a>"
+	fi
+	write_page " </td>"
+	write_page " <td>$CRUFT</td>"
+	write_page " <td>$BET</td>"
+	write_page " <td>$CTEST</td>"
+	write_page " <td>$CSID</td>"
+	write_page " <td>$CEXP</td>"
 	write_page "</tr>"
 done
 write_page "</table></p>"
-rm $TMPFILE
+rm $TMPFILE $TMP2FILE
 write_page_footer
 publish_page
 

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/qa/jenkins.debian.net.git



More information about the Qa-jenkins-scm mailing list