omaha

package
Version: 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: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var UpdateWithOmaha = &subcommands.Command{
	UsageLine: `update-with-omaha [FLAGS...] -output_json /path/to/output.json`,
	ShortDesc: "update stable version with omaha files",
	LongDesc: `update stable vesrion with omaha json file in GS.

This command is for builder to get up-to-date stable version from omaha file in GS,
and commit them to stable version config file.
Do not use this command as part of scripts or pipelines as it's unstable.

Output is JSON encoded protobuf defined at
https://chromium.googlesource.com/chromiumos/infra/proto/+/refs/heads/main/src/lab_platform/stable_version.proto`,
	CommandRun: func() subcommands.CommandRun {
		c := &updateWithOmahaRun{}
		c.authFlags.Register(&c.Flags, site.DefaultAuthOptions)
		c.Flags.StringVar(&c.outputPath, "output_json", "", "Path where JSON encoded lab_platform.StableVersions should be written.")
		c.Flags.BoolVar(&c.dryRun, "dryrun", false, "indicate if it's a dryrun for stable version update")

		return c
	},
}

UpdateWithOmaha subcommand: read stable version in omaha json file in GS.

Functions

func FileBuilder

func FileBuilder(
	ctx context.Context,
	oldSV *sv.StableVersions,
	newSV []*sv.StableCrosVersion,
	fvFunc FirmwareVersionFunc,
) (*sv.StableVersions, error)

FileBuilder takes the old file, the new CrOS entries from Omaha, a Google Storage client, and an output directory and returns the new stable version file.

Types

type FirmwareVersionFunc

type FirmwareVersionFunc func(
	ctx context.Context,
	board string,
	version string,
) ([]*sv.StableFirmwareVersion, error)

FirmwareVersionFunc is a type that takes a board and version and returns a firmware version

func MakeFirmwareVersionFunc

func MakeFirmwareVersionFunc(gsc gslibClient, outDir string) FirmwareVersionFunc

MakeFirmwareVersionFunc takes a gslibClient and a temporary directory and returns a function that can convert a board and version into stable firmware versions.

Jump to

Keyboard shortcuts

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