-
Notifications
You must be signed in to change notification settings - Fork 0
/
environment.go
48 lines (44 loc) · 2.56 KB
/
environment.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
package azuredevops
import "time"
// Environment holds the environment of a Release
type Environment struct {
IntDefinition
ReleaseID int `json:"releaseId"`
Status string `json:"status"`
Variables map[string]string `json:"variables"`
PreDeployApprovals []User `json:"preDeployApprovals"`
PostDeployApprovals []User `json:"postDeployApprovals"`
PreApprovalsSnapshot []EnvironmentApprovalSnapshot `json:"preApprovalsSnapshot"`
PostApprovalsSnapshot []EnvironmentApprovalSnapshot `json:"postApprovalsSnapshot"`
DeploySteps []interface{} `json:"deploySteps"`
Rank int `json:"rank"`
DefinitionEnvironmentID int `json:"definitionEnvironmentId"`
QueueID int `json:"queueId"`
EnvironmentOptions map[string]string `json:"environmentOptions"`
Demands []interface{} `json:"demands"`
Conditions []interface{} `json:"conditions"`
ModifiedOn time.Time `json:"modifiedOn"`
WorkflowTasks []EnvironmentWorkflowTasks `json:"workflowTasks"`
DeployPhasesSnapshot []interface{} `json:"deployPhasesSnapshot"`
Owner User `json:"owner"`
ScheduledDeploymentTime time.Time `json:"scheduledDeploymentTime"`
Schedules []interface{} `json:"schedules"`
Release ServiceHookResourceDefinition `json:"release"`
}
// EnvironmentApprovalSnapshot holds the approval snapshot of a Release Environment
type EnvironmentApprovalSnapshot struct {
Approvals []User `json:"approvals"`
ApprovalOptions map[string]string `json:"approvalOptions"`
}
// EnvironmentWorkflowTasks holds the definition of pipeline environment tasks
type EnvironmentWorkflowTasks struct {
TaskID string `json:"taskId"`
Version string `json:"version"`
Name string `json:"name"`
Enabled bool `json:"enabled"`
AlwaysRun bool `json:"alwaysRun"`
ContinueOnError bool `json:"continueOnError"`
TimeoutInMinutes int `json:"timeoutInMinutes"`
DefinitionType *string `json:"definitionType"`
Inputs map[string]string `json:"inputs"`
}