From 956418cae9bef51fb5855c6a7bd881ceeb4fa801 Mon Sep 17 00:00:00 2001 From: Brad Rydzewski Date: Fri, 17 Nov 2017 14:49:01 -0800 Subject: [PATCH] add sysctls to yaml --- .../pipeline/backend/docker/convert.go | 1 + .../cncd/pipeline/pipeline/backend/types.go | 1 + .../pipeline/pipeline/frontend/metadata.go | 3 +- .../frontend/yaml/compiler/convert.go | 1 + .../pipeline/frontend/yaml/container.go | 1 + .../pipeline/frontend/yaml/linter/linter.go | 3 + .../pipeline/rpc/client_grpc_health.go | 63 +++++ .../cncd/pipeline/pipeline/rpc/health.go | 11 + .../pipeline/pipeline/rpc/proto/drone.pb.go | 240 ++++++++++++++---- .../pipeline/pipeline/rpc/proto/drone.proto | 17 ++ vendor/vendor.json | 68 ++--- 11 files changed, 321 insertions(+), 88 deletions(-) create mode 100644 vendor/github.com/cncd/pipeline/pipeline/rpc/client_grpc_health.go create mode 100644 vendor/github.com/cncd/pipeline/pipeline/rpc/health.go diff --git a/vendor/github.com/cncd/pipeline/pipeline/backend/docker/convert.go b/vendor/github.com/cncd/pipeline/pipeline/backend/docker/convert.go index 0b7b5231df..724ad09534 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/backend/docker/convert.go +++ b/vendor/github.com/cncd/pipeline/pipeline/backend/docker/convert.go @@ -49,6 +49,7 @@ func toHostConfig(proc *backend.Step) *container.HostConfig { }, Privileged: proc.Privileged, ShmSize: proc.ShmSize, + Sysctls: proc.Sysctls, } // if len(proc.VolumesFrom) != 0 { diff --git a/vendor/github.com/cncd/pipeline/pipeline/backend/types.go b/vendor/github.com/cncd/pipeline/pipeline/backend/types.go index 01d092344a..e9132d41ba 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/backend/types.go +++ b/vendor/github.com/cncd/pipeline/pipeline/backend/types.go @@ -47,6 +47,7 @@ type ( AuthConfig Auth `json:"auth_config,omitempty"` NetworkMode string `json:"network_mode,omitempty"` IpcMode string `json:"ipc_mode,omitempty"` + Sysctls map[string]string `json:"sysctls,omitempty"` } // Auth defines registry authentication credentials. diff --git a/vendor/github.com/cncd/pipeline/pipeline/frontend/metadata.go b/vendor/github.com/cncd/pipeline/pipeline/frontend/metadata.go index 574e6780fc..6c82514bdb 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/frontend/metadata.go +++ b/vendor/github.com/cncd/pipeline/pipeline/frontend/metadata.go @@ -33,6 +33,7 @@ type ( Remote string `json:"remote,omitempty"` Private bool `json:"private,omitempty"` Secrets []Secret `json:"secrets,omitempty"` + Branch string `json:"default_branch,omitempty"` } // Build defines runtime metadata for a build. @@ -181,7 +182,7 @@ func (m *Metadata) EnvironDrone() map[string]string { "DRONE_REPO_OWNER": owner, "DRONE_REPO_NAME": name, "DRONE_REPO_LINK": m.Repo.Link, - "DRONE_REPO_BRANCH": m.Curr.Commit.Branch, + "DRONE_REPO_BRANCH": m.Repo.Branch, "DRONE_REPO_PRIVATE": fmt.Sprintf("%v", m.Repo.Private), "DRONE_REPO_TRUSTED": "false", // TODO should this be added? "DRONE_REMOTE_URL": m.Repo.Remote, diff --git a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/convert.go b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/convert.go index f815057086..ee39c9bc75 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/convert.go +++ b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/compiler/convert.go @@ -166,6 +166,7 @@ func (c *Compiler) createProcess(name string, container *yaml.Container, section MemSwapLimit: memSwapLimit, MemLimit: memLimit, ShmSize: shmSize, + Sysctls: container.Sysctls, CPUQuota: cpuQuota, CPUShares: cpuShares, CPUSet: cpuSet, diff --git a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/container.go b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/container.go index ffdebb625f..e5975e8c02 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/container.go +++ b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/container.go @@ -55,6 +55,7 @@ type ( Ulimits libcompose.Ulimits `yaml:"ulimits,omitempty"` Volumes libcompose.Volumes `yaml:"volumes,omitempty"` Secrets Secrets `yaml:"secrets,omitempty"` + Sysctls libcompose.SliceorMap `yaml:"sysctls,omitempty"` Constraints Constraints `yaml:"when,omitempty"` Vargs map[string]interface{} `yaml:",inline"` } diff --git a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/linter/linter.go b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/linter/linter.go index 1facc16d45..a458e7e887 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/linter/linter.go +++ b/vendor/github.com/cncd/pipeline/pipeline/frontend/yaml/linter/linter.go @@ -127,6 +127,9 @@ func (l *Linter) lintTrusted(c *yaml.Container) error { if len(c.IpcMode) != 0 { return fmt.Errorf("Insufficient privileges to use ipc_mode") } + if len(c.Sysctls) != 0 { + return fmt.Errorf("Insufficient privileges to use sysctls") + } if c.Networks.Networks != nil && len(c.Networks.Networks) != 0 { return fmt.Errorf("Insufficient privileges to use networks") } diff --git a/vendor/github.com/cncd/pipeline/pipeline/rpc/client_grpc_health.go b/vendor/github.com/cncd/pipeline/pipeline/rpc/client_grpc_health.go new file mode 100644 index 0000000000..b2d9fc2091 --- /dev/null +++ b/vendor/github.com/cncd/pipeline/pipeline/rpc/client_grpc_health.go @@ -0,0 +1,63 @@ +package rpc + +import ( + "context" + // "encoding/json" + "time" + + // "github.com/cncd/pipeline/pipeline/backend" + "github.com/cncd/pipeline/pipeline/rpc/proto" + + "google.golang.org/grpc" + "google.golang.org/grpc/codes" +) + +// generate protobuffs +// protoc --go_out=plugins=grpc,import_path=proto:. *.proto + +type healthClient struct { + client proto.HealthClient + conn *grpc.ClientConn +} + +// NewGrpcHealthClient returns a new grpc Client. +func NewGrpcHealthClient(conn *grpc.ClientConn) Health { + client := new(healthClient) + client.client = proto.NewHealthClient(conn) + client.conn = conn + return client +} + +func (c *healthClient) Close() error { + return c.conn.Close() +} + +func (c *healthClient) Check(ctx context.Context) (bool, error) { + var res *proto.HealthCheckResponse + var err error + req := new(proto.HealthCheckRequest) + + for { + res, err = c.client.Check(ctx, req) + if err == nil { + if res.GetStatus() == proto.HealthCheckResponse_SERVING { + return true, nil + } + return false, nil + } + switch grpc.Code(err) { + case + codes.Aborted, + codes.DataLoss, + codes.DeadlineExceeded, + codes.Internal, + codes.Unavailable: + // non-fatal errors + default: + return false, err + } + <-time.After(backoff) + } + + return true, nil +} diff --git a/vendor/github.com/cncd/pipeline/pipeline/rpc/health.go b/vendor/github.com/cncd/pipeline/pipeline/rpc/health.go new file mode 100644 index 0000000000..1adc02c1b0 --- /dev/null +++ b/vendor/github.com/cncd/pipeline/pipeline/rpc/health.go @@ -0,0 +1,11 @@ +package rpc + +import ( + "context" +) + +// Health defines a health-check connection. +type Health interface { + // Check returns if server is healthy or not + Check(c context.Context) (bool, error) +} diff --git a/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.pb.go b/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.pb.go index ae214962b3..b4dea7c17e 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.pb.go +++ b/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.pb.go @@ -13,6 +13,8 @@ It has these top-level messages: Line Filter Pipeline + HealthCheckRequest + HealthCheckResponse NextRequest NextReply InitRequest @@ -46,6 +48,32 @@ var _ = math.Inf // proto package needs to be updated. const _ = proto1.ProtoPackageIsVersion2 // please upgrade the proto package +type HealthCheckResponse_ServingStatus int32 + +const ( + HealthCheckResponse_UNKNOWN HealthCheckResponse_ServingStatus = 0 + HealthCheckResponse_SERVING HealthCheckResponse_ServingStatus = 1 + HealthCheckResponse_NOT_SERVING HealthCheckResponse_ServingStatus = 2 +) + +var HealthCheckResponse_ServingStatus_name = map[int32]string{ + 0: "UNKNOWN", + 1: "SERVING", + 2: "NOT_SERVING", +} +var HealthCheckResponse_ServingStatus_value = map[string]int32{ + "UNKNOWN": 0, + "SERVING": 1, + "NOT_SERVING": 2, +} + +func (x HealthCheckResponse_ServingStatus) String() string { + return proto1.EnumName(HealthCheckResponse_ServingStatus_name, int32(x)) +} +func (HealthCheckResponse_ServingStatus) EnumDescriptor() ([]byte, []int) { + return fileDescriptor0, []int{6, 0} +} + type File struct { Name string `protobuf:"bytes,1,opt,name=name" json:"name,omitempty"` Proc string `protobuf:"bytes,2,opt,name=proc" json:"proc,omitempty"` @@ -262,6 +290,38 @@ func (m *Pipeline) GetPayload() []byte { return nil } +type HealthCheckRequest struct { + Service string `protobuf:"bytes,1,opt,name=service" json:"service,omitempty"` +} + +func (m *HealthCheckRequest) Reset() { *m = HealthCheckRequest{} } +func (m *HealthCheckRequest) String() string { return proto1.CompactTextString(m) } +func (*HealthCheckRequest) ProtoMessage() {} +func (*HealthCheckRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } + +func (m *HealthCheckRequest) GetService() string { + if m != nil { + return m.Service + } + return "" +} + +type HealthCheckResponse struct { + Status HealthCheckResponse_ServingStatus `protobuf:"varint,1,opt,name=status,enum=proto.HealthCheckResponse_ServingStatus" json:"status,omitempty"` +} + +func (m *HealthCheckResponse) Reset() { *m = HealthCheckResponse{} } +func (m *HealthCheckResponse) String() string { return proto1.CompactTextString(m) } +func (*HealthCheckResponse) ProtoMessage() {} +func (*HealthCheckResponse) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } + +func (m *HealthCheckResponse) GetStatus() HealthCheckResponse_ServingStatus { + if m != nil { + return m.Status + } + return HealthCheckResponse_UNKNOWN +} + type NextRequest struct { Filter *Filter `protobuf:"bytes,1,opt,name=filter" json:"filter,omitempty"` } @@ -269,7 +329,7 @@ type NextRequest struct { func (m *NextRequest) Reset() { *m = NextRequest{} } func (m *NextRequest) String() string { return proto1.CompactTextString(m) } func (*NextRequest) ProtoMessage() {} -func (*NextRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} } +func (*NextRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } func (m *NextRequest) GetFilter() *Filter { if m != nil { @@ -285,7 +345,7 @@ type NextReply struct { func (m *NextReply) Reset() { *m = NextReply{} } func (m *NextReply) String() string { return proto1.CompactTextString(m) } func (*NextReply) ProtoMessage() {} -func (*NextReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} } +func (*NextReply) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } func (m *NextReply) GetPipeline() *Pipeline { if m != nil { @@ -302,7 +362,7 @@ type InitRequest struct { func (m *InitRequest) Reset() { *m = InitRequest{} } func (m *InitRequest) String() string { return proto1.CompactTextString(m) } func (*InitRequest) ProtoMessage() {} -func (*InitRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} } +func (*InitRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } func (m *InitRequest) GetId() string { if m != nil { @@ -325,7 +385,7 @@ type WaitRequest struct { func (m *WaitRequest) Reset() { *m = WaitRequest{} } func (m *WaitRequest) String() string { return proto1.CompactTextString(m) } func (*WaitRequest) ProtoMessage() {} -func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} } +func (*WaitRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } func (m *WaitRequest) GetId() string { if m != nil { @@ -342,7 +402,7 @@ type DoneRequest struct { func (m *DoneRequest) Reset() { *m = DoneRequest{} } func (m *DoneRequest) String() string { return proto1.CompactTextString(m) } func (*DoneRequest) ProtoMessage() {} -func (*DoneRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} } +func (*DoneRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } func (m *DoneRequest) GetId() string { if m != nil { @@ -365,7 +425,7 @@ type ExtendRequest struct { func (m *ExtendRequest) Reset() { *m = ExtendRequest{} } func (m *ExtendRequest) String() string { return proto1.CompactTextString(m) } func (*ExtendRequest) ProtoMessage() {} -func (*ExtendRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} } +func (*ExtendRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } func (m *ExtendRequest) GetId() string { if m != nil { @@ -382,7 +442,7 @@ type UploadRequest struct { func (m *UploadRequest) Reset() { *m = UploadRequest{} } func (m *UploadRequest) String() string { return proto1.CompactTextString(m) } func (*UploadRequest) ProtoMessage() {} -func (*UploadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} } +func (*UploadRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } func (m *UploadRequest) GetId() string { if m != nil { @@ -406,7 +466,7 @@ type UpdateRequest struct { func (m *UpdateRequest) Reset() { *m = UpdateRequest{} } func (m *UpdateRequest) String() string { return proto1.CompactTextString(m) } func (*UpdateRequest) ProtoMessage() {} -func (*UpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} } +func (*UpdateRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } func (m *UpdateRequest) GetId() string { if m != nil { @@ -430,7 +490,7 @@ type LogRequest struct { func (m *LogRequest) Reset() { *m = LogRequest{} } func (m *LogRequest) String() string { return proto1.CompactTextString(m) } func (*LogRequest) ProtoMessage() {} -func (*LogRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} } +func (*LogRequest) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{15} } func (m *LogRequest) GetId() string { if m != nil { @@ -452,7 +512,7 @@ type Empty struct { func (m *Empty) Reset() { *m = Empty{} } func (m *Empty) String() string { return proto1.CompactTextString(m) } func (*Empty) ProtoMessage() {} -func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} } +func (*Empty) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{16} } func init() { proto1.RegisterType((*File)(nil), "proto.File") @@ -460,6 +520,8 @@ func init() { proto1.RegisterType((*Line)(nil), "proto.Line") proto1.RegisterType((*Filter)(nil), "proto.Filter") proto1.RegisterType((*Pipeline)(nil), "proto.Pipeline") + proto1.RegisterType((*HealthCheckRequest)(nil), "proto.HealthCheckRequest") + proto1.RegisterType((*HealthCheckResponse)(nil), "proto.HealthCheckResponse") proto1.RegisterType((*NextRequest)(nil), "proto.NextRequest") proto1.RegisterType((*NextReply)(nil), "proto.NextReply") proto1.RegisterType((*InitRequest)(nil), "proto.InitRequest") @@ -470,6 +532,7 @@ func init() { proto1.RegisterType((*UpdateRequest)(nil), "proto.UpdateRequest") proto1.RegisterType((*LogRequest)(nil), "proto.LogRequest") proto1.RegisterType((*Empty)(nil), "proto.Empty") + proto1.RegisterEnum("proto.HealthCheckResponse_ServingStatus", HealthCheckResponse_ServingStatus_name, HealthCheckResponse_ServingStatus_value) } // Reference imports to suppress errors if they are not otherwise used. @@ -775,50 +838,121 @@ var _Drone_serviceDesc = grpc.ServiceDesc{ Metadata: "drone.proto", } +// Client API for Health service + +type HealthClient interface { + Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) +} + +type healthClient struct { + cc *grpc.ClientConn +} + +func NewHealthClient(cc *grpc.ClientConn) HealthClient { + return &healthClient{cc} +} + +func (c *healthClient) Check(ctx context.Context, in *HealthCheckRequest, opts ...grpc.CallOption) (*HealthCheckResponse, error) { + out := new(HealthCheckResponse) + err := grpc.Invoke(ctx, "/proto.Health/Check", in, out, c.cc, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// Server API for Health service + +type HealthServer interface { + Check(context.Context, *HealthCheckRequest) (*HealthCheckResponse, error) +} + +func RegisterHealthServer(s *grpc.Server, srv HealthServer) { + s.RegisterService(&_Health_serviceDesc, srv) +} + +func _Health_Check_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(HealthCheckRequest) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(HealthServer).Check(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/proto.Health/Check", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(HealthServer).Check(ctx, req.(*HealthCheckRequest)) + } + return interceptor(ctx, in, info, handler) +} + +var _Health_serviceDesc = grpc.ServiceDesc{ + ServiceName: "proto.Health", + HandlerType: (*HealthServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "Check", + Handler: _Health_Check_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "drone.proto", +} + func init() { proto1.RegisterFile("drone.proto", fileDescriptor0) } var fileDescriptor0 = []byte{ - // 661 bytes of a gzipped FileDescriptorProto - 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 0xed, 0x6a, 0xd4, 0x4c, - 0x14, 0x7e, 0xb3, 0xf9, 0xe8, 0xee, 0x49, 0xfb, 0x5a, 0x87, 0x2a, 0x71, 0x45, 0xba, 0x04, 0x84, - 0x55, 0x61, 0xc1, 0x55, 0xb0, 0x0a, 0x82, 0xd2, 0x0f, 0x10, 0xd6, 0x22, 0x23, 0xe2, 0x4f, 0x49, - 0x9b, 0xd3, 0x3a, 0x98, 0xcd, 0xc4, 0x64, 0x2a, 0x1b, 0x2f, 0xc1, 0x6b, 0xf0, 0xea, 0xbc, 0x07, - 0xff, 0xcb, 0x99, 0x99, 0xa4, 0xd9, 0x76, 0x2b, 0x48, 0x7f, 0xed, 0xf9, 0x78, 0x66, 0xce, 0x73, - 0x9e, 0x67, 0xb2, 0x10, 0xa6, 0xa5, 0xcc, 0x71, 0x52, 0x94, 0x52, 0x49, 0xe6, 0xeb, 0x9f, 0xf8, - 0x97, 0x03, 0xde, 0x81, 0xc8, 0x90, 0x31, 0xf0, 0xf2, 0x64, 0x8e, 0x91, 0x33, 0x72, 0xc6, 0x03, - 0xae, 0x63, 0xaa, 0x15, 0xa5, 0x3c, 0x8e, 0x7a, 0xa6, 0x46, 0x31, 0xd5, 0xe6, 0x62, 0x8e, 0x91, - 0x6b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, 0x57, - 0xcd, 0x78, 0x05, 0x1b, 0x1f, 0x0a, 0xd2, 0xef, 0xaa, 0x29, 0xdb, 0xe0, 0x9d, 0x88, 0xac, 0x19, - 0x12, 0x76, 0x3e, 0x45, 0xae, 0x1b, 0xf1, 0x2e, 0xdd, 0x90, 0xd2, 0xcc, 0x6b, 0xf0, 0x7c, 0x09, - 0x30, 0x93, 0xa7, 0x7f, 0xe1, 0xa0, 0x3d, 0x59, 0xe6, 0x40, 0x9f, 0x07, 0xd7, 0x8d, 0x78, 0x0d, - 0xfc, 0xfd, 0x79, 0xa1, 0xea, 0xe9, 0xef, 0x1e, 0xf8, 0x7b, 0xf4, 0x87, 0xc6, 0x26, 0xe0, 0x91, - 0xb1, 0x8c, 0x59, 0x74, 0xe7, 0x6d, 0x0c, 0x37, 0x97, 0x6a, 0x45, 0x56, 0xc7, 0xff, 0xb1, 0x87, - 0xe0, 0x91, 0x9d, 0x2d, 0xbe, 0xe3, 0xed, 0xb0, 0xa1, 0xac, 0x67, 0x18, 0x2c, 0xf9, 0xd6, 0x62, - 0x3b, 0x26, 0xae, 0xc2, 0x92, 0x89, 0x2d, 0xb6, 0xe3, 0xe8, 0x25, 0xec, 0x04, 0x02, 0xe3, 0x16, - 0xdb, 0x6a, 0x3a, 0x5d, 0xf3, 0x56, 0xe1, 0x8d, 0xf4, 0x2d, 0x7e, 0xc9, 0x89, 0xd5, 0x78, 0x32, - 0xbb, 0x83, 0xef, 0x78, 0x7f, 0x09, 0x3f, 0x06, 0x77, 0x26, 0x4f, 0xd9, 0xcd, 0x46, 0xf0, 0xd6, - 0xa1, 0x8b, 0xc8, 0xa3, 0x40, 0xa7, 0x4f, 0xfe, 0x04, 0x00, 0x00, 0xff, 0xff, 0xe9, 0x21, 0xb6, - 0xce, 0x4e, 0x06, 0x00, 0x00, + // 780 bytes of a gzipped FileDescriptorProto + 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xa4, 0x54, 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, 0x89, 0xec, 0xec, 0x83, 0x2e, 0x6f, 0x39, 0x79, 0x07, 0x9a, 0xb8, 0xe9, + 0x64, 0x7d, 0xde, 0xed, 0x97, 0xd5, 0xcd, 0xc5, 0x0f, 0xc3, 0xa9, 0x2e, 0x52, 0x2f, 0xff, 0x06, + 0x00, 0x00, 0xff, 0xff, 0x59, 0x78, 0xda, 0x5d, 0x5e, 0x07, 0x00, 0x00, } diff --git a/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.proto b/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.proto index 49ec122e66..97345e291e 100644 --- a/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.proto +++ b/vendor/github.com/cncd/pipeline/pipeline/rpc/proto/drone.proto @@ -39,6 +39,19 @@ message Pipeline { bytes payload = 3; } +message HealthCheckRequest { + string service = 1; +} + +message HealthCheckResponse { + enum ServingStatus { + UNKNOWN = 0; + SERVING = 1; + NOT_SERVING = 2; + } + ServingStatus status = 1; +} + service Drone { rpc Next (NextRequest) returns (NextReply) {} rpc Init (InitRequest) returns (Empty) {} @@ -50,6 +63,10 @@ service Drone { rpc Log (LogRequest) returns (Empty) {} } +service Health { + rpc Check(HealthCheckRequest) returns (HealthCheckResponse); +} + // // next // diff --git a/vendor/vendor.json b/vendor/vendor.json index 3cf7bd4c55..2541178b77 100644 --- a/vendor/vendor.json +++ b/vendor/vendor.json @@ -195,80 +195,80 @@ { "checksumSHA1": "W3AuK8ocqHwlUajGmQLFvnRhTZE=", "path": "github.com/cncd/pipeline/pipeline", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "gc+efbEPGdecp6I2ezd6J3+UL3o=", + "checksumSHA1": "iRKdpheRPBTP0DKTQH7zmE2PI34=", "path": "github.com/cncd/pipeline/pipeline/backend", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "IIuOItGMhYP6kLtlZWYBO+liSx4=", + "checksumSHA1": "EHJGG1USUliP8nzNWV/axO5KLzw=", "path": "github.com/cncd/pipeline/pipeline/backend/docker", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "2A3+CnkMfvvO4oRkjQKqi44no0g=", + "checksumSHA1": "HWV2BBLXS4gY5eLJeNIg7Z6nAOA=", "path": "github.com/cncd/pipeline/pipeline/frontend", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "VZEf4sUe0jVi3TPXE+gfjpKtXFA=", + "checksumSHA1": "a31aG4R3OK0t87whuZ5IWbSD1uc=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "Bso8L5AC/YA4k+YVfIg+m2bMLmU=", + "checksumSHA1": "cdjOSSSS5Gzx7gRLNvObQvNJWYg=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/compiler", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "tExCYtVZoTnfEkEQL7r/megor8I=", + "checksumSHA1": "Sj2VYU+asWToYriIqcinav5MJZo=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/linter", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { "checksumSHA1": "kx2sPUIMozPC/g6E4w48h3FfH3k=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/matrix", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { "checksumSHA1": "L7Q5qJmPITNmvFEEaj5MPwCWFRk=", "path": "github.com/cncd/pipeline/pipeline/frontend/yaml/types", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { "checksumSHA1": "2/3f3oNmxXy5kcrRLCFa24Oc9O4=", "path": "github.com/cncd/pipeline/pipeline/interrupt", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { "checksumSHA1": "uOjTfke7Qxosrivgz/nVTHeIP5g=", "path": "github.com/cncd/pipeline/pipeline/multipart", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "pyaqbQRdFkOGTE0mSNou27ikvfs=", + "checksumSHA1": "5oiGroE8hLXcj9hcZ+GGoBEm3o0=", "path": "github.com/cncd/pipeline/pipeline/rpc", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { - "checksumSHA1": "huYd+DhpBP/0kHMAC0mPZAZBmnw=", + "checksumSHA1": "N+3wNQ8hc/6yrh3FxbaxkEVwrkY=", "path": "github.com/cncd/pipeline/pipeline/rpc/proto", - "revision": "b7427ae1fb86bb04e2997e5f3a1eec75c4b056ef", - "revisionTime": "2017-09-14T17:45:32Z" + "revision": "82706703c87f88a632674484e095e494c0e30e34", + "revisionTime": "2017-11-17T22:46:28Z" }, { "checksumSHA1": "7Qj1DK0ceAXkYztW0l3+L6sn+V8=",