suite_scheduler: Add trigger-type

BUG=None
TEST=./generate

Change-Id: I90e7c618a347da0118cb52ae51a6034a9d79c079
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2753888
Auto-Submit: Brigit Rossbach <brigitr@google.com>
Reviewed-by: Taylor Clark <taylormade@google.com>
Commit-Queue: Taylor Clark <taylormade@google.com>
diff --git a/go/testplans/suite_scheduler.pb.go b/go/testplans/suite_scheduler.pb.go
index 473a059..83edbd1 100644
--- a/go/testplans/suite_scheduler.pb.go
+++ b/go/testplans/suite_scheduler.pb.go
@@ -869,6 +869,10 @@
 	// If sanity HW test passed, launch this test. Irrespective of the release build's
 	// final status.
 	OnlySanityTestRequired bool `protobuf:"varint,4,opt,name=only_sanity_test_required,json=onlySanityTestRequired,proto3" json:"only_sanity_test_required,omitempty"`
+	// The options are primary and all, which indicate whether we want to trigger this test
+	// whenever there is a new build for the primary board or only run the test when
+	// every board in a group has a new build.
+	TriggerType string `protobuf:"bytes,5,opt,name=trigger_type,json=triggerType,proto3" json:"trigger_type,omitempty"`
 }
 
 func (x *SchedulerConfig_RunOptions) Reset() {
@@ -931,6 +935,13 @@
 	return false
 }
 
