metadata

package
v0.0.0-...-9196d9a Latest Latest
Warning

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

Go to latest
Published: Apr 9, 2024 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Finished

type Finished struct {
	// Timestamp is UTC epoch seconds when the job finished.
	// An empty value indicates an incomplete job.
	Timestamp *int64 `json:"timestamp,omitempty"`
	// Passed is true when the job completes successfully.
	Passed *bool `json:"passed"`
	// Metadata holds data computed by the job at runtime.
	// For example, the version of a binary downloaded at runtime
	Metadata Metadata `json:"metadata,omitempty"`

	// JobVersion provides a way for jobs to set/override the version at runtime.
	// Should take precedence over Started.RepoVersion whenever set.
	JobVersion string `json:"job-version,omitempty"`

	// Result is deprecated, use Passed.
	Result string `json:"result,omitempty"` // TODO(fejta): remove
	// Revision is deprecated, use RepoVersion in started.json
	Revision string `json:"revision,omitempty"` // TODO(fejta): remove
}

Finished holds the finished.json values of the build

type Metadata

type Metadata map[string]interface{}

Metadata holds the finished.json values in the metadata key.

Metadata values can either be string or string map of strings

TODO(fejta): figure out which of these we want and document them Special values: infra-commit, repos, repo, repo-commit, links, others

func (Metadata) Keys

func (m Metadata) Keys() []string

Keys returns an array of the keys of all valid Metadata values.

func (Metadata) Meta

func (m Metadata) Meta(name string) (*Metadata, bool)

Meta returns the name key if its value is a child object, and true if they key is present.

func (Metadata) String

func (m Metadata) String(name string) (*string, bool)

String returns the name key if its value is a string, and true if the key is present.

func (Metadata) Strings

func (m Metadata) Strings() map[string]string

Strings returns the submap of values in the map that are strings.

type Started

type Started struct {
	// Timestamp is UTC epoch seconds when the job started.
	Timestamp int64 `json:"timestamp"` // epoch seconds
	// Node holds the name of the machine that ran the job.
	Node string `json:"node,omitempty"`

	// Pull holds the PR number the primary repo is testing
	Pull string `json:"pull,omitempty"`
	// RepoVersion holds the git revision of the primary repo
	RepoVersion string `json:"repo-version,omitempty"`
	// Repos holds the RepoVersion of all commits checked out.
	Repos map[string]string `json:"repos,omitempty"` // {repo: branch_or_pull} map

	// Metadata is deprecated, add to finished.json
	Metadata Metadata `json:"metadata,omitempty"` // TODO(fejta): remove

}

Started holds the started.json values of the build.

Directories

Path Synopsis
Package junit describes the test-infra definition of "junit", and provides utilities to parse it.
Package junit describes the test-infra definition of "junit", and provides utilities to parse it.

Jump to

Keyboard shortcuts

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