bootstrap

package
v0.0.0-...-e560ebb Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2021 License: BSD-3-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_infra_chromium_bootstrapper_bootstrap_bootstrap_proto protoreflect.FileDescriptor
View Source
var File_infra_chromium_bootstrapper_bootstrap_chromium_bootstrap_proto protoreflect.FileDescriptor

Functions

This section is empty.

Types

type BootstrapProperties

type BootstrapProperties struct {

	// Details to find the repo and revision containing the builder property
	// files, one of the fields MUST be set
	//
	// Types that are assignable to ConfigProject:
	//	*BootstrapProperties_TopLevelProject_
	//	*BootstrapProperties_DependencyProject_
	ConfigProject isBootstrapProperties_ConfigProject `protobuf_oneof:"config_project"`
	// Required, the path to the properties file, relative to the root of
	// the config repo
	PropertiesFile string `protobuf:"bytes,3,opt,name=properties_file,json=propertiesFile,proto3" json:"properties_file,omitempty"`
	// Required, the executable to bootstrap
	Exe *proto.Executable `protobuf:"bytes,4,opt,name=exe,proto3" json:"exe,omitempty"`
	// contains filtered or unexported fields
}

The input properties consumed by the bootstrapper binary

func (*BootstrapProperties) Descriptor deprecated

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

Deprecated: Use BootstrapProperties.ProtoReflect.Descriptor instead.

func (*BootstrapProperties) GetConfigProject

func (m *BootstrapProperties) GetConfigProject() isBootstrapProperties_ConfigProject

func (*BootstrapProperties) GetDependencyProject

func (*BootstrapProperties) GetExe

func (x *BootstrapProperties) GetExe() *proto.Executable

func (*BootstrapProperties) GetPropertiesFile

func (x *BootstrapProperties) GetPropertiesFile() string

func (*BootstrapProperties) GetTopLevelProject

func (*BootstrapProperties) ProtoMessage

func (*BootstrapProperties) ProtoMessage()

func (*BootstrapProperties) ProtoReflect

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

func (*BootstrapProperties) Reset

func (x *BootstrapProperties) Reset()

func (*BootstrapProperties) String

func (x *BootstrapProperties) String() string

type BootstrapProperties_DependencyProject

type BootstrapProperties_DependencyProject struct {

	// Required, the gitiles repo that contains the DEPS file that will
	// determine the revision of the config repository to retrieve the builder
	// property files from
	TopLevelRepo *GitilesRepo `protobuf:"bytes,1,opt,name=top_level_repo,json=topLevelRepo,proto3" json:"top_level_repo,omitempty"`
	// Required, the ref of the top-level repository to get the DEPS file from
	//
	// If no gitiles input or gerrit change is present, this is the ref that the
	// DEPS file will be checked out from.
	//
	// If a gitiles input or gerrit change is present on the buildbucket build
	// proto, this ref will be ignored (this allows for the flexibility to run
	// trunk try builders against canary branches).
	TopLevelRef string `protobuf:"bytes,2,opt,name=top_level_ref,json=topLevelRef,proto3" json:"top_level_ref,omitempty"`
	// Required, the gitiles repo containing the builder property files
	ConfigRepo *GitilesRepo `protobuf:"bytes,3,opt,name=config_repo,json=configRepo,proto3" json:"config_repo,omitempty"`
	// Required, the path that the config repository is checked out to
	ConfigRepoPath string `protobuf:"bytes,4,opt,name=config_repo_path,json=configRepoPath,proto3" json:"config_repo_path,omitempty"`
	// contains filtered or unexported fields
}

A project where the builder property files are retrieved from a repository whose revision is determined by the DEPS of another repository

func (*BootstrapProperties_DependencyProject) Descriptor deprecated

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

Deprecated: Use BootstrapProperties_DependencyProject.ProtoReflect.Descriptor instead.

func (*BootstrapProperties_DependencyProject) GetConfigRepo

func (*BootstrapProperties_DependencyProject) GetConfigRepoPath

func (x *BootstrapProperties_DependencyProject) GetConfigRepoPath() string

func (*BootstrapProperties_DependencyProject) GetTopLevelRef

func (x *BootstrapProperties_DependencyProject) GetTopLevelRef() string

func (*BootstrapProperties_DependencyProject) GetTopLevelRepo

func (x *BootstrapProperties_DependencyProject) GetTopLevelRepo() *GitilesRepo

func (*BootstrapProperties_DependencyProject) ProtoMessage

func (*BootstrapProperties_DependencyProject) ProtoMessage()

func (*BootstrapProperties_DependencyProject) ProtoReflect

func (*BootstrapProperties_DependencyProject) Reset

func (*BootstrapProperties_DependencyProject) String

type BootstrapProperties_DependencyProject_

type BootstrapProperties_DependencyProject_ struct {
	DependencyProject *BootstrapProperties_DependencyProject `protobuf:"bytes,2,opt,name=dependency_project,json=dependencyProject,proto3,oneof"`
}

type BootstrapProperties_TopLevelProject

