-
Notifications
You must be signed in to change notification settings - Fork 9
/
schema.json
197 lines (196 loc) · 5.79 KB
/
schema.json
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
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
{
"$schema": "http://json-schema.org/draft-07/schema",
"$id": "https://github.com/cburgmer/build-facts/schema.json",
"type": "object",
"title": "Build Data",
"description": "Build data as generated by the sync actions",
"required": ["jobName", "buildId", "start"],
"properties": {
"jobName": {
"type": "string",
"description": "Name of the build job"
},
"buildId": {
"type": "string",
"description": "Id of the build (an instance of the build job being run)"
},
"start": {
"type": "integer",
"minimum": 0,
"description": "Start timestamp of the build (Unix epoch in milliseconds)",
"examples": [1451449853542]
},
"end": {
"type": "integer",
"minimum": 0,
"description": "End timestamp of the build (Unix epoch in milliseconds). If the duration of a build cannot be deduced the build's end can be omitted.",
"examples": [1451449870555]
},
"outcome": {
"type": "string",
"enum": ["pass", "fail"],
"description": "Outcome of the build"
},
"inputs": {
"type": "array",
"description": "Inputs with which the build was executed. The assumption is that given the same inputs, two builds should yield the same outputs.",
"examples": [
[
{
"revision": "1eadcdd4d35f9a",
"sourceId": "[email protected]:cburgmer/buildviz.git"
}
]
],
"items": {
"type": "object",
"required": ["sourceId", "revision"],
"properties": {
"sourceId": {
"type": "string",
"description": "Stable identifier of the input"
},
"revision": {
"type": "string",
"description": "Actual value of the input"
}
},
"additionalProperties": false
}
},
"triggeredBy": {
"type": "array",
"description": "References to other builds that triggered the execution of this build. This is intended to capture automatic triggers of downstream builds to calculate overall runtime, and should exclude instances where human intervention was required, which adds delay.",
"examples": [
[
{
"jobName": "Test",
"buildId": "42"
}
]
],
"items": {
"type": "object",
"required": ["jobName", "buildId"],
"properties": {
"jobName": {
"type": "string",
"description": "Name of the build job"
},
"buildId": {
"type": "string",
"description": "Id of the build (an instance of the build job being run)"
}
},
"additionalProperties": false
}
},
"testResults": {
"type": "array",
"description": "Results of a test run inside the build",
"examples": [
[
{
"name": "Test Suite",
"children": [
{
"classname": "some.class",
"name": "A Test",
"runtime": 2,
"status": "pass"
}
]
}
]
],
"items": {
"type": "object",
"required": ["name", "children"],
"properties": {
"name": {
"type": "string",
"description": "Grouping name of a set of test results, e.g. a test suite name"
},
"children": {
"type": "array",
"description": "Set of test results",
"items": {
"type": "object",
"required": ["classname", "name", "status"],
"properties": {
"classname": {
"type": "string",
"description": "Typically a reference to a source code file or class name"
},
"name": {
"type": "string",
"description": "Name of the test"
},
"runtime": {
"type": "integer",
"minimum": 0,
"description": "Elapsed time of the test in milliseconds"
},
"status": {
"type": "string",
"enum": ["pass", "fail", "skipped", "error"],
"description": "Outcome of the test"
}
},
"additionalProperties": false
}
}
},
"additionalProperties": false
}
},
"tasks": {
"type": "array",
"description": "Information on tasks run within the job",
"examples": [
[
{
"name": "deploy",
"start": 1451449853500,
"end": 1451449853602,
"worker": "worker-456789"
},
{
"name": "smoke-test",
"start": 1451449853710,
"end": 1451449853799,
"worker": "worker-34598"
}
]
],
"items": {
"type": "object",
"required": ["name"],
"properties": {
"name": {
"type": "string",
"description": "Unique name of the task"
},
"start": {
"type": "integer",
"minimum": 0,
"description": "Start timestamp of the task (Unix epoch in milliseconds)",
"examples": [1451449853542]
},
"end": {
"type": "integer",
"minimum": 0,
"description": "End timestamp of the task (Unix epoch in milliseconds).",
"examples": [1451449870555]
},
"worker": {
"type": "string",
"description": "Name of the worker executing the task"
}
}
},
"additionalProperties": false
}
},
"additionalProperties": false
}