-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmodels.js
More file actions
67 lines (60 loc) · 1.51 KB
/
Copy pathmodels.js
File metadata and controls
67 lines (60 loc) · 1.51 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
var mongoose = require('mongoose');
var Schema = mongoose.Schema;
var JobDesc = new Schema({
title : String,
repoUrl : String,
cloneUrl : String,
ref : String,
watchPullRequests : Boolean,
pull_requests : [Number],
tags : [String],
tasks: [{ title : String, command : String }],
charts: [{
title : String,
type : { type : String },
units : String,
config : {}
}],
before: [String],
after: String,
saveBranch : { type : String, default : "gh-pages" },
saveLoc : { type : String, default : "benchmarks" },
projectName : String,
preservedFiles : {
refs : [String],
files : [{ branch : String, name : String }]
},
alerts : [{ taskTitle : String,
field : String,
type : { type : String, enum : ["std-dev"] }}]
});
var Run = new Schema({
ts : Date,
job : { type : Schema.Types.ObjectId, ref : 'JobDesc' },
status : String,
lastCommit : String,
finished : Date,
error : {},
output : {},
tagName : String,
sysinfo : {
platform : String,
arch : String,
release : String,
mem : Number,
cpuCount : Number,
cpuVersion : String
}
});
var TaskRun = new Schema({
title : String,
ts : Date,
run : { type : Schema.Types.ObjectId, ref : 'Run' },
job : { type : Schema.Types.ObjectId, ref : 'Job' },
status : String,
data : {},
rawOut : String
});
exports.JobDesc = JobDesc;
exports.Run = Run;
exports.TaskRun = TaskRun;