Documentation
¶
Overview ¶
Package testgrid provides a client for reporting build results to a TestGrid instance.
Index ¶
- Constants
- type TestGrid
- func (t *TestGrid) FinishBuild(ctx context.Context, buildNum int, finished *testgrid.Finished, dir string) error
- func (t *TestGrid) Finished(ctx context.Context, buildNum int) (finished testgrid.Finished, err error)
- func (t *TestGrid) LatestFinished(ctx context.Context) (finished testgrid.Finished, buildNum int, err error)
- func (t *TestGrid) LatestStarted(ctx context.Context) (started testgrid.Started, buildNum int, err error)
- func (t *TestGrid) ListFiles(ctx context.Context, buildNum int, prefix, suffix string) (paths []string, err error)
- func (t *TestGrid) StartBuild(ctx context.Context, started *testgrid.Started) (buildNum int, err error)
- func (t *TestGrid) Started(ctx context.Context, buildNum int) (started testgrid.Started, err error)
- func (t *TestGrid) Suites(ctx context.Context, buildNum int) (suites junit.Suites, err error)
Constants ¶
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 ¶
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.