Add fields for repo checkout path and ACLs to project_mgmt.

- Repo checkout path is needed so infra/config can read
ConfigBundles in project and program repos.
- Buildbucket read ACLs will be set to relevant groups for
each project's builds.

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

Change-Id: Id761d3aaceb0da2f3e0675216dd7c845fbc6bfb0
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/infra/proto/+/2078761
Reviewed-by: David Burger <dburger@chromium.org>
Reviewed-by: C Shapiro <shapiroc@chromium.org>
Commit-Queue: Andrew Lamb <andrewlamb@chromium.org>
Tested-by: Andrew Lamb <andrewlamb@chromium.org>
diff --git a/go/project_mgmt/program.pb.go b/go/project_mgmt/program.pb.go
index ee5ad38..7b1074e 100644
--- a/go/project_mgmt/program.pb.go
+++ b/go/project_mgmt/program.pb.go
@@ -25,9 +25,12 @@
 type Program struct {
 	// Defines the git-repo path for the program.
 	Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
-	// Defines that path that stores all of the program configuration.
+	// Defines the path that stores all of the program configuration.
 	// Relative to the git-repo
-	ConfigPath           string   `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
+	ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
+	// Defines the path the repo is checked out to in the source tree, i.e. the
+	// "path" attribute in the manifest.
+	RepoCheckoutPath     string   `protobuf:"bytes,3,opt,name=repo_checkout_path,json=repoCheckoutPath,proto3" json:"repo_checkout_path,omitempty"`
 	XXX_NoUnkeyedLiteral struct{} `json:"-"`
 	XXX_unrecognized     []byte   `json:"-"`
 	XXX_sizecache        int32    `json:"-"`
@@ -72,6 +75,13 @@
 	return ""
 }
 
+func (m *Program) GetRepoCheckoutPath() string {
+	if m != nil {
+		return m.RepoCheckoutPath
+	}
+	return ""
+}
+
 type ProgramList struct {
 	Value                []*Program `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
@@ -119,17 +129,19 @@
 func init() { proto.RegisterFile("project_mgmt/program.proto", fileDescriptor_3321a169ccc78e39) }
 
 var fileDescriptor_3321a169ccc78e39 = []byte{
-	// 186 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x28, 0xca, 0xcf,
-	0x4a, 0x4d, 0x2e, 0x89, 0xcf, 0x4d, 0xcf, 0x2d, 0xd1, 0x2f, 0x28, 0xca, 0x4f, 0x2f, 0x4a, 0xcc,
-	0xd5, 0x2b, 0x28, 0xca, 0x2f, 0xc9, 0x17, 0xe2, 0x41, 0x96, 0x53, 0xb2, 0xe3, 0x62, 0x0f, 0x80,
-	0x48, 0x0b, 0x09, 0x71, 0xb1, 0x14, 0xa5, 0x16, 0xe4, 0x4b, 0x30, 0x2a, 0x30, 0x6a, 0x70, 0x06,
-	0x81, 0xd9, 0x42, 0xf2, 0x5c, 0xdc, 0xc9, 0xf9, 0x79, 0x69, 0x99, 0xe9, 0xf1, 0x05, 0x89, 0x25,
-	0x19, 0x12, 0x4c, 0x60, 0x29, 0x2e, 0x88, 0x50, 0x40, 0x62, 0x49, 0x86, 0x92, 0x15, 0x17, 0x37,
-	0x54, 0xbf, 0x4f, 0x66, 0x71, 0x89, 0x90, 0x36, 0x17, 0x6b, 0x59, 0x62, 0x4e, 0x69, 0xaa, 0x04,
-	0xa3, 0x02, 0xb3, 0x06, 0xb7, 0x91, 0xa8, 0x1e, 0xb2, 0x65, 0x7a, 0x50, 0x95, 0x41, 0x10, 0x35,
-	0x4e, 0x16, 0x51, 0x66, 0xe9, 0xf9, 0x7a, 0xc9, 0x19, 0x45, 0xf9, 0xb9, 0x99, 0xa5, 0xb9, 0x7a,
-	0xf9, 0x45, 0xe9, 0xfa, 0x30, 0x4e, 0x7e, 0xb1, 0x7e, 0x66, 0x5e, 0x5a, 0x51, 0xa2, 0x3e, 0xd8,
-	0xcd, 0xfa, 0xe9, 0xf9, 0xfa, 0xc8, 0x06, 0x25, 0xb1, 0x81, 0x85, 0x8d, 0x01, 0x01, 0x00, 0x00,
-	0xff, 0xff, 0x52, 0x20, 0x6d, 0xb4, 0xe8, 0x00, 0x00, 0x00,
+	// 209 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x4c, 0x8f, 0xbd, 0x4b, 0xc6, 0x30,
+	0x10, 0x87, 0xa9, 0xaf, 0x1f, 0x78, 0x75, 0x90, 0x80, 0x50, 0x5c, 0x7c, 0xe9, 0x54, 0x50, 0x12,
+	0x50, 0x10, 0x71, 0xd4, 0xd5, 0xa1, 0x74, 0x74, 0x29, 0x31, 0xa4, 0x49, 0xb4, 0xe9, 0x85, 0x6b,
+	0xea, 0xdf, 0x2f, 0x4d, 0x2a, 0x74, 0xbb, 0xfb, 0x3d, 0x0f, 0xf7, 0x01, 0xb7, 0x81, 0xf0, 0x5b,
+	0xab, 0xd8, 0x7b, 0xe3, 0xa3, 0x08, 0x84, 0x86, 0xa4, 0xe7, 0x81, 0x30, 0x22, 0xbb, 0xda, 0xb3,
+	0x7a, 0x84, 0x8b, 0x36, 0x63, 0xc6, 0xe0, 0x94, 0x74, 0xc0, 0xaa, 0x38, 0x16, 0xcd, 0x65, 0x97,
+	0x6a, 0x76, 0x07, 0xa5, 0xc2, 0x69, 0x70, 0xa6, 0x0f, 0x32, 0xda, 0xea, 0x24, 0x21, 0xc8, 0x51,
+	0x2b, 0xa3, 0x65, 0x0f, 0xc0, 0x56, 0xb1, 0x57, 0x56, 0xab, 0x1f, 0x5c, 0x62, 0xf6, 0x0e, 0xc9,
+	0xbb, 0x5e, 0xc9, 0xfb, 0x06, 0x56, 0xbb, 0x7e, 0x85, 0x72, 0xdb, 0xf6, 0xe1, 0xe6, 0xc8, 0xee,
+	0xe1, 0xec, 0x57, 0x8e, 0x8b, 0xae, 0x8a, 0xe3, 0xa1, 0x29, 0x1f, 0x6f, 0xf8, 0xfe, 0x34, 0xbe,
+	0x99, 0x5d, 0x76, 0xde, 0x5e, 0x3e, 0x9f, 0x0d, 0x72, 0x65, 0x09, 0xbd, 0x5b, 0x3c, 0x47, 0x32,
+	0xe2, 0xbf, 0xc1, 0x59, 0xb8, 0x69, 0x20, 0x29, 0xd2, 0x87, 0xc2, 0xa0, 0xd8, 0x0f, 0xfa, 0x3a,
+	0x4f, 0xf1, 0xd3, 0x5f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x2e, 0x9f, 0x88, 0xa2, 0x16, 0x01, 0x00,
+	0x00,
 }
diff --git a/go/project_mgmt/project.pb.go b/go/project_mgmt/project.pb.go
index c2886d0..51fec8b 100644
--- a/go/project_mgmt/project.pb.go
+++ b/go/project_mgmt/project.pb.go
@@ -20,24 +20,70 @@
 // proto package needs to be updated.
 const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
 
+// Defines ACLs for a project's builders.
+type BuildbucketAcls struct {
+	// A list of LUCI Auth Service groups that can view a project's builds.
+	BuildbucketReaders   []string `protobuf:"bytes,1,rep,name=buildbucket_readers,json=buildbucketReaders,proto3" json:"buildbucket_readers,omitempty"`
+	XXX_NoUnkeyedLiteral struct{} `json:"-"`
+	XXX_unrecognized     []byte   `json:"-"`
+	XXX_sizecache        int32    `json:"-"`
+}
+
+func (m *BuildbucketAcls) Reset()         { *m = BuildbucketAcls{} }
+func (m *BuildbucketAcls) String() string { return proto.CompactTextString(m) }
+func (*BuildbucketAcls) ProtoMessage()    {}
+func (*BuildbucketAcls) Descriptor() ([]byte, []int) {
+	return fileDescriptor_18d734e2ff24bda5, []int{0}
+}
+
+func (m *BuildbucketAcls) XXX_Unmarshal(b []byte) error {
+	return xxx_messageInfo_BuildbucketAcls.Unmarshal(m, b)
+}
+func (m *BuildbucketAcls) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
+	return xxx_messageInfo_BuildbucketAcls.Marshal(b, m, deterministic)
+}
+func (m *BuildbucketAcls) XXX_Merge(src proto.Message) {
+	xxx_messageInfo_BuildbucketAcls.Merge(m, src)
+}
+func (m *BuildbucketAcls) XXX_Size() int {
+	return xxx_messageInfo_BuildbucketAcls.Size(m)
+}
+func (m *BuildbucketAcls) XXX_DiscardUnknown() {
+	xxx_messageInfo_BuildbucketAcls.DiscardUnknown(m)
+}
+
+var xxx_messageInfo_BuildbucketAcls proto.InternalMessageInfo
+
+func (m *BuildbucketAcls) GetBuildbucketReaders() []string {
+	if m != nil {
+		return m.BuildbucketReaders
+	}
+	return nil
+}
+
 // Defines the metadata for a project, which ultimately controls how this
 // project is managed throughout the infrastructure.
 type Project struct {
 	// Defines the git-repo path for the project.
 	Repo string `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
-	// Defines that path that stores all of the project configuration.
+	// Defines the path that stores all of the project configuration.
 	// Relative to the git-repo
-	ConfigPath           string   `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
-	XXX_NoUnkeyedLiteral struct{} `json:"-"`
-	XXX_unrecognized     []byte   `json:"-"`
-	XXX_sizecache        int32    `json:"-"`
+	ConfigPath string `protobuf:"bytes,2,opt,name=config_path,json=configPath,proto3" json:"config_path,omitempty"`
+	// Defines the path the repo is checked out to in the source tree, i.e. the
+	// "path" attribute in the manifest.
+	RepoCheckoutPath string `protobuf:"bytes,3,opt,name=repo_checkout_path,json=repoCheckoutPath,proto3" json:"repo_checkout_path,omitempty"`
+	// Defines ACLs for a project's builders.
+	BuildbucketAcls      *BuildbucketAcls `protobuf:"bytes,4,opt,name=buildbucket_acls,json=buildbucketAcls,proto3" json:"buildbucket_acls,omitempty"`
+	XXX_NoUnkeyedLiteral struct{}         `json:"-"`
+	XXX_unrecognized     []byte           `json:"-"`
+	XXX_sizecache        int32            `json:"-"`
 }
 
 func (m *Project) Reset()         { *m = Project{} }
 func (m *Project) String() string { return proto.CompactTextString(m) }
 func (*Project) ProtoMessage()    {}
 func (*Project) Descriptor() ([]byte, []int) {
-	return fileDescriptor_18d734e2ff24bda5, []int{0}
+	return fileDescriptor_18d734e2ff24bda5, []int{1}
 }
 
 func (m *Project) XXX_Unmarshal(b []byte) error {
@@ -72,6 +118,20 @@
 	return ""
 }
 
