cros_test_platform: add result_flow field into the CTP config proto

To kick off result flow recipe to process CTP data, we need to
instruct CTP to publish its build ID to a specified PubSub topic.
This CL adds such a field so that we could pass PubSub parameters
to CTP recipe.

BUG=chromium:1101104
TEST=./generate.sh

Change-Id: I5d4021f89f600d09daf71466044d011346a582c9
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2278033
Commit-Queue: Xinan Lin <linxinan@chromium.org>
Tested-by: Xinan Lin <linxinan@chromium.org>
Reviewed-by: Alex Zamorzaev <zamorzaev@chromium.org>
diff --git a/go/test_platform/config/config.pb.go b/go/test_platform/config/config.pb.go
index b51de4a..0c705a6 100644
--- a/go/test_platform/config/config.pb.go
+++ b/go/test_platform/config/config.pb.go
@@ -23,15 +23,18 @@
 
 // Config defined configuration parameters of cros_test_platform.
 type Config struct {
-	SkylabSwarming       *Config_Swarming     `protobuf:"bytes,1,opt,name=skylab_swarming,json=skylabSwarming,proto3" json:"skylab_swarming,omitempty"`
-	SkylabIsolate        *Config_Isolate      `protobuf:"bytes,3,opt,name=skylab_isolate,json=skylabIsolate,proto3" json:"skylab_isolate,omitempty"`
-	SkylabWorker         *Config_SkylabWorker `protobuf:"bytes,4,opt,name=skylab_worker,json=skylabWorker,proto3" json:"skylab_worker,omitempty"`
-	Versioning           *Config_Versioning   `protobuf:"bytes,7,opt,name=versioning,proto3" json:"versioning,omitempty"`
-	TestRunner           *Config_TestRunner   `protobuf:"bytes,8,opt,name=test_runner,json=testRunner,proto3" json:"test_runner,omitempty"`
-	TestRunnerMigration  *test_runner.Config  `protobuf:"bytes,9,opt,name=test_runner_migration,json=testRunnerMigration,proto3" json:"test_runner_migration,omitempty"`
-	XXX_NoUnkeyedLiteral struct{}             `json:"-"`
-	XXX_unrecognized     []byte               `json:"-"`
-	XXX_sizecache        int32                `json:"-"`
+	SkylabSwarming      *Config_Swarming     `protobuf:"bytes,1,opt,name=skylab_swarming,json=skylabSwarming,proto3" json:"skylab_swarming,omitempty"`
+	SkylabIsolate       *Config_Isolate      `protobuf:"bytes,3,opt,name=skylab_isolate,json=skylabIsolate,proto3" json:"skylab_isolate,omitempty"`
+	SkylabWorker        *Config_SkylabWorker `protobuf:"bytes,4,opt,name=skylab_worker,json=skylabWorker,proto3" json:"skylab_worker,omitempty"`
+	Versioning          *Config_Versioning   `protobuf:"bytes,7,opt,name=versioning,proto3" json:"versioning,omitempty"`
+	TestRunner          *Config_TestRunner   `protobuf:"bytes,8,opt,name=test_runner,json=testRunner,proto3" json:"test_runner,omitempty"`
+	TestRunnerMigration *test_runner.Config  `protobuf:"bytes,9,opt,name=test_runner_migration,json=testRunnerMigration,proto3" json:"test_runner_migration,omitempty"`
+	// The PubSub topic, to which CTP sends build ID when the build starts
+	// and ends.
+	Pubsub               *Config_PubSub `protobuf:"bytes,10,opt,name=pubsub,proto3" json:"pubsub,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}       `json:"-"`
+	XXX_unrecognized     []byte         `json:"-"`
+	XXX_sizecache        int32          `json:"-"`
 }
 
 func (m *Config) Reset()         { *m = Config{} }
@@ -101,6 +104,13 @@
 	return nil
 }
 
+func (m *Config) GetPubsub() *Config_PubSub {
+	if m != nil {
+		return m.Pubsub
+	}
+	return nil
+}
+
 // Swarming defines configuration parameters related to a swarming instance.
 type Config_Swarming struct {
 	Server               string   `protobuf:"bytes,1,opt,name=server,proto3" json:"server,omitempty"`
@@ -434,6 +444,54 @@
 	return nil
 }
 
+// PubSub defines the configuration parameters for PubSub topic.
+type Config_PubSub struct {
+	Project              string   `protobuf:"bytes,1,opt,name=project,proto3" json:"project,omitempty"`
+	Topic                string   `protobuf:"bytes,2,opt,name=topic,proto3" json:"topic,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *Config_PubSub) Reset()         { *m = Config_PubSub{} }
+func (m *Config_PubSub) String() string { return proto.CompactTextString(m) }
+func (*Config_PubSub) ProtoMessage()    {}
+func (*Config_PubSub) Descriptor() ([]byte, []int) {
+	return fileDescriptor_2c858eded7d7f900, []int{0, 6}
+}
+
+func (m *Config_PubSub) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_Config_PubSub.Unmarshal(m, b)
+}
+func (m *Config_PubSub) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_Config_PubSub.Marshal(b, m, deterministic)
+}
+func (m *Config_PubSub) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_Config_PubSub.Merge(m, src)
+}
+func (m *Config_PubSub) XXX_Size() int {
+	return xxx_messageInfo_Config_PubSub.Size(m)
+}
+func (m *Config_PubSub) XXX_DiscardUnknown() {
+	xxx_messageInfo_Config_PubSub.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_Config_PubSub proto.InternalMessageInfo
+
+func (m *Config_PubSub) GetProject() string {
+	if m != nil {
+		return m.Project
+	}
+	return ""
+}
+
+func (m *Config_PubSub) GetTopic() string {
+	if m != nil {
+		return m.Topic
+	}
+	return ""
+}
+
 func init() {
 	proto.RegisterType((*Config)(nil), "test_platform.config.Config")
 	proto.RegisterType((*Config_Swarming)(nil), "test_platform.config.Config.Swarming")
@@ -443,46 +501,50 @@
 	proto.RegisterType((*Config_Versioning_CrosTestPlatformBinary)(nil), "test_platform.config.Config.Versioning.CrosTestPlatformBinary")
 	proto.RegisterType((*Config_Buildbucket)(nil), "test_platform.config.Config.Buildbucket")
 	proto.RegisterType((*Config_TestRunner)(nil), "test_platform.config.Config.TestRunner")
+	proto.RegisterType((*Config_PubSub)(nil), "test_platform.config.Config.PubSub")
 }
 
 func init() { proto.RegisterFile("test_platform/config/config.proto", fileDescriptor_2c858eded7d7f900) }
 
 var fileDescriptor_2c858eded7d7f900 = []byte{
-	// 566 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0xd1, 0x6e,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7f, 0x03, 0x00, 0x00, 0xff, 0xff, 0x9b, 0x9d,
-	0x34, 0x24, 0x0f, 0x05, 0x00, 0x00,
+	// 611 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x8c, 0x54, 0x61, 0x6b, 0xd4, 0x4c,
+	0x10, 0xe6, 0xda, 0x6b, 0xee, 0x32, 0x77, 0x6f, 0xdf, 0xb2, 0xd6, 0x12, 0x03, 0x42, 0xab, 0x15,
+	0x2b, 0x42, 0x22, 0xfa, 0x41, 0x41, 0x28, 0xd2, 0x0a, 0xd6, 0x53, 0xcb, 0xb1, 0x15, 0x15, 0xbf,
+	0x2c, 0x49, 0x9a, 0xe6, 0xb6, 0x97, 0x64, 0xc2, 0xee, 0xa6, 0xe5, 0xfe, 0x9d, 0xbf, 0xc0, 0xdf,
+	0x24, 0xd9, 0x6c, 0xee, 0x72, 0x7a, 0x1c, 0xfd, 0x94, 0x3c, 0xcf, 0xce, 0xf3, 0xec, 0xec, 0xcc,
+	0xec, 0xc2, 0x81, 0x8a, 0xa5, 0x62, 0x45, 0x1a, 0xa8, 0x2b, 0x14, 0x99, 0x1f, 0x61, 0x7e, 0xc5,
+	0x13, 0xf3, 0xf1, 0x0a, 0x81, 0x0a, 0xc9, 0xee, 0x52, 0x88, 0x57, 0xaf, 0xb9, 0x2f, 0x96, 0x85,
+	0x19, 0x4f, 0x44, 0xa0, 0x38, 0xe6, 0xbe, 0xe6, 0x45, 0x99, 0xe7, 0xb1, 0x58, 0xf2, 0x79, 0xf4,
+	0xdb, 0x06, 0xeb, 0x54, 0x13, 0xe4, 0x1c, 0xfe, 0x97, 0xd3, 0x59, 0x1a, 0x84, 0x4c, 0xde, 0x06,
+	0x22, 0xe3, 0x79, 0xe2, 0x74, 0xf6, 0x3b, 0x47, 0x83, 0x97, 0x4f, 0xbc, 0x55, 0x9b, 0x79, 0xb5,
+	0xcc, 0xbb, 0x30, 0xc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f7, 0x0d,
+	0x58, 0xf5, 0xb4, 0xb5, 0xf3, 0xed, 0x2c, 0xe7, 0xbb, 0x0b, 0x5b, 0x0a, 0x0b, 0x1e, 0x99, 0x73,
+	0xd4, 0x60, 0xd4, 0xed, 0x6f, 0xec, 0x6c, 0x8e, 0xba, 0xfd, 0xad, 0x1d, 0x6b, 0xd4, 0xed, 0x5b,
+	0x3b, 0xbd, 0x93, 0x77, 0x3f, 0x8f, 0x13, 0xf4, 0xa2, 0x89, 0xc0, 0x8c, 0x97, 0x99, 0x87, 0x22,
+	0xf1, 0x1b, 0x80, 0xd2, 0xe7, 0xf9, 0x95, 0x08, 0x7c, 0xfd, 0xf4, 0xf9, 0x09, 0xfa, 0xab, 0xde,
+	0xd9, 0xd0, 0xd2, 0xcb, 0xaf, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0x1a, 0x09, 0xac, 0xb4, 0x86,
+	0x05, 0x00, 0x00,
 }
diff --git a/src/test_platform/config/config.proto b/src/test_platform/config/config.proto
index 53b77c7..eb37208 100644
--- a/src/test_platform/config/config.proto
+++ b/src/test_platform/config/config.proto
@@ -68,6 +68,12 @@
         Buildbucket buildbucket = 1;
     }
 
+    // PubSub defines the configuration parameters for PubSub topic.
+    message PubSub {
+       string project = 1;
+       string topic = 2;
+    }
+
     Swarming skylab_swarming = 1;
 
     Isolate skylab_isolate = 3;
@@ -79,4 +85,8 @@
     TestRunner test_runner = 8;
 
     test_platform.migration.test_runner.Config test_runner_migration = 9;
+
+    // The PubSub topic, to which CTP sends build ID when the build starts
+    // and ends.
+    PubSub pubsub = 10;
 }