[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: UDD querying jobs on jenkins.d.n (was Re: inconsistent versions of M-A: same packages

Hi Holger,

On Sat, Nov 08, 2014 at 15:12:42 +0000, Holger Levsen wrote:
> Hi,
> On Samstag, 8. November 2014, Holger Levsen wrote:
> > It would be trivial to turn this into a jenkins jobs, shall I?
> > 
> > It seems to me, there could be several other UDD querying jobs as well, so
> > my first suggestion for a name (+namespace) would be
> > "udd_multiarch_inconsistencies"... suggestions for other useful UDD queries
> > welcome! (Useful as in: having them run by jenkins every day/week and the
> > results displayed in some job...)
> I've done this now, currently there are three jobs:
> https://jenkins.debian.net/view/qa.debian.org/job/udd_sid_multiarch_versionskew
> https://jenkins.debian.net/view/qa.debian.org/job/udd_jessie_multiarch_versionskew
> https://jenkins.debian.net/view/qa.debian.org/job/udd_wheezy_multiarch_versionskew
> If you have any ideas for further UDD querying jobs I'd be glad to hear them!

Have you considered running a groovy script instead of an external shell script?
This may make things easier/avoid the external script dependency. Here's what
I'm doing:

manager.hudson.class.classLoader.addURL(new URL("file:///usr/share/java/postgresql-jdbc4.jar"))

import groovy.sql.Sql;

def sql = Sql.newInstance("jdbc:postgresql://public-udd-mirror.xvm.mit.edu:5432/udd", "public-udd-mirror", "public-udd-mirror", "org.postgresql.Driver")

def check_res = \
sql.firstRow("SELECT count(*) \
              FROM bugs INNER JOIN bugs_usertags USING (id) \
              WHERE bugs_usertags.email = 'mt@debian.org' AND bugs_usertags.tag = 'goto-cc'")
assert check_res.count != null && check_res.count > 0, 'Could not select any bug reports'

(and then some more SQL queries)


Attachment: pgp4SC8mjSUzh.pgp
Description: PGP signature

Reply to: