[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 Michael,

On Samstag, 8. November 2014, Michael Tautschnig wrote:
> Have you considered running a groovy script instead of an external shell
> script? This may make things easier

not really, as I'm not at all groovy with groovy, IOW, I hardly know what it 
is :)

> /avoid the external script dependency.

which 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)

I don't how this is any better than shell, really. (But I'd be glad to 
learn...)


cheers,
	Holger

Attachment: signature.asc
Description: This is a digitally signed message part.


Reply to: