aboutsummaryrefslogtreecommitdiff
path: root/src/test
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2012-12-23 12:00:04 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2012-12-23 12:00:04 +0100
commitafbfd905b8f5326d149ba7fdfd784af50d85e5ee (patch)
tree7ebdb883ce69d697af278780bdf67362ce164c2d /src/test
parenta057cf0cb5b855d1fedd58d702bd06bb22e938f5 (diff)
downloadesper-testing-afbfd905b8f5326d149ba7fdfd784af50d85e5ee.tar.gz
esper-testing-afbfd905b8f5326d149ba7fdfd784af50d85e5ee.tar.bz2
esper-testing-afbfd905b8f5326d149ba7fdfd784af50d85e5ee.tar.xz
esper-testing-afbfd905b8f5326d149ba7fdfd784af50d85e5ee.zip
o Storing the file file reference on the jenkins build and job.
Diffstat (limited to 'src/test')
-rw-r--r--src/test/java/io/trygvis/esper/testing/jenkins/CreateMissingMavenModuleJobsApp.java10
1 files changed, 8 insertions, 2 deletions
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<JenkinsJobDto> jobs = dao.toJobList(rs);
@@ -49,7 +51,9 @@ public class CreateMissingMavenModuleJobsApp {
URI url = URI.create(u);
- Option<P2<JenkinsJobXml,byte[]>> xmlOption = client.fetchJob(apiXml(url));
+ URI uri = apiXml(url);
+
+ Option<P2<JenkinsJobXml,byte[]>> 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);
}