testgrid

package
v0.0.0-...-93e563e Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Overview

Package testgrid provides a client for reporting build results to a TestGrid instance.

Index

Constants

View Source
const (
	// ArtifactsDir contains the persisted artifacts from a build.
	ArtifactsDir = "artifacts"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type TestGrid

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

TestGrid allows reporting to a TestGrid instance.

func NewTestGrid

func NewTestGrid(bucket, prefix string, b64ServiceAccount []byte) (*TestGrid, error)

NewTestGrid for bucket and prefix using b64ServiceAccount (base64 encoded GCloud Service Account JSON key) for auth. Google Cloud Service Account related to b64ServiceAccount must have read/write access to bucket.

A b64ServiceAccount can be obtained through multiple methods documented here: https://cloud.google.com/iam/docs/creating-managing-service-account-keys#creating_service_account_keys

func (*TestGrid) FinishBuild

func (t *TestGrid) FinishBuild(ctx context.Context, buildNum int, finished *testgrid.Finished, dir string) error

FinishBuild uploads build artifacts and a finished record.

func (*TestGrid) Finished

func (t *TestGrid) Finished(ctx context.Context, buildNum int) (finished testgrid.Finished, err error)

Finished retrieves results for buildNum that were created when it finished running.

func (*TestGrid) LatestFinished

func (t *TestGrid) LatestFinished(ctx context.Context) (finished testgrid.Finished, buildNum int, err error)

LatestFinished returns the started record for the latest build.

func (*TestGrid) LatestStarted

func (t *TestGrid) LatestStarted(ctx context.Context) (started testgrid.Started, buildNum int, err error)

LatestStarted returns the started record for the latest build.

func (*TestGrid) ListFiles

func (t *TestGrid) ListFiles(ctx context.Context, buildNum int, prefix, suffix string) (paths []string, err error)

ListFiles returns paths of available files for buildNum that have prefix and suffix.

func (*TestGrid) StartBuild

func (t *TestGrid) StartBuild(ctx context.Context, started *testgrid.Started) (buildNum int, err error)

StartBuild uploads started and updates the latest build to point to it.

func (*TestGrid) Started

func (t *TestGrid) Started(ctx context.Context, buildNum int) (started testgrid.Started, err error)

Started retrieves information for buildNum that was created when it started.

func (*TestGrid) Suites

func (t *TestGrid) Suites(ctx context.Context, buildNum int) (suites junit.Suites, err error)

Suites returns the combined testsuites for the build.

Jump to

Keyboard shortcuts

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