Documentation ¶
Index ¶
Constants ¶
View Source
const (
// JobVersion is the metadata key that overrides repo-commit in Started when set.
JobVersion = "job-version"
)
View Source
const Missing = "missing"
Variables ¶
This section is empty.
Functions ¶
func SetVersion ¶
SetVersion ensures that the repoCommit and jobVersion are set appropriately.
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 // The JobVersion key overrides the auto-version set in Started. Metadata Metadata `json:"metadata,omitempty"` // Result is deprecated, use Passed. Result string `json:"result,omitempty"` // TODO(fejta): remove // Use Metadata[JobVersion] or Started.RepoCommit DeprecatedJobVersion string `json:"job-version,omitempty"` // TODO(fejta): remove DeprecatedRevision string `json:"revision,omitempty"` // TODO(fejta): remove DeprecatedRepoVersion string `json:"repo-version,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) Meta ¶
Meta returns the name key if its value is a child object, and true if they key is present.
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"` // Repos holds the RepoVersion of all commits checked out. Repos map[string]string `json:"repos,omitempty"` // {repo: branch_or_pull} map RepoCommit string `json:"repo-commit,omitempty"` // Metadata is deprecated, add to finished.json Metadata Metadata `json:"metadata,omitempty"` // TODO(fejta): remove // Use RepoCommit DeprecatedJobVersion string `json:"job-version,omitempty"` // TODO(fejta): remove DeprecatedRepoVersion string `json:"repo-version,omitempty"` // TODO(fejta): remove }
Started holds the started.json values of the build.
Click to show internal directories.
Click to hide internal directories.