/
BlueItemRun.java
165 lines (137 loc) · 3.97 KB
/
BlueItemRun.java
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
package io.jenkins.blueocean.rest.model;
import io.jenkins.blueocean.rest.Navigable;
import io.jenkins.blueocean.rest.annotation.Capability;
import org.kohsuke.stapler.export.Exported;
import javax.annotation.Nonnull;
import java.util.Collection;
import static io.jenkins.blueocean.rest.model.KnownCapabilities.BLUE_RUN;
/**
* Common interface for job run details
*/
@Capability(BLUE_RUN)
public interface BlueItemRun {
/**
* @return name of the organization
*/
@Exported(name = "organization")
String getOrganization();
/**
* @return {@link BlueRun} id - unique within a pipeline
*/
@Exported(name = "id")
String getId();
/**
* @return Pipeline name - unique within an organization
*/
@Exported(name = "pipeline")
String getPipeline();
@Exported(name = "name")
String getName();
@Exported(name = "description")
String getDescription();
/**
* @return Gives change set of a run
*/
@Exported(inline = true)
@Nonnull
@Navigable
Container<BlueChangeSetEntry> getChangeSet();
/**
* @return run start time
*/
@Exported(name = "startTime")
String getStartTimeString();
/**
* Enque time
*/
@Exported(name = "enQueueTime")
String getEnQueueTimeString();
/**
* Run end time
*/
@Exported(name = "endTime")
String getEndTimeString();
/**
* @return Build duration in milli seconds
*/
@Exported(name = "durationInMillis")
Long getDurationInMillis();
/**
* @return Estimated Build duration in milli seconds
*/
@Exported(name = "estimatedDurationInMillis")
Long getEstimatedDurtionInMillis();
/**
* @return The state of the run
*/
@Exported(name = "state")
BlueRun.BlueRunState getStateObj();
/**
* @return The result state of the job (e.g unstable)
*/
@Exported(name = "result")
BlueRun.BlueRunResult getResult();
/**
* @return Build summary
*/
@Exported(name = "runSummary")
String getRunSummary();
/**
* @return Type of Run. Type name to be Jenkins Run.getClass().getSimpleName()
*/
@Exported(name = "type")
String getType();
/**
* @return Uri of artifacts zip file.
*/
@Exported
String getArtifactsZipFile();
/**
* @return Run artifacts
*/
@Navigable
BlueArtifactContainer getArtifacts();
/**
* @return Gives Actions associated with this Run, if requested via tree
*/
@Navigable
@Exported(name = "actions", inline = true)
Collection<BlueActionProxy> getActions();
/**
* @return Gives tests in this run
*/
@Navigable
BlueTestResultContainer getTests();
/**
* @return Gives the test summary for this run
*/
@Exported(name = "testSummary", inline = true, skipNull = true)
BlueTestSummary getTestSummary();
/**
* @return Instance of stapler aware instance that can do the following:
* <p></p><ul>
* <li>Must be able to process start query parameter. 'start' parameter is the byte offset in the actual log file</li>
* <li>Must produce following HTTP headers in the response</li>
* <li>X-Text-Size It is the byte offset of the raw log file client should use in the next request as value of start query parameter.</li>
* <li>X-More-Data If its true, then client should repeat the request after some delay. In the repeated request it should use
* X-TEXT-SIZE header value with *start* query parameter.</li>
* </ul>
*/
@Navigable
Object getLog();
/**
* @return cause of the run being created
*/
@Exported(name = "causes", inline = true)
Collection<BlueRun.BlueCause> getCauses();
/**
* @return cause of what is blocking this run
*/
@Exported(name = "causeOfBlockage")
String getCauseOfBlockage();
/**
* @return if the run will allow a replay
*/
@Exported(name = "replayable")
boolean isReplayable();
}