summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHolger Levsen <holger@layer-acht.org>2014-11-08 14:52:00 +0000
committerHolger Levsen <holger@layer-acht.org>2014-11-08 14:52:00 +0000
commit346ff8b5368c7f41fdf3ccb750c83723d1efdc17 (patch)
treea93a83deef1e4c279bfed1059ec4cea0ce563e7f
parent755eccf255749eaba7e1120ffcaf040a0f67433c (diff)
downloadjenkins.debian.net-346ff8b5368c7f41fdf3ccb750c83723d1efdc17.tar.xz
add three new qa.d.o jobs, to detect multi-arch versions skews in wheezy, jessie + sid
-rwxr-xr-xbin/udd-query.sh64
-rw-r--r--job-cfg/udd.yaml58
-rwxr-xr-xupdate_jdn.sh2
3 files changed, 123 insertions, 1 deletions
diff --git a/bin/udd-query.sh b/bin/udd-query.sh
new file mode 100755
index 00000000..2d8247e2
--- /dev/null
+++ b/bin/udd-query.sh
@@ -0,0 +1,64 @@
+#!/bin/bash
+
+# Copyright 2012-2014 Holger Levsen <holger@layer-acht.org>
+# UDD query by Stuart Prescott <stuart@debian.org>
+# released under the GPLv=2
+
+DEBUG=false
+. /srv/jenkins/bin/common-functions.sh
+common_init "$@"
+
+#
+# have all needed params been supplied?
+#
+if [ -z "$2" ] ; then
+ echo "Need at two params, distro + query_name..."
+ exit 1
+fi
+
+DISTRO=$1
+declare -A SQL_QUERY
+QUERY=$2
+
+#
+# more to come, hopefully
+#
+if [ "$QUERY" != "multiarch_versionskew" ] ; then
+ echo "unknown query requested, exiting... please provide patches :)"
+ exit 1
+fi
+
+#
+# SQL query for detecting multi-arch version skew
+#
+SQL_QUERY["multiarch_versionskew"]="
+ SELECT DISTINCT source FROM
+ (SELECT DISTINCT source, package, version
+ FROM packages
+ WHERE
+ release='$DISTRO' AND
+ multi_arch='same' AND
+ architecture IN ('amd64', 'arm64', 'armel', 'armhf', 'i386',
+ 'kfreebsd-amd64', 'kfreebsd-i386', 'mips', 'mipsel',
+ 'powerpc', 'ppc64el', 's390x')
+ ORDER BY source) AS all_versions
+ GROUP BY source, package
+ HAVING count(*) > 1
+ ORDER BY source
+ ;
+"
+
+
+#
+# Actually query UDD
+#
+echo "$(date) - querying UDD using ${SQL_QUERY[$QUERY]}"
+echo
+PGPASSWORD=public-udd-mirror \
+ psql -U public-udd-mirror \
+ -h public-udd-mirror.xvm.mit.edu -p 5432 \
+ -t \
+ udd -c"${SQL_QUERY[$QUERY]}"
+
+# TODO: turn source package names into links
+# TODO: show versions (per arch) too
diff --git a/job-cfg/udd.yaml b/job-cfg/udd.yaml
new file mode 100644
index 00000000..dfda3322
--- /dev/null
+++ b/job-cfg/udd.yaml
@@ -0,0 +1,58 @@
+- defaults:
+ name: udd
+ project-type: freestyle
+ properties:
+ - sidebar:
+ url: https://jenkins.debian.net/userContent/about.html
+ text: About jenkins.debian.net
+ icon: /userContent/images/debian-swirl-24x24.png
+ - sidebar:
+ url: https://jenkins.debian.net/view/qa.debian.org/
+ text: Jobs for Debian QA related packages
+ icon: /userContent/images/debian-jenkins-24x24.png
+ - sidebar:
+ url: http://www.profitbricks.com
+ text: Sponsored by Profitbricks
+ icon: /userContent/images/profitbricks-24x24.png
+ description: '{my_description}<br><br>Job configuration source is <a href="http://anonscm.debian.org/cgit/qa/jenkins.debian.net.git/job-cfg/udd.yaml">udd.yaml</a>.'
+ logrotate:
+ daysToKeep: 90
+ numToKeep: 20
+ artifactDaysToKeep: -1
+ artifactNumToKeep: -1
+ publishers:
+ - email:
+ recipients: 'jenkins+debian-qa holger@layer-acht.org'
+ builders:
+ - shell: '/srv/jenkins/bin/udd-query.sh {my_params}'
+ triggers:
+ - timed: '{my_time}'
+
+- job-template:
+ defaults: udd
+ name: '{name}_wheezy_multiarch_versionskew'
+
+- job-template:
+ defaults: udd
+ name: '{name}_jessie_multiarch_versionskew'
+
+- job-template:
+ defaults: udd
+ name: '{name}_sid_multiarch_versionskew'
+
+- project:
+ name: udd
+ jobs:
+ - '{name}_wheezy_multiarch_versionskew':
+ my_time: '2 8 1 * *'
+ my_params: 'wheezy multiarch_versionskew'
+ my_description: 'Detect multi-arch versions skews in wheezy.'
+ - '{name}_jessie_multiarch_versionskew':
+ my_time: '1 8 * * *'
+ my_params: 'jessie multiarch_versionskew'
+ my_description: 'Detect multi-arch versions skews in jessie.'
+ - '{name}_sid_multiarch_versionskew':
+ my_time: '0 8 * * *'
+ my_params: 'sid multiarch_versionskew'
+ my_description: 'Detect multi-arch versions skews in sid.'
+
diff --git a/update_jdn.sh b/update_jdn.sh
index 25206962..fa68ffaf 100755
--- a/update_jdn.sh
+++ b/update_jdn.sh
@@ -60,7 +60,7 @@ fi
sudo apt-get install vim screen less etckeeper moreutils curl mtr-tiny dstat devscripts bash-completion shorewall shorewall6 cron-apt apt-listchanges munin munin-plugins-extra calamaris visitors procmail libjson-rpc-perl libfile-touch-perl zutils ip2host pigz \
build-essential python-setuptools \
debootstrap sudo figlet graphviz apache2 python-yaml python-pip mr subversion subversion-tools vnstat poxml vncsnapshot imagemagick libav-tools python-twisted python-imaging gocr guestmount schroot sqlite3\
- unzip python-hachoir-metadata ghc python-rpy2 libsoap-lite-perl haveged
+ unzip python-hachoir-metadata ghc python-rpy2 libsoap-lite-perl haveged postgresql-client-9.1
# debootstrap is affected by #766459 in wheezy
sudo apt-get install -t wheezy-backports qemu debootstrap
explain "Packages installed."