artifacts

package
v0.0.0-...-bbc9ce3 Latest Latest
Warning

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

Go to latest
Published: Dec 6, 2021 License: BSD-2-Clause Imports: 19 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 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, fetchMode BlobFetchMode) (*packages.Repository, error)

GetPackageRepository returns a Repository for this build. It tries to download a package when all the artifacts are stored in individual files, which is how modern builds publish their build artifacts.

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 BlobFetchMode

type BlobFetchMode int
const (
	// PrefetchBlobs will download all the blobs from a build when `GetPackageRepository()` is called.
	PrefetchBlobs BlobFetchMode = iota

	// LazilyFetchBlobs will only download blobs when they are accessed.
	LazilyFetchBlobs
)

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, blobFetchMode BlobFetchMode) (*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, blobFetchMode BlobFetchMode) (*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, blobFetchMode BlobFetchMode) (*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