+func (m *Project) GetRepoCheckoutPath() string {
+	if m != nil {
+		return m.RepoCheckoutPath
+	}
+	return ""
+}
+
+func (m *Project) GetBuildbucketAcls() *BuildbucketAcls {
+	if m != nil {
+		return m.BuildbucketAcls
+	}
+	return nil
+}
+
 type ProjectList struct {
 	Value                []*Project `protobuf:"bytes,1,rep,name=value,proto3" json:"value,omitempty"`
 	XXX_NoUnkeyedLiteral struct{}   `json:"-"`
@@ -83,7 +143,7 @@
 func (m *ProjectList) String() string { return proto.CompactTextString(m) }
 func (*ProjectList) ProtoMessage()    {}
 func (*ProjectList) Descriptor() ([]byte, []int) {
-	return fileDescriptor_18d734e2ff24bda5, []int{1}
+	return fileDescriptor_18d734e2ff24bda5, []int{2}
 }
 
 func (m *ProjectList) XXX_Unmarshal(b []byte) error {
@@ -112,6 +172,7 @@
 }
 
 func init() {
+	proto.RegisterType((*BuildbucketAcls)(nil), "project_mgmt.BuildbucketAcls")
 	proto.RegisterType((*Project)(nil), "project_mgmt.Project")
 	proto.RegisterType((*ProjectList)(nil), "project_mgmt.ProjectList")
 }
@@ -119,17 +180,22 @@
 func init() { proto.RegisterFile("project_mgmt/project.proto", fileDescriptor_18d734e2ff24bda5) }
 
 var fileDescriptor_18d734e2ff24bda5 = []byte{
-	// 180 bytes of a gzipped FileDescriptorProto
-	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xe2, 0x92, 0x2a, 0x28, 0xca, 0xcf,
-	0x4a, 0x4d, 0x2e, 0x89, 0xcf, 0x4d, 0xcf, 0x2d, 0xd1, 0x87, 0x72, 0xf4, 0x0a, 0x8a, 0xf2, 0x4b,
-	0xf2, 0x85, 0x78, 0x90, 0xe5, 0x94, 0xec, 0xb8, 0xd8, 0x03, 0x20, 0x7c, 0x21, 0x21, 0x2e, 0x96,
-	0xa2, 0xd4, 0x82, 0x7c, 0x09, 0x46, 0x05, 0x46, 0x0d, 0xce, 0x20, 0x30, 0x5b, 0x48, 0x9e, 0x8b,
-	0x3b, 0x39, 0x3f, 0x2f, 0x2d, 0x33, 0x3d, 0xbe, 0x20, 0xb1, 0x24, 0x43, 0x82, 0x09, 0x2c, 0xc5,
-	0x05, 0x11, 0x0a, 0x48, 0x2c, 0xc9, 0x50, 0xb2, 0xe2, 0xe2, 0x86, 0xea, 0xf7, 0xc9, 0x2c, 0x2e,
-	0x11, 0xd2, 0xe6, 0x62, 0x2d, 0x4b, 0xcc, 0x29, 0x4d, 0x95, 0x60, 0x54, 0x60, 0xd6, 0xe0, 0x36,
-	0x12, 0xd5, 0x43, 0xb6, 0x4c, 0x0f, 0xaa, 0x32, 0x08, 0xa2, 0xc6, 0xc9, 0x22, 0xca, 0x2c, 0x3d,
-	0x5f, 0x2f, 0x39, 0xa3, 0x28, 0x3f, 0x37, 0xb3, 0x34, 0x57, 0x2f, 0xbf, 0x28, 0x5d, 0x1f, 0xc6,
-	0xc9, 0x2f, 0xd6, 0xcf, 0xcc, 0x4b, 0x2b, 0x4a, 0xd4, 0x07, 0xbb, 0x59, 0x3f, 0x3d, 0x5f, 0x1f,
-	0xd9, 0xa0, 0x24, 0x36, 0xb0, 0xb0, 0x31, 0x20, 0x00, 0x00, 0xff, 0xff, 0x76, 0x66, 0x49, 0xc1,
-	0xe8, 0x00, 0x00, 0x00,
+	// 271 bytes of a gzipped FileDescriptorProto
+	0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x5c, 0x90, 0xcf, 0x4b, 0xc3, 0x30,
+	0x14, 0xc7, 0xa9, 0x9b, 0xca, 0x5e, 0x85, 0x8d, 0x88, 0x50, 0x04, 0x71, 0xf4, 0x54, 0x50, 0x1a,
+	0x98, 0x20, 0xe2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, 0xaa, 0xf1, 0xea, 0xea, 0x78, 0xdb, 0x68, 0x96, 0xde,
+	0x29, 0x9e, 0x3e, 0x1e, 0x1b, 0xcc, 0x79, 0xab, 0xb0, 0x97, 0xb6, 0xcf, 0x51, 0x35, 0xf4, 0x77,
+	0x40, 0x4d, 0xe5, 0x7e, 0xab, 0x18, 0x75, 0x1f, 0x4e, 0x1b, 0xa4, 0xe1, 0xa2, 0xfa, 0xcc, 0xc5,
+	0x0f, 0x3f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x15, 0x28, 0x6f, 0x50, 0xa5, 0x01, 0x00, 0x00,
 }
diff --git a/src/project_mgmt/program.proto b/src/project_mgmt/program.proto
index 765fb70..b850f23 100644
--- a/src/project_mgmt/program.proto
+++ b/src/project_mgmt/program.proto
@@ -13,9 +13,12 @@
 message Program {
   // Defines the git-repo path for the program.
   string repo = 1;
-  // Defines that path that stores all of the program configuration.
+  // Defines the path that stores all of the program configuration.
   // Relative to the git-repo
   string config_path = 2;
+  // Defines the path the repo is checked out to in the source tree, i.e. the
+  // "path" attribute in the manifest.
+  string repo_checkout_path = 3;
 }
 
 message ProgramList {
diff --git a/src/project_mgmt/project.proto b/src/project_mgmt/project.proto
index 97f34d4..5d64ca5 100644
--- a/src/project_mgmt/project.proto
+++ b/src/project_mgmt/project.proto
@@ -8,14 +8,25 @@
 
 option go_package = "go.chromium.org/chromiumos/infra/proto/go/project_mgmt";
 
+// Defines ACLs for a project's builders.
+message BuildbucketAcls {
+  // A list of LUCI Auth Service groups that can view a project's builds.
+  repeated string buildbucket_readers = 1;
+}
+
 // Defines the metadata for a project, which ultimately controls how this
 // project is managed throughout the infrastructure.
 message Project {
   // Defines the git-repo path for the project.
   string repo = 1;
-  // Defines that path that stores all of the project configuration.
+  // Defines the path that stores all of the project configuration.
   // Relative to the git-repo
   string config_path = 2;
+  // Defines the path the repo is checked out to in the source tree, i.e. the
+  // "path" attribute in the manifest.
+  string repo_checkout_path = 3;
+  // Defines ACLs for a project's builders.
+  BuildbucketAcls buildbucket_acls = 4;
 }
 
 message ProjectList {