type BootstrapProperties_TopLevelProject struct {

	// Required, the gitiles URL of the repository containing the builder
	// property files
	Repo *GitilesRepo `protobuf:"bytes,1,opt,name=repo,proto3" json:"repo,omitempty"`
	// Required, the ref of the repository to find the property files on
	//
	// If no gitiles input or gerrit change is present on the buildbucket build
	// proto, this is the ref that the builder property files will be retrieved
	// from.
	//
	// If a gitiles input or gerrit change is present on the buildbucket build
	// proto, this ref will be ignored (this allows for the flexibility to run
	// trunk try builders against canary branches).
	Ref string `protobuf:"bytes,2,opt,name=ref,proto3" json:"ref,omitempty"`
	// contains filtered or unexported fields
}

A project where the builder property files are retrieved from a specified repository

func (*BootstrapProperties_TopLevelProject) Descriptor deprecated

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

Deprecated: Use BootstrapProperties_TopLevelProject.ProtoReflect.Descriptor instead.

func (*BootstrapProperties_TopLevelProject) GetRef

func (*BootstrapProperties_TopLevelProject) GetRepo

func (*BootstrapProperties_TopLevelProject) ProtoMessage

func (*BootstrapProperties_TopLevelProject) ProtoMessage()

func (*BootstrapProperties_TopLevelProject) ProtoReflect

func (*BootstrapProperties_TopLevelProject) Reset

func (*BootstrapProperties_TopLevelProject) String

type BootstrapProperties_TopLevelProject_

type BootstrapProperties_TopLevelProject_ struct {
	TopLevelProject *BootstrapProperties_TopLevelProject `protobuf:"bytes,1,opt,name=top_level_project,json=topLevelProject,proto3,oneof"`
}

type Bootstrapper

type Bootstrapper struct {
	// contains filtered or unexported fields
}

Bootstrapper reads the $bootstrap properties and communicates with external services to prepare the bootstrapped recipe to run.

func NewBootstrapper

func NewBootstrapper(build *buildbucketpb.Build) (*Bootstrapper, error)

NewBootstrapper creates a new Bootstrapper, returning an error if the $bootstrap property on the build is missing or invalid.

func (*Bootstrapper) ComputeBootstrappedProperties

func (b *Bootstrapper) ComputeBootstrappedProperties(ctx context.Context, gitilesClient *gitiles.Client) (*structpb.Struct, error)

ComputeBootstrappedProperties gets the properties that should be set for the bootstrapped recipe.

The properties will be composed of multiple elements:

  • The properties read from the properties file identified by the config_project and properties_file fields of the build's $bootstrap property.
  • The $build/chromium_bootstrap property will be set with information about the bootstrapping process that the bootstrapped recipe can use to ensure it operates in a manner that is consistent with the bootstrapping process. See chromium_bootstrap.proto for more information.
  • The build's input properties with the $bootstrap property removed. Values specified in the build's properties override properties in the properties file.

func (*Bootstrapper) SetupExe

func (b *Bootstrapper) SetupExe(ctx context.Context, cipdClient *cipd.Client) ([]string, error)

SetupExe fetches the CIPD bundle identified by the exe field of the build's $bootstrap property and returns the command for invoking the executable.

type ChromiumBootstrapModuleProperties

type ChromiumBootstrapModuleProperties struct {

	// Any commits that were accessed by the bootstrapper binary
	//
	// Since the properties should be versioned along with the code, this will
	// enable the bootstrapped executable to check out the same version of the
	// code that the properties were retrieved from.
	Commits []*proto.GitilesCommit `protobuf:"bytes,1,rep,name=commits,proto3" json:"commits,omitempty"`
	// contains filtered or unexported fields
}

The input properties consumed by the chromium_bootstrap recipe module

These will be set by the bootstrapper binary to communicate information about the bootstrap operation that occurred. This enables the bootstrapped executable to operate in a manner consistent with the bootstrapping process.

func (*ChromiumBootstrapModuleProperties) Descriptor deprecated

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

Deprecated: Use ChromiumBootstrapModuleProperties.ProtoReflect.Descriptor instead.

func (*ChromiumBootstrapModuleProperties) GetCommits

func (*ChromiumBootstrapModuleProperties) ProtoMessage

func (*ChromiumBootstrapModuleProperties) ProtoMessage()

func (*ChromiumBootstrapModuleProperties) ProtoReflect

func (*ChromiumBootstrapModuleProperties) Reset

func (*ChromiumBootstrapModuleProperties) String

type GitilesRepo

type GitilesRepo struct {

	// Required, the gitiles host containing the repository
	Host string `protobuf:"bytes,1,opt,name=host,proto3" json:"host,omitempty"`
	// Required, the name of the repo on the host
	Project string `protobuf:"bytes,2,opt,name=project,proto3" json:"project,omitempty"`
	// contains filtered or unexported fields
}

A reference to a gitiles repository that will be accessed as part of the bootstrap process

func (*GitilesRepo) Descriptor deprecated

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

Deprecated: Use GitilesRepo.ProtoReflect.Descriptor instead.

func (*GitilesRepo) GetHost

func (x *GitilesRepo) GetHost() string

func (*GitilesRepo) GetProject

func (x *GitilesRepo) GetProject() string

func (*GitilesRepo) ProtoMessage

func (*GitilesRepo) ProtoMessage()

func (*GitilesRepo) ProtoReflect

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

func (*GitilesRepo) Reset

func (x *GitilesRepo) Reset()

func (*GitilesRepo) String

func (x *GitilesRepo) String() string

Jump to

Keyboard shortcuts

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