Documentation ¶
Overview ¶
Package recipe contains CQ Recipe input proto.
Index ¶
- Variables
- type Input
- func (*Input) Descriptor() ([]byte, []int)deprecated
- func (x *Input) GetActive() bool
- func (x *Input) GetDryRun() bool
- func (x *Input) GetExperimental() bool
- func (x *Input) GetOwnerIsGoogler() bool
- func (x *Input) GetRunMode() string
- func (x *Input) GetTopLevel() bool
- func (*Input) ProtoMessage()
- func (x *Input) ProtoReflect() protoreflect.Message
- func (x *Input) Reset()
- func (x *Input) String() string
- type Output
- func (*Output) Descriptor() ([]byte, []int)deprecated
- func (x *Output) GetRetry() Output_Retry
- func (x *Output) GetReusability() *Output_Reusability
- func (x *Output) GetReuse() []*Output_Reusedeprecated
- func (x *Output) GetTriggeredBuildIds() []int64
- func (*Output) ProtoMessage()
- func (x *Output) ProtoReflect() protoreflect.Message
- func (x *Output) Reset()
- func (x *Output) String() string
- type Output_Retry
- func (Output_Retry) Descriptor() protoreflect.EnumDescriptor
- func (x Output_Retry) Enum() *Output_Retry
- func (Output_Retry) EnumDescriptor() ([]byte, []int)deprecated
- func (x Output_Retry) Number() protoreflect.EnumNumber
- func (x Output_Retry) String() string
- func (Output_Retry) Type() protoreflect.EnumType
- type Output_Reusability
- func (*Output_Reusability) Descriptor() ([]byte, []int)deprecated
- func (x *Output_Reusability) GetModeAllowlist() []string
- func (*Output_Reusability) ProtoMessage()
- func (x *Output_Reusability) ProtoReflect() protoreflect.Message
- func (x *Output_Reusability) Reset()
- func (x *Output_Reusability) String() string
- type Output_Reuse
- func (*Output_Reuse) Descriptor() ([]byte, []int)deprecated
- func (x *Output_Reuse) GetDeny() bool
- func (x *Output_Reuse) GetModeRegexp() string
- func (*Output_Reuse) ProtoMessage()
- func (x *Output_Reuse) ProtoReflect() protoreflect.Message
- func (x *Output_Reuse) Reset()
- func (x *Output_Reuse) String() string
Constants ¶
This section is empty.
Variables ¶
var ( Output_Retry_name = map[int32]string{ 0: "OUTPUT_RETRY_UNSPECIFIED", 1: "OUTPUT_RETRY_ALLOWED", 2: "OUTPUT_RETRY_DENIED", } Output_Retry_value = map[string]int32{ "OUTPUT_RETRY_UNSPECIFIED": 0, "OUTPUT_RETRY_ALLOWED": 1, "OUTPUT_RETRY_DENIED": 2, } )
Enum value maps for Output_Retry.
var File_go_chromium_org_luci_cv_api_recipe_v1_cq_proto protoreflect.FileDescriptor
Functions ¶
This section is empty.
Types ¶
type Input ¶
type Input struct { // If true, CQ is active for the current build. CQ is considered "active" for // a build if CQ triggered the build, either directly or indirectly. Active bool `protobuf:"varint,1,opt,name=active,proto3" json:"active,omitempty"` // If false, CQ would try to submit CL(s) if all other checks pass. // If true, CQ won't try to submit. // // DEPRECATED: Use run_mode instead. DryRun bool `protobuf:"varint,2,opt,name=dry_run,json=dryRun,proto3" json:"dry_run,omitempty"` // If true, CQ will not take this build into account while deciding whether // CL is good or not. See also `experiment_percentage` of CQ's config file. Experimental bool `protobuf:"varint,3,opt,name=experimental,proto3" json:"experimental,omitempty"` // If true, CQ triggered this build directly, otherwise typically indicates a // child build triggered by a CQ triggered one (possibly indirectly). // // Can be spoofed. *DO NOT USE FOR SECURITY CHECKS.* // // One possible use is to distinguish which builds must be cancelled manually, // and which (top_level=True) CQ would cancel itself. TopLevel bool `protobuf:"varint,4,opt,name=top_level,json=topLevel,proto3" json:"top_level,omitempty"` // The mode of the CQ Run that triggers this Tryjob. RunMode string `protobuf:"bytes,5,opt,name=run_mode,json=runMode,proto3" json:"run_mode,omitempty"` // Tells whether the Run owner is a Googler. // // DO NOT USE: This is a temporary workaround for crbug/1259887 which // is supposed to be used by Chromium only. // TODO(crbug/1382195): Remove this field after long term solution is // ready. OwnerIsGoogler bool `protobuf:"varint,20,opt,name=owner_is_googler,json=ownerIsGoogler,proto3" json:"owner_is_googler,omitempty"` // contains filtered or unexported fields }
Input provides CQ metadata for CQ-triggered tryjob.
func (*Input) Descriptor
deprecated
func (*Input) GetExperimental ¶
func (*Input) GetOwnerIsGoogler ¶
func (*Input) GetRunMode ¶
func (*Input) GetTopLevel ¶
func (*Input) ProtoMessage ¶
func (*Input) ProtoMessage()
func (*Input) ProtoReflect ¶
func (x *Input) ProtoReflect() protoreflect.Message
type Output ¶
type Output struct { // Buildbucket build IDs which this build has triggered for CQ to wait on. // // Required when using triggered_by builders in project's CQ config. // This is useful to allow the triggering builder to finish without waiting // for its child builds, which can be efficiently done by CQ. // // This is equivalent to setting legacy top-level "triggered_build_ids" output // property. // TODO(tandrii): deprecate and remove the legacy property. TriggeredBuildIds []int64 `protobuf:"varint,1,rep,packed,name=triggered_build_ids,json=triggeredBuildIds,proto3" json:"triggered_build_ids,omitempty"` // Retry controls whether this build can be retried by CQ. Retry Output_Retry `protobuf:"varint,2,opt,name=retry,proto3,enum=cq.recipe.Output_Retry" json:"retry,omitempty"` // Reuse restricts potential reuse of this build by a later CQ run. // // DEPRECATED in favor of `reusability`. // TODO(crbug/1225047): Remove this after CQDaemon is decommissioned. For now, // CQDaemon will still use this field to decide reusability. // // NOTE: even if reuse is not restricted here, reuse is still subject to other // restrictions in applicable project's CQ config. // // If empty (default), reuse is *allowed*. // // If specified, the order matters: the first matching Reuse message wins. // If specified and no Reuse match the run, reuse is *not allowed*. // If any individual Reuse block is invalid, reuse is *not allowed*. // // Examples: // // 1. To prohibit reuse only for Full runs, do: // {mode_regexp: "fullrun" deny: true} // {mode_regexp: ".+" deny: false} // // 2. To prohibit reuse for everything except Dry Runs, do: // {mode_regexp: "dryrun"} // // Deprecated: Marked as deprecated in go.chromium.org/luci/cv/api/recipe/v1/cq.proto. Reuse []*Output_Reuse `protobuf:"bytes,3,rep,name=reuse,proto3" json:"reuse,omitempty"` // Reusability restricts potential reuse of this build by a later LUCI CV run. // // NOTE: even if reuse is not restricted here, reuse is still subject to other // restrictions in applicable project's CQ config. // // If not specified, reuse is *allowed*. Reusability *Output_Reusability `protobuf:"bytes,4,opt,name=reusability,proto3" json:"reusability,omitempty"` // contains filtered or unexported fields }
Output provides build-specific instructions back to CQ.
Unless stated otherwise, each Output message field can be set even on builds not triggered directly or indirectly by CQ itself. For example, `git cl try` or Gerrit UI can be used to trigger a build directly, which can then instruct CQ not to retry it.
CQ periodically checks the Output of still running builds, too, and may act on the Output even before a build is completed.
func (*Output) Descriptor
deprecated
func (*Output) GetRetry ¶
func (x *Output) GetRetry() Output_Retry
func (*Output) GetReusability ¶
func (x *Output) GetReusability() *Output_Reusability
func (*Output) GetReuse
deprecated
func (x *Output) GetReuse() []*Output_Reuse
Deprecated: Marked as deprecated in go.chromium.org/luci/cv/api/recipe/v1/cq.proto.
func (*Output) GetTriggeredBuildIds ¶
func (*Output) ProtoMessage ¶
func (*Output) ProtoMessage()
func (*Output) ProtoReflect ¶
func (x *Output) ProtoReflect() protoreflect.Message
type Output_Retry ¶
type Output_Retry int32
const ( Output_OUTPUT_RETRY_UNSPECIFIED Output_Retry = 0 // Default. Allow CQ to retry the build. // // Does NOT force CQ to retry this build, since it depends on other factors, // such as the applicable project's CQ config. Output_OUTPUT_RETRY_ALLOWED Output_Retry = 1 // Denies retries regardless of other factors. // // This is equivalent to setting legacy top-level `"do_not_retry": true` // output property. // TODO(tandrii): deprecate and remove the legacy property. Output_OUTPUT_RETRY_DENIED Output_Retry = 2 )
func (Output_Retry) Descriptor ¶
func (Output_Retry) Descriptor() protoreflect.EnumDescriptor
func (Output_Retry) Enum ¶
func (x Output_Retry) Enum() *Output_Retry
func (Output_Retry) EnumDescriptor
deprecated
func (Output_Retry) EnumDescriptor() ([]byte, []int)
Deprecated: Use Output_Retry.Descriptor instead.
func (Output_Retry) Number ¶
func (x Output_Retry) Number() protoreflect.EnumNumber
func (Output_Retry) String ¶
func (x Output_Retry) String() string
func (Output_Retry) Type ¶
func (Output_Retry) Type() protoreflect.EnumType
type Output_Reusability ¶
type Output_Reusability struct { // mode_allowlist specifies modes of LUCI CV Runs that can reuse this build. // // If not provided (or empty), all modes are *allowed* for reuse. ModeAllowlist []string `protobuf:"bytes,4,rep,name=mode_allowlist,json=modeAllowlist,proto3" json:"mode_allowlist,omitempty"` // contains filtered or unexported fields }
func (*Output_Reusability) Descriptor
deprecated
func (*Output_Reusability) Descriptor() ([]byte, []int)
Deprecated: Use Output_Reusability.ProtoReflect.Descriptor instead.
func (*Output_Reusability) GetModeAllowlist ¶
func (x *Output_Reusability) GetModeAllowlist() []string
func (*Output_Reusability) ProtoMessage ¶
func (*Output_Reusability) ProtoMessage()
func (*Output_Reusability) ProtoReflect ¶
func (x *Output_Reusability) ProtoReflect() protoreflect.Message
func (*Output_Reusability) Reset ¶
func (x *Output_Reusability) Reset()
func (*Output_Reusability) String ¶
func (x *Output_Reusability) String() string
type Output_Reuse ¶
type Output_Reuse struct { // Regular expression for modes of Runs for which this Reuse block applies. // Required. // // Implicitly wrapped with (?i)^...$ (= complete case-insensitive match). // // For example, // // ".+" will match all modes of Runs, // "dryrun" and "fullrun" will match only Dry and Full runs, respectively. ModeRegexp string `protobuf:"bytes,1,opt,name=mode_regexp,json=modeRegexp,proto3" json:"mode_regexp,omitempty"` // If deny is true, then reuse of this build in the future Runs of the // matched mode is not allowed. // // If false, then reuse is allowed. It's useful to stop the matching in case // of several Reuse messages. Deny bool `protobuf:"varint,2,opt,name=deny,proto3" json:"deny,omitempty"` // contains filtered or unexported fields }
func (*Output_Reuse) Descriptor
deprecated
func (*Output_Reuse) Descriptor() ([]byte, []int)
Deprecated: Use Output_Reuse.ProtoReflect.Descriptor instead.
func (*Output_Reuse) GetDeny ¶
func (x *Output_Reuse) GetDeny() bool
func (*Output_Reuse) GetModeRegexp ¶
func (x *Output_Reuse) GetModeRegexp() string
func (*Output_Reuse) ProtoMessage ¶
func (*Output_Reuse) ProtoMessage()
func (*Output_Reuse) ProtoReflect ¶
func (x *Output_Reuse) ProtoReflect() protoreflect.Message
func (*Output_Reuse) Reset ¶
func (x *Output_Reuse) Reset()
func (*Output_Reuse) String ¶
func (x *Output_Reuse) String() string