forked from cvbarros/go-teamcity
/
trigger_schedule_options.go
38 lines (32 loc) · 1.76 KB
/
trigger_schedule_options.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
package teamcity
//TriggerScheduleOptions represent options for configuring a scheduled build trigger
type TriggerScheduleOptions struct {
QueueOptimization bool `prop:"enableQueueOptimization" force:""`
PromoteWatchedBuild bool `prop:"promoteWatchedBuild" force:""`
BuildWithPendingChangesOnly bool `prop:"triggerBuildWithPendingChangesOnly" force:""`
TriggerIfWatchedBuildChanges bool `prop:"triggerBuildIfWatchedBuildChanges"`
BuildOnAllCompatibleAgents bool `prop:"triggerBuildOnAllCompatibleAgents"`
RevisionRuleSourceBuildID string `prop:"revisionRuleDependsOn"`
RevisionRule ArtifactDependencyRevision `prop:"revisionRule"`
RevisionRuleBuildBranch string `prop:"revisionRuleBuildBranch"`
EnforceCleanCheckout bool `prop:"enforceCleanCheckout"`
EnforceCleanCheckoutForDependencies bool `prop:"enforceCleanCheckoutForDependencies"`
}
//NewTriggerScheduleOptions returns a TriggerScheduleOptions with default values
func NewTriggerScheduleOptions() *TriggerScheduleOptions {
return &TriggerScheduleOptions{
QueueOptimization: true,
PromoteWatchedBuild: true,
BuildWithPendingChangesOnly: true,
RevisionRuleBuildBranch: "<default>",
RevisionRule: LatestFinishedBuild,
}
}
func (o *TriggerScheduleOptions) properties() *Properties {
return serializeToProperties(o)
}
func (p *Properties) triggerScheduleOptions() *TriggerScheduleOptions {
var out TriggerScheduleOptions
fillStructFromProperties(&out, p)
return &out
}