Documentation
¶
Index ¶
- func PipelineRunURL(consoleURL, namespace, name string) (string, error)
- type Client
- func (c *Client) CreatePipelineRun(ctxt context.Context, pipelineRun *tekton.PipelineRun, ...) (*tekton.PipelineRun, error)
- func (c *Client) DeletePipelineRun(ctxt context.Context, name string, options metav1.DeleteOptions) error
- func (c *Client) GetPipelineRun(ctxt context.Context, name string, options metav1.GetOptions) (*tekton.PipelineRun, error)
- func (c *Client) ListPipelineRuns(ctxt context.Context, options metav1.ListOptions) (*tekton.PipelineRunList, error)
- func (c *Client) UpdatePipelineRun(ctxt context.Context, pipelineRun *tekton.PipelineRun, ...) (*tekton.PipelineRun, error)
- type ClientConfig
- type ClientInterface
- type ClientPipelineRunInterface
- type TestClient
- func (c *TestClient) CreatePipelineRun(ctxt context.Context, pipeline *tekton.PipelineRun, ...) (*tekton.PipelineRun, error)
- func (c *TestClient) DeletePipelineRun(ctxt context.Context, name string, options metav1.DeleteOptions) error
- func (c *TestClient) GetPipelineRun(ctxt context.Context, name string, options metav1.GetOptions) (*tekton.PipelineRun, error)
- func (c *TestClient) ListPipelineRuns(ctxt context.Context, options metav1.ListOptions) (*tekton.PipelineRunList, error)
- func (c *TestClient) UpdatePipelineRun(ctxt context.Context, pipeline *tekton.PipelineRun, ...) (*tekton.PipelineRun, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func PipelineRunURL ¶
PipelineRunURL returns an URL to the pipeline run given in opts.
Types ¶
type Client ¶
type Client struct {
// contains filtered or unexported fields
}
Client represents a Tekton client, wrapping github.com/tektoncd/pipeline/pkg/client/clientset/versioned.Clientset
func NewClient ¶
func NewClient(clientConfig *ClientConfig) (*Client, error)
NewClient initializes a Tekton client.
func NewInClusterClient ¶
func NewInClusterClient(clientConfig *ClientConfig) (*Client, error)
NewInClusterClient initializes a Tekton client from within a cluster.
func (*Client) CreatePipelineRun ¶
func (c *Client) CreatePipelineRun(ctxt context.Context, pipelineRun *tekton.PipelineRun, options metav1.CreateOptions) (*tekton.PipelineRun, error)
func (*Client) DeletePipelineRun ¶
func (*Client) GetPipelineRun ¶
func (c *Client) GetPipelineRun(ctxt context.Context, name string, options metav1.GetOptions) (*tekton.PipelineRun, error)
func (*Client) ListPipelineRuns ¶
func (c *Client) ListPipelineRuns(ctxt context.Context, options metav1.ListOptions) (*tekton.PipelineRunList, error)
func (*Client) UpdatePipelineRun ¶
func (c *Client) UpdatePipelineRun(ctxt context.Context, pipelineRun *tekton.PipelineRun, options metav1.UpdateOptions) (*tekton.PipelineRun, error)
type ClientConfig ¶
type ClientConfig struct {
// Kubernetes namespace.
Namespace string
// Logger is the logger to send logging messages to.
Logger logging.LeveledLoggerInterface
// TektonClient is the wrapped Tekton client.
TektonClient *tektonClient.Clientset
}
ClientConfig configures a Tekton client.
type ClientInterface ¶
type ClientInterface interface {
ClientPipelineRunInterface
}
type ClientPipelineRunInterface ¶
type ClientPipelineRunInterface interface {
ListPipelineRuns(ctxt context.Context, options metav1.ListOptions) (*tekton.PipelineRunList, error)
GetPipelineRun(ctxt context.Context, name string, options metav1.GetOptions) (*tekton.PipelineRun, error)
CreatePipelineRun(ctxt context.Context, pipelineRun *tekton.PipelineRun, options metav1.CreateOptions) (*tekton.PipelineRun, error)
UpdatePipelineRun(ctxt context.Context, pipelineRun *tekton.PipelineRun, options metav1.UpdateOptions) (*tekton.PipelineRun, error)
DeletePipelineRun(ctxt context.Context, name string, options metav1.DeleteOptions) error
}
type TestClient ¶
type TestClient struct {
// PipelineRuns is the pool of pipeline runs which can be retrieved.
PipelineRuns []*tekton.PipelineRun
// FailCreatePipelineRun lets pipeline run creation fail.
FailCreatePipelineRun bool
// CreatedPipelineRuns is a slice of created pipeline run names.
CreatedPipelineRuns []string
// FailUpdatePipelineRun lets pipeline run update fail.
FailUpdatePipelineRun bool
// UpdatedPipelineRuns is a slice of updated pipeline run names.
UpdatedPipelineRuns []string
// FailDeletePipelineRun lets pipeline run deletion fail.
FailDeletePipelineRun bool
// DeletedPipelineRuns is a slice of deleted pipeline run names.
DeletedPipelineRuns []string
}
TestClient returns mocked pipelines.
func (*TestClient) CreatePipelineRun ¶
func (c *TestClient) CreatePipelineRun(ctxt context.Context, pipeline *tekton.PipelineRun, options metav1.CreateOptions) (*tekton.PipelineRun, error)
func (*TestClient) DeletePipelineRun ¶
func (c *TestClient) DeletePipelineRun(ctxt context.Context, name string, options metav1.DeleteOptions) error
func (*TestClient) GetPipelineRun ¶
func (c *TestClient) GetPipelineRun(ctxt context.Context, name string, options metav1.GetOptions) (*tekton.PipelineRun, error)
func (*TestClient) ListPipelineRuns ¶
func (c *TestClient) ListPipelineRuns(ctxt context.Context, options metav1.ListOptions) (*tekton.PipelineRunList, error)
func (*TestClient) UpdatePipelineRun ¶
func (c *TestClient) UpdatePipelineRun(ctxt context.Context, pipeline *tekton.PipelineRun, options metav1.UpdateOptions) (*tekton.PipelineRun, error)
Click to show internal directories.
Click to hide internal directories.