summaryrefslogtreecommitdiffstats
path: root/bin
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2015-05-28 10:46:09 +0200
committerHolger Levsen <holger@layer-acht.org>2015-05-28 10:46:09 +0200
commitda127fff099eb1f51916c9d6b4a4efee54e34c1f (patch)
treeb77e0b3702d4b8c3f983c1c0c060346d714b09ec /bin
parent6c5aa80aa6dbecd6c69cc69f7d3aa4d1faa3c558 (diff)
downloadjenkins.debian.net-da127fff099eb1f51916c9d6b4a4efee54e34c1f.tar.xz
reproducible: use the same color for the suite of the builds_age graphs as its used by the builds_per_day graph
Diffstat (limited to 'bin')
-rwxr-xr-xbin/make_graph.py10
-rwxr-xr-xbin/reproducible_html_graphs.sh12
2 files changed, 19 insertions, 3 deletions
diff --git a/bin/make_graph.py b/bin/make_graph.py
index 71ebd306..83b833c0 100755
--- a/bin/make_graph.py
+++ b/bin/make_graph.py
@@ -35,7 +35,7 @@ def main():
"#ce5c00", "#f57900", "#fcaf3e", \
"#a40000", "#cc0000", "#ef2929", \
"#2e3436", "#555753", "#888a85" ))')
- else:
+ elif int(colors) < 39:
r('palette(c("#fce94f", "#c4a000", "#eeeeec", "#babdb6", \
"#fcaf3e", "#ce5c00", "#ad7fa8", "#5c3566", \
"#e9b96e", "#8f5902", "#8ae234", "#4e9a06", \
@@ -43,10 +43,16 @@ def main():
"#888a85", "#2e3436", "#75507b", "#cc0000", \
"#ce5c00", "#73d216", "#edd400", "#f57900", \
"#c17d11", "#3465a4", "#666666", "#AAAAAA" ))')
+ elif int(colors) == 40:
+ r('palette(c("#4e9a06"))')
+ elif int(colors) == 41:
+ r('palette(c("#73d216"))')
+ elif int(colors) == 42:
+ r('palette(c("#8ae234"))')
r('v <- t[0:nrow(t),0:'+colors+']')
# make graph since day 1
r('barplot(t(v),col = 1:'+columns+', main="'+mainlabel+'", xlab="", ylab="'+ylabel+'", space=0, border=NA)')
- if int(colors) < 10:
+ if int(colors) < 10 or int(colors) >= 40:
r('legend(x="bottom",legend=colnames(t), ncol=2,fill=1:'+columns+',xjust=0.5,yjust=0,bty="n")')
elif int(colors) == 12:
r('legend(x="bottom",legend=colnames(t), ncol=4,fill=1:'+columns+',xjust=0.5,yjust=0,bty="n")')
diff --git a/bin/reproducible_html_graphs.sh b/bin/reproducible_html_graphs.sh
index 08f2653e..d6c11e72 100755
--- a/bin/reproducible_html_graphs.sh
+++ b/bin/reproducible_html_graphs.sh
@@ -319,13 +319,23 @@ create_png_from_table() {
else
sqlite3 -init ${INIT} -csv ${PACKAGES_DB} "SELECT ${FIELDS[$1]} from ${TABLE[$1]} ${WHERE_EXTRA} ORDER BY datum" >> ${TABLE[$1]}.csv
fi
+ # this is a gross hack: normally we take the number of colors a table should have...
+ # for the builds_age table we only want one color, but different ones, so this hack:
+ COLORS=${COLOR[$1]}
+ if [ $1 -eq 2 ] ; then
+ case "$SUITE" in
+ testing) COLORS=40 ;;
+ unstable) COLORS=41 ;;
+ experimental) COLORS=42 ;;
+ esac
+ fi
# only generate graph if the query returned data
if [ $(cat ${TABLE[$1]}.csv | wc -l) -gt 1 ] ; then
echo "Updating $2..."
DIR=$(dirname $2)
mkdir -p $DIR
echo "Generating $2."
- /srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLOR[$1]} "${MAINLABEL[$1]}" "${YLABEL[$1]}"
+ /srv/jenkins/bin/make_graph.py ${TABLE[$1]}.csv $2 ${COLORS} "${MAINLABEL[$1]}" "${YLABEL[$1]}"
mv $2 $BASE/$DIR
[ "$DIR" = "." ] || rmdir $(dirname $2)
# create empty dummy png if there havent been any results ever