@@ -86,6 +86,10 @@ type BuildStatus struct {
86
86
// Cancelled describes if a cancel event was triggered for the build.
87
87
Cancelled bool
88
88
89
+ // Skipped indicates that this build was marked as skipped. The build will be
90
+ // cancelled, but this field is used to set the appropriate reason.
91
+ Skipped bool
92
+
89
93
// Reason is a brief CamelCase string that describes any failure and is meant for machine parsing and tidy display in the CLI.
90
94
Reason StatusReason
91
95
@@ -177,6 +181,9 @@ const (
177
181
// StatusReasonExceededRetryTimeout is an error condition when the build has
178
182
// not completed and retrying the build times out.
179
183
StatusReasonExceededRetryTimeout = "ExceededRetryTimeout"
184
+
185
+ // StatusReasonSkipped indicates that the build was skipped.
186
+ StatusReasonSkipped = "Skipped"
180
187
)
181
188
182
189
// BuildSource is the input used for the build.
@@ -559,10 +566,30 @@ type BuildConfigSpec struct {
559
566
// are defined, a new build can only occur as a result of an explicit client build creation.
560
567
Triggers []BuildTriggerPolicy
561
568
569
+ // SchedulePolicy describes how the new build created from this build
570
+ // configuration will be scheduled for execution.
571
+ // This is optional, if not specified we default to "parallel".
572
+ SchedulePolicy * BuildSchedulePolicy
573
+
562
574
// BuildSpec is the desired build specification
563
575
BuildSpec
564
576
}
565
577
578
+ // BuildSchedulePolicy defines the behaviour of how the new builds are executed
579
+ // from the existing build configuration.
580
+ type BuildSchedulePolicy string
581
+
582
+ const (
583
+ // BuildSchedulePolicyParallel schedules new builds immediately after they are
584
+ // created. Builds will be executed in parallel. This is the default policy.
585
+ BuildSchedulePolicyParallel BuildSchedulePolicy = "parallel"
586
+
587
+ // BuildSchedulePolicySerial schedules new builds to execute in a sequence as
588
+ // they are created. Every build gets queued up and will execute when the
589
+ // previous build completes.
590
+ BuildSchedulePolicySerial BuildSchedulePolicy = "serial"
591
+ )
592
+
566
593
// BuildConfigStatus contains current state of the build config object.
567
594
type BuildConfigStatus struct {
568
595
// LastVersion is used to inform about number of last triggered build.
0 commit comments