-
Notifications
You must be signed in to change notification settings - Fork 3
/
deploy_katee.go
93 lines (77 loc) · 2.67 KB
/
deploy_katee.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
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
package manifest
type DeployKatee struct {
Type string
Name string `yaml:"name,omitempty"`
ManualTrigger bool `json:"manual_trigger" yaml:"manual_trigger,omitempty"`
Timeout string `json:"timeout,omitempty" yaml:"timeout,omitempty"`
Vars Vars `yaml:"vars,omitempty" secretAllowed:"true"`
VelaManifest string `json:"vela_manifest,omitempty" yaml:"vela_manifest,omitempty"`
Retries int `yaml:"retries,omitempty"`
NotifyOnSuccess bool `json:"notify_on_success,omitempty" yaml:"notify_on_success,omitempty"`
Notifications Notifications `json:"notifications,omitempty" yaml:"notifications,omitempty"`
Tag string `json:"tag,omitempty" yaml:"tag,omitempty"`
BuildHistory int `json:"build_history,omitempty" yaml:"build_history,omitempty"`
Environment string `json:"environment,omitempty" yaml:"environment,omitempty"`
Namespace string `json:"namespace,omitempty" yaml:"namespace,omitempty"`
DeploymentCheckTimeout int `json:"deployment_check_timeout,omitempty" yaml:"deployment_check_timeout,omitempty"`
}
func (d DeployKatee) ReadsFromArtifacts() bool {
return false
}
func (d DeployKatee) GetAttempts() int {
return 2 + d.Retries
}
func (d DeployKatee) SavesArtifacts() bool {
return false
}
func (d DeployKatee) SavesArtifactsOnFailure() bool {
return false
}
func (d DeployKatee) IsManualTrigger() bool {
return d.ManualTrigger
}
func (d DeployKatee) NotifiesOnSuccess() bool {
return d.NotifyOnSuccess
}
func (r DeployKatee) SetNotifyOnSuccess(notifyOnSuccess bool) Task {
r.NotifyOnSuccess = notifyOnSuccess
return r
}
func (d DeployKatee) GetTimeout() string {
return d.Timeout
}
func (d DeployKatee) SetTimeout(timeout string) Task {
d.Timeout = timeout
return d
}
func (r DeployKatee) GetName() string {
if r.Name == "" {
return "deploy-katee"
}
return r.Name
}
func (r DeployKatee) SetName(name string) Task {
r.Name = name
return r
}
func (d DeployKatee) GetNotifications() Notifications {
return d.Notifications
}
func (d DeployKatee) SetNotifications(notifications Notifications) Task {
d.Notifications = notifications
return d
}
func (d DeployKatee) GetBuildHistory() int {
return d.BuildHistory
}
func (d DeployKatee) SetBuildHistory(buildHistory int) Task {
d.BuildHistory = buildHistory
return d
}
func (d DeployKatee) GetSecrets() map[string]string {
return findSecrets(map[string]string{})
}
func (d DeployKatee) MarshalYAML() (interface{}, error) {
d.Type = "deploy-katee"
return d, nil
}