pipelines

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Jul 20, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ClientPipelineRunner

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

ClientPipelineRunner uses a split client to run pipelines.

func NewRunner

func NewRunner(c client.Client) *ClientPipelineRunner

NewRunner creates a new PipelineRunner that creates PipelineRuns with the provided client.

func (*ClientPipelineRunner) Run

func (c *ClientPipelineRunner) Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)

Run is an implementation of the PipelineRunner interface.

type MockRunner

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

MockRunner is a mock pipeline runner that returns fixed responses to runs.

func NewMockRunner

func NewMockRunner(t *testing.T) *MockRunner

NewMockRunner creates and returns a new mock PipelineRunner.

func (*MockRunner) AssertPipelineRun

func (m *MockRunner) AssertPipelineRun(pipelineName, ns, repoURL, wantSHA string)

AssertPipelineRun ensures that the pipeline run was triggered.

func (*MockRunner) FailWithError

func (m *MockRunner) FailWithError(err error)

FailWithError configures the poller to return errors.

func (*MockRunner) RefutePipelineRun

func (m *MockRunner) RefutePipelineRun(pipelineName, ns, repoURL, wantSHA string)

RefutePipelineRun ensures that the pipeline run was triggered.

func (*MockRunner) Run

func (m *MockRunner) Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)

Run is an implementation of the PipelineRunner interface.

type PipelineRunner

type PipelineRunner interface {
	Run(ctx context.Context, pipelineName, ns, repoURL, sha string) (*pipelinev1.PipelineRun, error)
}

PipelineRunner executes a pipeline by name, passing in the SHA and RepURL as parameters.

Jump to

Keyboard shortcuts

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