From afbfd905b8f5326d149ba7fdfd784af50d85e5ee Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sun, 23 Dec 2012 12:00:04 +0100 Subject: o Storing the file file reference on the jenkins build and job. --- .../esper/testing/jenkins/CreateMissingMavenModuleJobsApp.java | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) (limited to 'src/test') diff --git a/src/test/java/io/trygvis/esper/testing/jenkins/CreateMissingMavenModuleJobsApp.java b/src/test/java/io/trygvis/esper/testing/jenkins/CreateMissingMavenModuleJobsApp.java index f03086b..a8f8ce7 100644 --- a/src/test/java/io/trygvis/esper/testing/jenkins/CreateMissingMavenModuleJobsApp.java +++ b/src/test/java/io/trygvis/esper/testing/jenkins/CreateMissingMavenModuleJobsApp.java @@ -8,6 +8,7 @@ import java.util.List; import java.util.UUID; import fj.*; +import io.trygvis.esper.testing.core.db.*; import org.apache.abdera.Abdera; import org.codehaus.httpcache4j.cache.HTTPCache; @@ -35,6 +36,7 @@ public class CreateMissingMavenModuleJobsApp { ResultSet rs = s.executeQuery(); JenkinsDao dao = new JenkinsDao(c); + FileDao fileDao = new FileDao(c); List jobs = dao.toJobList(rs); @@ -49,7 +51,9 @@ public class CreateMissingMavenModuleJobsApp { URI url = URI.create(u); - Option> xmlOption = client.fetchJob(apiXml(url)); + URI uri = apiXml(url); + + Option> xmlOption = client.fetchJob(uri); if(xmlOption.isNone()) { System.out.println("None"); @@ -63,7 +67,9 @@ public class CreateMissingMavenModuleJobsApp { continue; } - UUID uuid = dao.insertJob(jobDto.server, url, jobXml.type, jobXml.displayName); + UUID file = fileDao.store(uri, "application/xml", xmlOption.some()._2()); + + UUID uuid = dao.insertJob(jobDto.server, file, url, jobXml.type, jobXml.displayName); System.out.println("New job: " + uuid); } -- cgit v1.2.3