-
Notifications
You must be signed in to change notification settings - Fork 582
/
data.go
65 lines (60 loc) · 3.1 KB
/
data.go
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
package telemetry
// BaseData object definition containing the base data
type BaseData struct {
ActionName string `json:"actionName"`
EventType string `json:"eventType"`
SiteID string `json:"idsite"`
URL string `json:"url"`
StepName string `json:"stepName"` // set by step generator
StageName string `json:"stageName"`
PipelineURLHash string `json:"pipelineUrlHash"` // defaults to sha1 of provider.GetBuildURL()
BuildURLHash string `json:"buildUrlHash"` // defaults to sha1 of provider.GetJobURL()
Orchestrator string `json:"orchestrator"` // defaults to provider.OrchestratorType()
}
var baseData BaseData
// CustomData object definition containing the data that can be set by a step
type CustomData struct {
Duration string `json:"duration,omitempty"`
ErrorCode string `json:"errorCode,omitempty"`
ErrorCategory string `json:"errorCategory,omitempty"`
PiperCommitHash string `json:"piperCommitHash,omitempty"`
BuildTool string `json:"buildTool,omitempty"`
FilePath string `json:"filePath,omitempty"`
DeployTool string `json:"deployTool,omitempty"`
ContainerBuildOptions string `json:"containerBuildOptions,omitempty"`
IsScheduled bool `json:"isScheduled,omitempty"`
IsOptimized bool `json:"isOptimized,omitempty"`
ProxyLogFile string `json:"proxyLogFile,omitempty"`
BuildType string `json:"buildType,omitempty"`
BuildQuality string `json:"buildQuality,omitempty"`
LegacyJobNameTemplate string `json:"legacyJobNameTemplate,omitempty"`
LegacyJobName string `json:"legacyJobName,omitempty"`
DeployType string `json:"deployType,omitempty"`
CnbBuilder string `json:"cnbBuilder,omitempty"`
CnbRunImage string `json:"cnbRunImage,omitempty"`
ServerURL string `json:"serverURL,omitempty"`
ECCNMessageStatus string `json:"eccnMessageStatus,omitempty"`
ChangeRequestUpload string `json:"changeRequestUpload,omitempty"`
BuildVersionCreation string `json:"buildVersionCreation,omitempty"`
PullRequestMode string `json:"pullRequestMode,omitempty"`
GroovyTemplateUsed string `json:"groovyTemplateUsed,omitempty"`
}
// StepTelemetryData definition for telemetry reporting and monitoring
type StepTelemetryData struct {
StepStartTime string `json:"StepStartTime"`
PipelineURLHash string `json:"PipelineURLHash"`
BuildURLHash string `json:"BuildURLHash"`
StageName string `json:"StageName"`
StepName string `json:"StepName"`
ErrorCode string `json:"ErrorCode"`
StepDuration string `json:"StepDuration"`
ErrorCategory string `json:"ErrorCategory"`
CorrelationID string `json:"CorrelationID"`
PiperCommitHash string `json:"PiperCommitHash"`
ErrorDetail map[string]interface{} `json:"ErrorDetail"`
}
// Data object definition containing all telemetry data
type Data struct {
BaseData
CustomData
}