From 953ddf830be3ec5188762c2471d007478e6573a1 Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Sat, 8 Dec 2012 13:39:28 +0100 Subject: o Discovering and storing jobs in addition to the build. --- src/main/resources/ddl-jenkins.sql | 19 +++++++++++++++++-- src/main/resources/logback-test.xml | 8 +++++--- 2 files changed, 22 insertions(+), 5 deletions(-) (limited to 'src/main/resources') diff --git a/src/main/resources/ddl-jenkins.sql b/src/main/resources/ddl-jenkins.sql index df98185..70db7f9 100755 --- a/src/main/resources/ddl-jenkins.sql +++ b/src/main/resources/ddl-jenkins.sql @@ -1,6 +1,7 @@ BEGIN; DROP TABLE IF EXISTS jenkins_build; +DROP TABLE IF EXISTS jenkins_job; DROP TABLE IF EXISTS jenkins_server; CREATE TABLE jenkins_server ( @@ -12,12 +13,26 @@ CREATE TABLE jenkins_server ( CONSTRAINT uq_jenkins_server__url UNIQUE (url) ); -CREATE TABLE jenkins_build ( +CREATE TABLE jenkins_job ( uuid CHAR(36) NOT NULL, created_date TIMESTAMP NOT NULL, server CHAR(36) NOT NULL, + url VARCHAR(1000) NOT NULL, + display_name VARCHAR(100), + + CONSTRAINT pk_jenkins_job PRIMARY KEY (UUID), + CONSTRAINT fk_jenkins_job__server FOREIGN KEY (server) REFERENCES jenkins_server (uuid), + CONSTRAINT uq_jenkins_job__url UNIQUE (url) +); + +CREATE TABLE jenkins_build ( + uuid CHAR(36) NOT NULL, + created_date TIMESTAMP NOT NULL, + + job CHAR(36) NOT NULL, + entry_id VARCHAR(1000) NOT NULL, url VARCHAR(1000) NOT NULL, result VARCHAR(100) NOT NULL, @@ -26,7 +41,7 @@ CREATE TABLE jenkins_build ( timestamp TIMESTAMP NOT NULL, CONSTRAINT pk_jenkins_build PRIMARY KEY (UUID), - CONSTRAINT fk_jenkins_build__server FOREIGN KEY (server) REFERENCES jenkins_server (uuid), + CONSTRAINT fk_jenkins_build__job FOREIGN KEY (job) REFERENCES jenkins_job (uuid), CONSTRAINT uq_jenkins_build__id UNIQUE (entry_id) ); diff --git a/src/main/resources/logback-test.xml b/src/main/resources/logback-test.xml index 49aa8bc..a865432 100755 --- a/src/main/resources/logback-test.xml +++ b/src/main/resources/logback-test.xml @@ -2,17 +2,19 @@ - %d{HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n + %d{HH:mm:ss.SSS} [%thread] %-5level %-30logger{1} - %msg%n - + - + + + -- cgit v1.2.3