+func (x *SchedulerConfig_RunOptions) GetTriggerType() string {
+	if x != nil {
+		return x.TriggerType
+	}
+	return ""
+}
+
 // A list of extra labels/dimensions to attach.
 // Extra Swarming Dimensions that can be specified.
 type SchedulerConfig_RunOptions_SwarmingDimension struct {
@@ -1006,7 +1017,7 @@
 	0x69, 0x61, 0x6e, 0x74, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x18, 0x01, 0x20,
 	0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x6f, 0x61, 0x72, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x61,
 	0x72, 0x69, 0x61, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x61, 0x72,
-	0x69, 0x61, 0x6e, 0x74, 0x22, 0xb8, 0x0d, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
+	0x69, 0x61, 0x6e, 0x74, 0x22, 0xdb, 0x0d, 0x0a, 0x0f, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c,
 	0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65,
 	0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x14, 0x0a, 0x05,
 	0x73, 0x75, 0x69, 0x74, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x73, 0x75, 0x69,
@@ -1092,7 +1103,7 @@
 	0x52, 0x09, 0x71, 0x73, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x70,
 	0x6f, 0x6f, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x70, 0x6f, 0x6f, 0x6c, 0x12,
 	0x1a, 0x0a, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28,
-	0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x1a, 0x96, 0x02, 0x0a, 0x0a,
+	0x05, 0x52, 0x08, 0x70, 0x72, 0x69, 0x6f, 0x72, 0x69, 0x74, 0x79, 0x1a, 0xb9, 0x02, 0x0a, 0x0a,
 	0x52, 0x75, 0x6e, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x14, 0x0a, 0x05, 0x72, 0x65,
 	0x74, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x05, 0x72, 0x65, 0x74, 0x72, 0x79,
 	0x12, 0x57, 0x0a, 0x0a, 0x64, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x02,
@@ -1106,28 +1117,30 @@
 	0x6f, 0x6e, 0x6c, 0x79, 0x5f, 0x73, 0x61, 0x6e, 0x69, 0x74, 0x79, 0x5f, 0x74, 0x65, 0x73, 0x74,
 	0x5f, 0x72, 0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52,
 	0x16, 0x6f, 0x6e, 0x6c, 0x79, 0x53, 0x61, 0x6e, 0x69, 0x74, 0x79, 0x54, 0x65, 0x73, 0x74, 0x52,
-	0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x1a, 0x3b, 0x0a, 0x11, 0x53, 0x77, 0x61, 0x72, 0x6d,
-	0x69, 0x6e, 0x67, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x10, 0x0a, 0x03,
-	0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14,
-	0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76,
-	0x61, 0x6c, 0x75, 0x65, 0x22, 0x39, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x6d, 0x77, 0x61, 0x72, 0x65,
-	0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
-	0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x52, 0x4f, 0x53, 0x10,
-	0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x52, 0x4d, 0x57, 0x41, 0x52, 0x45, 0x10, 0x02, 0x22,
-	0x44, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x66, 0x67, 0x12,
-	0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b,
-	0x32, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2e, 0x53, 0x63, 0x68,
-	0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x07, 0x63, 0x6f,
-	0x6e, 0x66, 0x69, 0x67, 0x73, 0x2a, 0x4b, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12,
-	0x16, 0x0a, 0x12, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43,
-	0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41, 0x4e, 0x41, 0x52,
-	0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x45, 0x56, 0x10, 0x02, 0x12, 0x08, 0x0a, 0x04,
-	0x42, 0x45, 0x54, 0x41, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41, 0x42, 0x4c, 0x45,
-	0x10, 0x04, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75,
-	0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75, 0x6d, 0x6f, 0x73,
-	0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f, 0x67, 0x6f, 0x2f,
-	0x74, 0x65, 0x73, 0x74, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f,
-	0x33,
+	0x65, 0x71, 0x75, 0x69, 0x72, 0x65, 0x64, 0x12, 0x21, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67,
+	0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x74,
+	0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x1a, 0x3b, 0x0a, 0x11, 0x53, 0x77,
+	0x61, 0x72, 0x6d, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x6d, 0x65, 0x6e, 0x73, 0x69, 0x6f, 0x6e, 0x12,
+	0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65,
+	0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09,
+	0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x39, 0x0a, 0x0e, 0x46, 0x69, 0x72, 0x6d, 0x77,
+	0x61, 0x72, 0x65, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x4e, 0x53,
+	0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x08, 0x0a, 0x04, 0x43, 0x52,
+	0x4f, 0x53, 0x10, 0x01, 0x12, 0x0c, 0x0a, 0x08, 0x46, 0x49, 0x52, 0x4d, 0x57, 0x41, 0x52, 0x45,
+	0x10, 0x02, 0x22, 0x44, 0x0a, 0x0c, 0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43,
+	0x66, 0x67, 0x12, 0x34, 0x0a, 0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x18, 0x01, 0x20,
+	0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x74, 0x65, 0x73, 0x74, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x2e,
+	0x53, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x72, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52,
+	0x07, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x73, 0x2a, 0x4b, 0x0a, 0x06, 0x42, 0x72, 0x61, 0x6e,
+	0x63, 0x68, 0x12, 0x16, 0x0a, 0x12, 0x42, 0x52, 0x41, 0x4e, 0x43, 0x48, 0x5f, 0x55, 0x4e, 0x53,
+	0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x0a, 0x0a, 0x06, 0x43, 0x41,
+	0x4e, 0x41, 0x52, 0x59, 0x10, 0x01, 0x12, 0x07, 0x0a, 0x03, 0x44, 0x45, 0x56, 0x10, 0x02, 0x12,
+	0x08, 0x0a, 0x04, 0x42, 0x45, 0x54, 0x41, 0x10, 0x03, 0x12, 0x0a, 0x0a, 0x06, 0x53, 0x54, 0x41,
+	0x42, 0x4c, 0x45, 0x10, 0x04, 0x42, 0x35, 0x5a, 0x33, 0x67, 0x6f, 0x2e, 0x63, 0x68, 0x72, 0x6f,
+	0x6d, 0x69, 0x75, 0x6d, 0x2e, 0x6f, 0x72, 0x67, 0x2f, 0x63, 0x68, 0x72, 0x6f, 0x6d, 0x69, 0x75,
+	0x6d, 0x6f, 0x73, 0x2f, 0x69, 0x6e, 0x66, 0x72, 0x61, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x2f,
+	0x67, 0x6f, 0x2f, 0x74, 0x65, 0x73, 0x74, 0x70, 0x6c, 0x61, 0x6e, 0x73, 0x62, 0x06, 0x70, 0x72,
+	0x6f, 0x74, 0x6f, 0x33,
 }
 
 var (
diff --git a/src/testplans/suite_scheduler.proto b/src/testplans/suite_scheduler.proto
index ebbd945..8acdcef 100644
--- a/src/testplans/suite_scheduler.proto
+++ b/src/testplans/suite_scheduler.proto
@@ -162,6 +162,10 @@
         // If sanity HW test passed, launch this test. Irrespective of the release build's
         // final status.
         bool only_sanity_test_required = 4;
+        // The options are primary and all, which indicate whether we want to trigger this test
+        // whenever there is a new build for the primary board or only run the test when
+        // every board in a group has a new build.
+        string trigger_type = 5;
     }
     RunOptions run_options = 9;