artifacts

package
v0.0.0-...-2208570 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2021 License: BSD-2-Clause Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Archive

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

Archive allows interacting with the build artifact repository.

func NewArchive

func NewArchive(lkgPath string, artifactsPath string) *Archive

NewArchive creates a new Archive.

func (*Archive) GetBuildByID

func (a *Archive) GetBuildByID(
	ctx context.Context,
	id string,
	dir string,
	publicKey ssh.PublicKey,
) (*ArtifactsBuild, error)

GetBuildByID returns an ArtifactsBuild for fetching artifacts for the build with the given id.

func (*Archive) GetBuilder

func (a *Archive) GetBuilder(name string) *Builder

GetBuilder returns a Builder with the given name and Archive.

type ArchiveBuild

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

ArchiveBuild represents build artifacts constructed from archives produced by the build. TODO(fxbug.dev/52021): Remove when no longer using archives. Since this is to be deprecated, it should only be used as the backupArchiveBuild of an ArtifactsBuild and does not completely implement the Build interface.

func (*ArchiveBuild) GetBuildArchive

func (b *ArchiveBuild) GetBuildArchive(ctx context.Context) (string, error)

GetBuildArchive downloads and extracts the build-archive.tgz from the build id `buildId`. Returns a path to the directory of the extracted files, or an error if it fails to download or extract.

func (*ArchiveBuild) GetPackageRepository

func (b *ArchiveBuild) GetPackageRepository(ctx context.Context) (*packages.Repository, error)

GetPackageRepository returns a Repository for this build constructed from the packages.tar.gz archive.

type ArtifactsBuild

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

ArtifactsBuild represents the build artifacts for a specific build.

func (*ArtifactsBuild) GetBootserver

func (b *ArtifactsBuild) GetBootserver(ctx context.Context) (string, error)

func (*ArtifactsBuild) GetBuildImages

func (b *ArtifactsBuild) GetBuildImages(ctx context.Context) (string, error)

GetBuildImages downloads the build images for a specific build id. Returns a path to the directory of the downloaded images or an error if it fails to download.

func (*ArtifactsBuild) GetPackageRepository

func (b *ArtifactsBuild) GetPackageRepository(ctx context.Context) (*packages.Repository, error)

GetPackageRepository returns a Repository for this build.

func (*ArtifactsBuild) GetPaver

func (b *ArtifactsBuild) GetPaver(ctx context.Context) (paver.Paver, error)

GetPaver downloads and returns a paver for the build.

func (*ArtifactsBuild) GetPaverDir

func (b *ArtifactsBuild) GetPaverDir(ctx context.Context) (string, error)

func (*ArtifactsBuild) GetSshPublicKey

func (b *ArtifactsBuild) GetSshPublicKey() ssh.PublicKey

func (*ArtifactsBuild) GetVbmetaPath

func (b *ArtifactsBuild) GetVbmetaPath(ctx context.Context) (string, error)

func (*ArtifactsBuild) Pave

func (b *ArtifactsBuild) Pave(ctx context.Context, deviceName string) error

func (*ArtifactsBuild) String

func (b *ArtifactsBuild) String() string

type Build

type Build interface {
	// GetBootserver returns the path to the bootserver used for paving.
	GetBootserver(ctx context.Context) (string, error)

	// GetPackageRepository returns a Repository for this build.
	GetPackageRepository(ctx context.Context) (*packages.Repository, error)

	// GetPaverDir downloads and returns the directory containing the images
	// and image manifest.
	GetPaverDir(ctx context.Context) (string, error)

	// GetPaver downloads and returns a paver for the build.
	GetPaver(ctx context.Context) (paver.Paver, error)

	// GetSshPublicKey returns the SSH public key used by this build's paver.
	GetSshPublicKey() ssh.PublicKey

	// GetVbmetaPath downloads and returns a path to the zircon-a vbmeta image.
	GetVbmetaPath(ctx context.Context) (string, error)
}

type Builder

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

Builder allows fetching build information from a specific builder.

func (*Builder) GetLatestBuild

func (b *Builder) GetLatestBuild(ctx context.Context, dir string, publicKey ssh.PublicKey) (*ArtifactsBuild, error)

GetLatestBuild looks up the latest build for a given builder.

func (*Builder) GetLatestBuildID

func (b *Builder) GetLatestBuildID(ctx context.Context) (string, error)

LookupBuildID looks up the latest build id for a given builder.

func (*Builder) String

func (b *Builder) String() string

type FuchsiaDirBuild

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

func NewFuchsiaDirBuild

func NewFuchsiaDirBuild(dir string, publicKey ssh.PublicKey) *FuchsiaDirBuild

func (*FuchsiaDirBuild) GetBootserver

func (b *FuchsiaDirBuild) GetBootserver(ctx context.Context) (string, error)

func (*FuchsiaDirBuild) GetPackageRepository

func (b *FuchsiaDirBuild) GetPackageRepository(ctx context.Context) (*packages.Repository, error)

func (*FuchsiaDirBuild) GetPaver

func (b *FuchsiaDirBuild) GetPaver(ctx context.Context) (paver.Paver, error)

func (*FuchsiaDirBuild) GetPaverDir

func (b *FuchsiaDirBuild) GetPaverDir(ctx context.Context) (string, error)

func (*FuchsiaDirBuild) GetSshPublicKey

func (b *FuchsiaDirBuild) GetSshPublicKey() ssh.PublicKey

func (*FuchsiaDirBuild) GetVbmetaPath

func (b *FuchsiaDirBuild) GetVbmetaPath(ctx context.Context) (string, error)

func (*FuchsiaDirBuild) String

func (b *FuchsiaDirBuild) String() string

type OmahaBuild

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

func NewOmahaBuild

func NewOmahaBuild(build Build, omahaUrl string, avbtool *avb.AVBTool, zbitool *zbi.ZBITool) *OmahaBuild

func (*OmahaBuild) GetBootserver

func (b *OmahaBuild) GetBootserver(ctx context.Context) (string, error)

func (*OmahaBuild) GetPackageRepository

func (b *OmahaBuild) GetPackageRepository(ctx context.Context) (*packages.Repository, error)

GetPackageRepository returns a Repository for this build.

func (*OmahaBuild) GetPaver

func (b *OmahaBuild) GetPaver(ctx context.Context) (paver.Paver, error)

GetPaver downloads and returns a paver for the build.

func (*OmahaBuild) GetPaverDir

func (b *OmahaBuild) GetPaverDir(ctx context.Context) (string, error)

func (*OmahaBuild) GetSshPublicKey

func (b *OmahaBuild) GetSshPublicKey() ssh.PublicKey

func (*OmahaBuild) GetVbmetaPath

func (b *OmahaBuild) GetVbmetaPath(ctx context.Context) (string, error)

Jump to

Keyboard shortcuts

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