diff --git a/pkg/build/buildkit/build.go b/pkg/build/buildkit/build.go index 5e4ad3c..26e8cd1 100644 --- a/pkg/build/buildkit/build.go +++ b/pkg/build/buildkit/build.go @@ -116,6 +116,9 @@ func (b *BuildKit) Build(ctx context.Context, r *pb.BuildRequest, w io.Writer) ( case "BUILD_KIND_APP_BUILD_WITH_CONTAINER_IMAGE": return b.buildFromContainerImage(ctx, c, r, ow) + case "BUILD_KIND_JOB_CREATE_WITH_CONTAINER_IMAGE": + return b.buildFromContainerImage(ctx, c, r, ow) + case "BUILD_KIND_APP_BUILD_WITH_CONTAINER_FILE": return b.buildFromContainerFile(ctx, c, r, ow) @@ -418,6 +421,11 @@ func callBuildKitBuild(ctx context.Context, c *client.Client, buildContextDir st ID: "tsuru-app-envvars", FilePath: filepath.Join(buildContextDir, "secrets", "envs.sh"), }) + } else if r.Job != nil { + secretSources = append(secretSources, secretsprovider.Source{ + ID: "tsuru-job-envvars", + FilePath: filepath.Join(buildContextDir, "secrets", "envs.sh"), + }) } secrets, err := secretsprovider.NewStore(secretSources) diff --git a/pkg/build/grpc_build_v1/build_service.pb.go b/pkg/build/grpc_build_v1/build_service.pb.go index f37bbe8..c00c8e1 100644 --- a/pkg/build/grpc_build_v1/build_service.pb.go +++ b/pkg/build/grpc_build_v1/build_service.pb.go @@ -5,7 +5,7 @@ // Code generated by protoc-gen-go. DO NOT EDIT. // versions: // protoc-gen-go v1.28.1 -// protoc v3.21.12 +// protoc v4.24.3 // source: pkg/build/grpc_build_v1/build_service.proto package grpc_build_v1 @@ -36,6 +36,7 @@ const ( BuildKind_BUILD_KIND_APP_DEPLOY_WITH_CONTAINER_FILE BuildKind = 3 // tsuru app deploy ... --dockerfile Dockerfile --dockerfile-context ./ BuildKind_BUILD_KIND_PLATFORM_WITH_CONTAINER_IMAGE BuildKind = 5 // tsuru platform add/update ... -i registry.example.com/tsuru/python:latest BuildKind_BUILD_KIND_PLATFORM_WITH_CONTAINER_FILE BuildKind = 6 // tsuru platform add/update ... --dockerfile Dockerfile + BuildKind_BUILD_KIND_JOB_CREATE_WITH_CONTAINER_IMAGE BuildKind = 7 // tsuru job create ... -i registry.example.com/tsuru/my-job:latest ) // Enum value maps for BuildKind. @@ -50,6 +51,7 @@ var ( // Duplicate value: 3: "BUILD_KIND_APP_DEPLOY_WITH_CONTAINER_FILE", 5: "BUILD_KIND_PLATFORM_WITH_CONTAINER_IMAGE", 6: "BUILD_KIND_PLATFORM_WITH_CONTAINER_FILE", + 7: "BUILD_KIND_JOB_CREATE_WITH_CONTAINER_IMAGE", } BuildKind_value = map[string]int32{ "BUILD_KIND_UNSPECIFIED": 0, @@ -61,6 +63,7 @@ var ( "BUILD_KIND_APP_DEPLOY_WITH_CONTAINER_FILE": 3, "BUILD_KIND_PLATFORM_WITH_CONTAINER_IMAGE": 5, "BUILD_KIND_PLATFORM_WITH_CONTAINER_FILE": 6, + "BUILD_KIND_JOB_CREATE_WITH_CONTAINER_IMAGE": 7, } ) @@ -125,6 +128,10 @@ type BuildRequest struct { Containerfile string `protobuf:"bytes,7,opt,name=Containerfile,proto3" json:"Containerfile,omitempty"` // PushOptions contains the options push the generated images. PushOptions *PushOptions `protobuf:"bytes,10,opt,name=push_options,json=pushOptions,proto3" json:"push_options,omitempty"` + // Job is the Tsuru job which is being deployed, if any. + // + // NOTE: mandatory field when build kind starts with BUILD_KIND_JOB_. + Job *TsuruJob `protobuf:"bytes,11,opt,name=job,proto3" json:"job,omitempty"` } func (x *BuildRequest) Reset() { @@ -215,6 +222,13 @@ func (x *BuildRequest) GetPushOptions() *PushOptions { return nil } +func (x *BuildRequest) GetJob() *TsuruJob { + if x != nil { + return x.Job + } + return nil +} + type BuildResponse struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -355,6 +369,63 @@ func (x *TsuruApp) GetEnvVars() map[string]string { return nil } +type TsuruJob struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // Name is the Tsuru job name. + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` + // EnvVars are the enviroment variables set on the job. + EnvVars map[string]string `protobuf:"bytes,3,rep,name=env_vars,json=envVars,proto3" json:"env_vars,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` +} + +func (x *TsuruJob) Reset() { + *x = TsuruJob{} + if protoimpl.UnsafeEnabled { + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TsuruJob) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TsuruJob) ProtoMessage() {} + +func (x *TsuruJob) ProtoReflect() protoreflect.Message { + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use TsuruJob.ProtoReflect.Descriptor instead. +func (*TsuruJob) Descriptor() ([]byte, []int) { + return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{3} +} + +func (x *TsuruJob) GetName() string { + if x != nil { + return x.Name + } + return "" +} + +func (x *TsuruJob) GetEnvVars() map[string]string { + if x != nil { + return x.EnvVars + } + return nil +} + type TsuruPlatform struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -367,7 +438,7 @@ type TsuruPlatform struct { func (x *TsuruPlatform) Reset() { *x = TsuruPlatform{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -380,7 +451,7 @@ func (x *TsuruPlatform) String() string { func (*TsuruPlatform) ProtoMessage() {} func (x *TsuruPlatform) ProtoReflect() protoreflect.Message { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -393,7 +464,7 @@ func (x *TsuruPlatform) ProtoReflect() protoreflect.Message { // Deprecated: Use TsuruPlatform.ProtoReflect.Descriptor instead. func (*TsuruPlatform) Descriptor() ([]byte, []int) { - return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{3} + return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{4} } func (x *TsuruPlatform) GetName() string { @@ -417,7 +488,7 @@ type PushOptions struct { func (x *PushOptions) Reset() { *x = PushOptions{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -430,7 +501,7 @@ func (x *PushOptions) String() string { func (*PushOptions) ProtoMessage() {} func (x *PushOptions) ProtoReflect() protoreflect.Message { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -443,7 +514,7 @@ func (x *PushOptions) ProtoReflect() protoreflect.Message { // Deprecated: Use PushOptions.ProtoReflect.Descriptor instead. func (*PushOptions) Descriptor() ([]byte, []int) { - return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{4} + return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{5} } func (x *PushOptions) GetDisable() bool { @@ -474,7 +545,7 @@ type ContainerImageConfig struct { func (x *ContainerImageConfig) Reset() { *x = ContainerImageConfig{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -487,7 +558,7 @@ func (x *ContainerImageConfig) String() string { func (*ContainerImageConfig) ProtoMessage() {} func (x *ContainerImageConfig) ProtoReflect() protoreflect.Message { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -500,7 +571,7 @@ func (x *ContainerImageConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use ContainerImageConfig.ProtoReflect.Descriptor instead. func (*ContainerImageConfig) Descriptor() ([]byte, []int) { - return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{5} + return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{6} } func (x *ContainerImageConfig) GetEntrypoint() []string { @@ -547,7 +618,7 @@ type TsuruConfig struct { func (x *TsuruConfig) Reset() { *x = TsuruConfig{} if protoimpl.UnsafeEnabled { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -560,7 +631,7 @@ func (x *TsuruConfig) String() string { func (*TsuruConfig) ProtoMessage() {} func (x *TsuruConfig) ProtoReflect() protoreflect.Message { - mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6] + mi := &file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -573,7 +644,7 @@ func (x *TsuruConfig) ProtoReflect() protoreflect.Message { // Deprecated: Use TsuruConfig.ProtoReflect.Descriptor instead. func (*TsuruConfig) Descriptor() ([]byte, []int) { - return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{6} + return file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP(), []int{7} } func (x *TsuruConfig) GetProcfile() string { @@ -603,7 +674,7 @@ var file_pkg_build_grpc_build_v1_build_service_proto_rawDesc = []byte{ 0x0a, 0x2b, 0x70, 0x6b, 0x67, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x73, 0x65, 0x72, 0x76, 0x69, 0x63, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x12, 0x0d, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x22, 0xec, 0x02, 0x0a, + 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x22, 0x97, 0x03, 0x0a, 0x0c, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x2c, 0x0a, 0x04, 0x6b, 0x69, 0x6e, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x18, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, @@ -626,85 +697,101 @@ var file_pkg_build_grpc_build_v1_build_service_proto_rawDesc = []byte{ 0x70, 0x75, 0x73, 0x68, 0x5f, 0x6f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x52, 0x0b, - 0x70, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x72, 0x0a, 0x0d, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, - 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, - 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, - 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, - 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x73, 0x75, 0x72, - 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, - 0x9b, 0x01, 0x0a, 0x08, 0x54, 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x12, 0x12, 0x0a, 0x04, - 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, - 0x12, 0x3f, 0x0a, 0x08, 0x65, 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, - 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, - 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x2e, 0x45, 0x6e, 0x76, 0x56, - 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, - 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, - 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, - 0x0d, 0x54, 0x73, 0x75, 0x72, 0x75, 0x50, 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, - 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, - 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x0b, 0x50, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, - 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x10, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, - 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, - 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, - 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, - 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, - 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, - 0x63, 0x6d, 0x64, 0x12, 0x23, 0x0a, 0x0d, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x70, - 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, - 0x73, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, - 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, - 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, 0x69, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x54, 0x73, - 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, - 0x63, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, - 0x63, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, 0x0a, 0x0a, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, 0x79, - 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x75, 0x72, 0x75, - 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x46, 0x0a, 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, - 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, - 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, - 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, - 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0x9d, 0x03, 0x0a, - 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4b, 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, - 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, - 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, - 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, - 0x49, 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, - 0x44, 0x10, 0x01, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, - 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, - 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, - 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, - 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, - 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, - 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, - 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, - 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, - 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, - 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, - 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2d, - 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, - 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, - 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2c, 0x0a, - 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, - 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, - 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x42, - 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, - 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, - 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x06, 0x1a, 0x02, 0x10, 0x01, 0x32, 0x4f, 0x0a, 0x05, - 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x46, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, - 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, - 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, - 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, - 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, - 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x73, 0x75, 0x72, - 0x75, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, 0x79, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, - 0x6b, 0x67, 0x2f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, - 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x62, 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x70, 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x29, 0x0a, 0x03, 0x6a, + 0x6f, 0x62, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, + 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x4a, 0x6f, + 0x62, 0x52, 0x03, 0x6a, 0x6f, 0x62, 0x22, 0x72, 0x0a, 0x0d, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, + 0x65, 0x73, 0x70, 0x6f, 0x6e, 0x73, 0x65, 0x12, 0x18, 0x0a, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x48, 0x00, 0x52, 0x06, 0x6f, 0x75, 0x74, 0x70, 0x75, + 0x74, 0x12, 0x3f, 0x0a, 0x0c, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, + 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, + 0x66, 0x69, 0x67, 0x48, 0x00, 0x52, 0x0b, 0x74, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x42, 0x06, 0x0a, 0x04, 0x64, 0x61, 0x74, 0x61, 0x22, 0x9b, 0x01, 0x0a, 0x08, 0x54, + 0x73, 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, + 0x6e, 0x76, 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, + 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, + 0x75, 0x72, 0x75, 0x41, 0x70, 0x70, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, + 0x74, 0x72, 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, + 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x9b, 0x01, 0x0a, 0x08, 0x54, 0x73, 0x75, + 0x72, 0x75, 0x4a, 0x6f, 0x62, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x3f, 0x0a, 0x08, 0x65, 0x6e, 0x76, + 0x5f, 0x76, 0x61, 0x72, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x67, 0x72, + 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x54, 0x73, 0x75, 0x72, + 0x75, 0x4a, 0x6f, 0x62, 0x2e, 0x45, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, + 0x79, 0x52, 0x07, 0x65, 0x6e, 0x76, 0x56, 0x61, 0x72, 0x73, 0x1a, 0x3a, 0x0a, 0x0c, 0x45, 0x6e, + 0x76, 0x56, 0x61, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 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, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x23, 0x0a, 0x0d, 0x54, 0x73, 0x75, 0x72, 0x75, 0x50, + 0x6c, 0x61, 0x74, 0x66, 0x6f, 0x72, 0x6d, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x22, 0x54, 0x0a, 0x0b, 0x50, + 0x75, 0x73, 0x68, 0x4f, 0x70, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x64, 0x69, + 0x73, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x64, 0x69, 0x73, + 0x61, 0x62, 0x6c, 0x65, 0x12, 0x2b, 0x0a, 0x11, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, + 0x5f, 0x72, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, + 0x10, 0x69, 0x6e, 0x73, 0x65, 0x63, 0x75, 0x72, 0x65, 0x52, 0x65, 0x67, 0x69, 0x73, 0x74, 0x72, + 0x79, 0x22, 0x8e, 0x01, 0x0a, 0x14, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, + 0x6d, 0x61, 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x6e, + 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x0a, + 0x65, 0x6e, 0x74, 0x72, 0x79, 0x70, 0x6f, 0x69, 0x6e, 0x74, 0x12, 0x10, 0x0a, 0x03, 0x63, 0x6d, + 0x64, 0x18, 0x02, 0x20, 0x03, 0x28, 0x09, 0x52, 0x03, 0x63, 0x6d, 0x64, 0x12, 0x23, 0x0a, 0x0d, + 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x5f, 0x70, 0x6f, 0x72, 0x74, 0x73, 0x18, 0x03, 0x20, + 0x03, 0x28, 0x09, 0x52, 0x0c, 0x65, 0x78, 0x70, 0x6f, 0x73, 0x65, 0x64, 0x50, 0x6f, 0x72, 0x74, + 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x5f, 0x64, 0x69, 0x72, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x77, 0x6f, 0x72, 0x6b, 0x69, 0x6e, 0x67, 0x44, + 0x69, 0x72, 0x22, 0x90, 0x01, 0x0a, 0x0b, 0x54, 0x73, 0x75, 0x72, 0x75, 0x43, 0x6f, 0x6e, 0x66, + 0x69, 0x67, 0x12, 0x1a, 0x0a, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, 0x6c, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x70, 0x72, 0x6f, 0x63, 0x66, 0x69, 0x6c, 0x65, 0x12, 0x1d, + 0x0a, 0x0a, 0x74, 0x73, 0x75, 0x72, 0x75, 0x5f, 0x79, 0x61, 0x6d, 0x6c, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x74, 0x73, 0x75, 0x72, 0x75, 0x59, 0x61, 0x6d, 0x6c, 0x12, 0x46, 0x0a, + 0x0c, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x5f, 0x63, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x23, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, + 0x5f, 0x76, 0x31, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x61, 0x69, 0x6e, 0x65, 0x72, 0x49, 0x6d, 0x61, + 0x67, 0x65, 0x43, 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x52, 0x0b, 0x69, 0x6d, 0x61, 0x67, 0x65, 0x43, + 0x6f, 0x6e, 0x66, 0x69, 0x67, 0x2a, 0xcd, 0x03, 0x0a, 0x09, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x4b, + 0x69, 0x6e, 0x64, 0x12, 0x1a, 0x0a, 0x16, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, + 0x44, 0x5f, 0x55, 0x4e, 0x53, 0x50, 0x45, 0x43, 0x49, 0x46, 0x49, 0x45, 0x44, 0x10, 0x00, 0x12, + 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, + 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, + 0x52, 0x43, 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x2c, 0x0a, 0x28, + 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, + 0x45, 0x50, 0x4c, 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x53, 0x4f, 0x55, 0x52, 0x43, + 0x45, 0x5f, 0x55, 0x50, 0x4c, 0x4f, 0x41, 0x44, 0x10, 0x01, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, + 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, + 0x4c, 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, + 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, + 0x4f, 0x59, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, + 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, 0x02, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, + 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x42, 0x55, 0x49, 0x4c, + 0x44, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, + 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2d, 0x0a, 0x29, 0x42, 0x55, 0x49, 0x4c, 0x44, + 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x41, 0x50, 0x50, 0x5f, 0x44, 0x45, 0x50, 0x4c, 0x4f, 0x59, + 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, + 0x46, 0x49, 0x4c, 0x45, 0x10, 0x03, 0x12, 0x2c, 0x0a, 0x28, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, + 0x4b, 0x49, 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, + 0x54, 0x48, 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, + 0x47, 0x45, 0x10, 0x05, 0x12, 0x2b, 0x0a, 0x27, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, + 0x4e, 0x44, 0x5f, 0x50, 0x4c, 0x41, 0x54, 0x46, 0x4f, 0x52, 0x4d, 0x5f, 0x57, 0x49, 0x54, 0x48, + 0x5f, 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x46, 0x49, 0x4c, 0x45, 0x10, + 0x06, 0x12, 0x2e, 0x0a, 0x2a, 0x42, 0x55, 0x49, 0x4c, 0x44, 0x5f, 0x4b, 0x49, 0x4e, 0x44, 0x5f, + 0x4a, 0x4f, 0x42, 0x5f, 0x43, 0x52, 0x45, 0x41, 0x54, 0x45, 0x5f, 0x57, 0x49, 0x54, 0x48, 0x5f, + 0x43, 0x4f, 0x4e, 0x54, 0x41, 0x49, 0x4e, 0x45, 0x52, 0x5f, 0x49, 0x4d, 0x41, 0x47, 0x45, 0x10, + 0x07, 0x1a, 0x02, 0x10, 0x01, 0x32, 0x4f, 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x46, + 0x0a, 0x05, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x12, 0x1b, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, + 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x71, + 0x75, 0x65, 0x73, 0x74, 0x1a, 0x1c, 0x2e, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x5f, 0x76, 0x31, 0x2e, 0x42, 0x75, 0x69, 0x6c, 0x64, 0x52, 0x65, 0x73, 0x70, 0x6f, 0x6e, + 0x73, 0x65, 0x22, 0x00, 0x30, 0x01, 0x42, 0x37, 0x5a, 0x35, 0x67, 0x69, 0x74, 0x68, 0x75, 0x62, + 0x2e, 0x63, 0x6f, 0x6d, 0x2f, 0x74, 0x73, 0x75, 0x72, 0x75, 0x2f, 0x64, 0x65, 0x70, 0x6c, 0x6f, + 0x79, 0x2d, 0x61, 0x67, 0x65, 0x6e, 0x74, 0x2f, 0x70, 0x6b, 0x67, 0x2f, 0x62, 0x75, 0x69, 0x6c, + 0x64, 0x2f, 0x67, 0x72, 0x70, 0x63, 0x5f, 0x62, 0x75, 0x69, 0x6c, 0x64, 0x5f, 0x76, 0x31, 0x62, + 0x06, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -720,33 +807,37 @@ func file_pkg_build_grpc_build_v1_build_service_proto_rawDescGZIP() []byte { } var file_pkg_build_grpc_build_v1_build_service_proto_enumTypes = make([]protoimpl.EnumInfo, 1) -var file_pkg_build_grpc_build_v1_build_service_proto_msgTypes = make([]protoimpl.MessageInfo, 8) +var file_pkg_build_grpc_build_v1_build_service_proto_msgTypes = make([]protoimpl.MessageInfo, 10) var file_pkg_build_grpc_build_v1_build_service_proto_goTypes = []interface{}{ (BuildKind)(0), // 0: grpc_build_v1.BuildKind (*BuildRequest)(nil), // 1: grpc_build_v1.BuildRequest (*BuildResponse)(nil), // 2: grpc_build_v1.BuildResponse (*TsuruApp)(nil), // 3: grpc_build_v1.TsuruApp - (*TsuruPlatform)(nil), // 4: grpc_build_v1.TsuruPlatform - (*PushOptions)(nil), // 5: grpc_build_v1.PushOptions - (*ContainerImageConfig)(nil), // 6: grpc_build_v1.ContainerImageConfig - (*TsuruConfig)(nil), // 7: grpc_build_v1.TsuruConfig - nil, // 8: grpc_build_v1.TsuruApp.EnvVarsEntry + (*TsuruJob)(nil), // 4: grpc_build_v1.TsuruJob + (*TsuruPlatform)(nil), // 5: grpc_build_v1.TsuruPlatform + (*PushOptions)(nil), // 6: grpc_build_v1.PushOptions + (*ContainerImageConfig)(nil), // 7: grpc_build_v1.ContainerImageConfig + (*TsuruConfig)(nil), // 8: grpc_build_v1.TsuruConfig + nil, // 9: grpc_build_v1.TsuruApp.EnvVarsEntry + nil, // 10: grpc_build_v1.TsuruJob.EnvVarsEntry } var file_pkg_build_grpc_build_v1_build_service_proto_depIdxs = []int32{ - 0, // 0: grpc_build_v1.BuildRequest.kind:type_name -> grpc_build_v1.BuildKind - 3, // 1: grpc_build_v1.BuildRequest.app:type_name -> grpc_build_v1.TsuruApp - 4, // 2: grpc_build_v1.BuildRequest.platform:type_name -> grpc_build_v1.TsuruPlatform - 5, // 3: grpc_build_v1.BuildRequest.push_options:type_name -> grpc_build_v1.PushOptions - 7, // 4: grpc_build_v1.BuildResponse.tsuru_config:type_name -> grpc_build_v1.TsuruConfig - 8, // 5: grpc_build_v1.TsuruApp.env_vars:type_name -> grpc_build_v1.TsuruApp.EnvVarsEntry - 6, // 6: grpc_build_v1.TsuruConfig.image_config:type_name -> grpc_build_v1.ContainerImageConfig - 1, // 7: grpc_build_v1.Build.Build:input_type -> grpc_build_v1.BuildRequest - 2, // 8: grpc_build_v1.Build.Build:output_type -> grpc_build_v1.BuildResponse - 8, // [8:9] is the sub-list for method output_type - 7, // [7:8] is the sub-list for method input_type - 7, // [7:7] is the sub-list for extension type_name - 7, // [7:7] is the sub-list for extension extendee - 0, // [0:7] is the sub-list for field type_name + 0, // 0: grpc_build_v1.BuildRequest.kind:type_name -> grpc_build_v1.BuildKind + 3, // 1: grpc_build_v1.BuildRequest.app:type_name -> grpc_build_v1.TsuruApp + 5, // 2: grpc_build_v1.BuildRequest.platform:type_name -> grpc_build_v1.TsuruPlatform + 6, // 3: grpc_build_v1.BuildRequest.push_options:type_name -> grpc_build_v1.PushOptions + 4, // 4: grpc_build_v1.BuildRequest.job:type_name -> grpc_build_v1.TsuruJob + 8, // 5: grpc_build_v1.BuildResponse.tsuru_config:type_name -> grpc_build_v1.TsuruConfig + 9, // 6: grpc_build_v1.TsuruApp.env_vars:type_name -> grpc_build_v1.TsuruApp.EnvVarsEntry + 10, // 7: grpc_build_v1.TsuruJob.env_vars:type_name -> grpc_build_v1.TsuruJob.EnvVarsEntry + 7, // 8: grpc_build_v1.TsuruConfig.image_config:type_name -> grpc_build_v1.ContainerImageConfig + 1, // 9: grpc_build_v1.Build.Build:input_type -> grpc_build_v1.BuildRequest + 2, // 10: grpc_build_v1.Build.Build:output_type -> grpc_build_v1.BuildResponse + 10, // [10:11] is the sub-list for method output_type + 9, // [9:10] is the sub-list for method input_type + 9, // [9:9] is the sub-list for extension type_name + 9, // [9:9] is the sub-list for extension extendee + 0, // [0:9] is the sub-list for field type_name } func init() { file_pkg_build_grpc_build_v1_build_service_proto_init() } @@ -792,7 +883,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { } } file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TsuruPlatform); i { + switch v := v.(*TsuruJob); i { case 0: return &v.state case 1: @@ -804,7 +895,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { } } file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*PushOptions); i { + switch v := v.(*TsuruPlatform); i { case 0: return &v.state case 1: @@ -816,7 +907,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { } } file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContainerImageConfig); i { + switch v := v.(*PushOptions); i { case 0: return &v.state case 1: @@ -828,6 +919,18 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { } } file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*ContainerImageConfig); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_pkg_build_grpc_build_v1_build_service_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*TsuruConfig); i { case 0: return &v.state @@ -850,7 +953,7 @@ func file_pkg_build_grpc_build_v1_build_service_proto_init() { GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_pkg_build_grpc_build_v1_build_service_proto_rawDesc, NumEnums: 1, - NumMessages: 8, + NumMessages: 10, NumExtensions: 0, NumServices: 1, }, diff --git a/pkg/build/grpc_build_v1/build_service.proto b/pkg/build/grpc_build_v1/build_service.proto index 8cbe457..a695b26 100644 --- a/pkg/build/grpc_build_v1/build_service.proto +++ b/pkg/build/grpc_build_v1/build_service.proto @@ -50,6 +50,11 @@ message BuildRequest { // PushOptions contains the options push the generated images. PushOptions push_options = 10; + + // Job is the Tsuru job which is being deployed, if any. + // + // NOTE: mandatory field when build kind starts with BUILD_KIND_JOB_. + TsuruJob job = 11; } enum BuildKind { @@ -65,6 +70,8 @@ enum BuildKind { BUILD_KIND_PLATFORM_WITH_CONTAINER_IMAGE = 5; // tsuru platform add/update ... -i registry.example.com/tsuru/python:latest BUILD_KIND_PLATFORM_WITH_CONTAINER_FILE = 6; // tsuru platform add/update ... --dockerfile Dockerfile + + BUILD_KIND_JOB_CREATE_WITH_CONTAINER_IMAGE = 7; // tsuru job create ... -i registry.example.com/tsuru/my-job:latest } message BuildResponse { @@ -83,6 +90,13 @@ message TsuruApp { map env_vars = 3; } +message TsuruJob { + // Name is the Tsuru job name. + string name = 1; + // EnvVars are the enviroment variables set on the job. + map env_vars = 3; +} + message TsuruPlatform { // Name is the Tsuru platform name. string name = 1; diff --git a/pkg/build/grpc_build_v1/build_service_grpc.pb.go b/pkg/build/grpc_build_v1/build_service_grpc.pb.go index 5603f3e..4757704 100644 --- a/pkg/build/grpc_build_v1/build_service_grpc.pb.go +++ b/pkg/build/grpc_build_v1/build_service_grpc.pb.go @@ -1,7 +1,7 @@ // Code generated by protoc-gen-go-grpc. DO NOT EDIT. // versions: // - protoc-gen-go-grpc v1.2.0 -// - protoc v3.21.12 +// - protoc v4.24.3 // source: pkg/build/grpc_build_v1/build_service.proto package grpc_build_v1