submit

package
v0.29.1 Latest Latest
Warning

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

Go to latest
Published: Feb 6, 2024 License: MIT Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CommitResolverFactory

type CommitResolverFactory interface {
	NewFromRepository(path string) (metadata.CommitResolver, error)
	NewFromStaticValue(commit *metadata.Commit) metadata.CommitResolver
}

A CommitResolverFactory provides methods for creating a metadata.CommitResolver.

func NewCommitResolverFactory

func NewCommitResolverFactory(logger logger.Logger) CommitResolverFactory

NewCommitResolverFactory returns a CommitResolverFactory that creates CommitResolvers with the default production implementations.

type Submit

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

Submit represents the task of preparing and sending a set of test results to BuildPulse.

func NewSubmit

func NewSubmit(version *metadata.Version, log logger.Logger) *Submit

NewSubmit creates a new Submit instance.

func (*Submit) Init

func (s *Submit) Init(args []string, envs map[string]string, commitResolverFactory CommitResolverFactory) error

Init populates s from args and envs. It returns an error if the required args or environment variables are missing or malformed.

func (*Submit) Run

func (s *Submit) Run() (string, error)

Run packages up the test results and sends them to BuildPulse. It returns the key that uniquely identifies the uploaded object.

Jump to

Keyboard shortcuts

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