Class Incident
java.lang.Object
io.jenkins.plugins.batchcontrol.model.Incident
@Restricted(org.kohsuke.accmod.restrictions.NoExternalUse.class)
public final class Incident
extends Object
An automatically registered error case (SPEC items 11 and section 3): opened for every build
whose result is in the configured
incidentResults, then handled by people
(OPEN -> ACKNOWLEDGED -> RESOLVED).
Persisted as XStream XML at incidents/<id>.xml with a monthly JSONL index at
incidents/index/YYYY-MM.jsonl (ARCHITECTURE section 5). Timestamps are stored as
epoch milliseconds; the accessors expose Instant.
Status transitions must only be performed by ops.IncidentService; other code must
not call setStatus(io.jenkins.plugins.batchcontrol.model.IncidentStatus). The stored parameters and
logTail are already masked (D-19); the plaintext of a sensitive
parameter never reaches this object.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddRerunRequestId(String requestId) voidaddTransition(IncidentTransition transition) getId()The masked console log excerpt (at most 100 lines, D-19).The failed build's parameters, sensitive values already masked.getRunId()D-72b (6): the failed build's own timestamp in epoch milliseconds, ornullwhen the incident was stored before it was recorded.A defensive copy of the handling history, in append order.voidsetLogTail(List<String> logTail) voidsetParameters(Map<String, String> parameters) voidsetResolvedByRunId(String resolvedByRunId) voidsetRunTimestampMillis(Long runTimestampMillis) Onlyops.IncidentServicerecords the failed build's timestamp, when it opens the incident.voidsetStatus(IncidentStatus status) Onlyops.IncidentServicemay transition the status.
-
Constructor Details
-
Incident
-
-
Method Details
-
getId
-
getRunId
-
getJobFullName
-
getResult
-
getStatus
-
setStatus
Onlyops.IncidentServicemay transition the status. -
getTransitions
A defensive copy of the handling history, in append order. -
addTransition
-
getLogTail
The masked console log excerpt (at most 100 lines, D-19). -
setLogTail
-
getRerunRequestIds
-
addRerunRequestId
-
getResolvedByRunId
-
setResolvedByRunId
-
getParameters
The failed build's parameters, sensitive values already masked. -
setParameters
-
getCreatedAt
-
getRunTimestampMillis
D-72b (6): the failed build's own timestamp in epoch milliseconds, ornullwhen the incident was stored before it was recorded. -
setRunTimestampMillis
Onlyops.IncidentServicerecords the failed build's timestamp, when it opens the incident.
-