recipe

package
v0.0.0-...-51f9457 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 9, 2021 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Overview

Package recipe contains CQ Recipe input proto.

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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"`
	// contains filtered or unexported fields
}

Input provides CQ metadata for CQ-triggered tryjob.

func (*Input) Descriptor deprecated

func (*Input) Descriptor() ([]byte, []int)

Deprecated: Use Input.ProtoReflect.Descriptor instead.

func (*Input) GetActive

func (x *Input) GetActive() bool

func (*Input) GetDryRun

func (x *Input) GetDryRun() bool

func (*Input) GetExperimental

func (x *Input) GetExperimental() bool

func (*Input) GetRunMode

func (x *Input) GetRunMode() string

func (*Input) GetTopLevel

func (x *Input) GetTopLevel() bool

func (*Input) ProtoMessage

func (*Input) ProtoMessage()

func (*Input) ProtoReflect

func (x *Input) ProtoReflect() protoreflect.Message

func (*Input) Reset

func (x *Input) Reset()

func (*Input) String

func (x *Input) String() string

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.
	//
	// 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"}
	Reuse []*Output_Reuse `protobuf:"bytes,3,rep,name=reuse,proto3" json:"reuse,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) Descriptor() ([]byte, []int)

Deprecated: Use Output.ProtoReflect.Descriptor instead.

func (*Output) GetRetry

func (x *Output) GetRetry() Output_Retry

func (*Output) GetReuse

func (x *Output) GetReuse() []*Output_Reuse

func (*Output) GetTriggeredBuildIds

func (x *Output) GetTriggeredBuildIds() []int64

func (*Output) ProtoMessage

func (*Output) ProtoMessage()

func (*Output) ProtoReflect

func (x *Output) ProtoReflect() protoreflect.Message

func (*Output) Reset

func (x *Output) Reset()

func (*Output) String

func (x *Output) String() string

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) 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 (Output_Retry) String

func (x Output_Retry) String() string

func (Output_Retry) Type

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"` // TODO(crbug/753103): add reuse duration or deadline.
	// 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

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL