pipeline

package
v1.0.4 Latest Latest
Warning

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

Go to latest
Published: Nov 5, 2023 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Approve

func Approve(ctx context.Context, store store.Store, currentPipeline *model.Pipeline, user *model.User, repo *model.Repo) (*model.Pipeline, error)

Approve update the status to pending for blocked pipeline because of a gated repo and start them afterward

func Cancel

func Cancel(ctx context.Context, store store.Store, repo *model.Repo, user *model.User, pipeline *model.Pipeline) error

Cancel the pipeline and returns the status.

func Create

func Create(ctx context.Context, _store store.Store, repo *model.Repo, pipeline *model.Pipeline) (*model.Pipeline, error)

Create a new pipeline and start it

func Decline

func Decline(ctx context.Context, store store.Store, pipeline *model.Pipeline, user *model.User, repo *model.Repo) (*model.Pipeline, error)

Decline update the status to declined for blocked pipeline because of a gated repo

func Restart

func Restart(ctx context.Context, store store.Store, lastPipeline *model.Pipeline, user *model.User, repo *model.Repo, envs map[string]string) (*model.Pipeline, error)

Restart a pipeline by creating a new one out of the old and start it

func UpdateStatusToDone

func UpdateStatusToDone(store model.UpdatePipelineStore, pipeline model.Pipeline, status model.StatusValue, stopped int64) (*model.Pipeline, error)

func UpdateStepStatus

func UpdateStepStatus(store model.UpdateStepStore, step *model.Step, state rpc.State, started int64) error

func UpdateStepStatusToDone

func UpdateStepStatusToDone(store model.UpdateStepStore, step model.Step, state rpc.State) (*model.Step, error)

func UpdateStepToStatusKilled

func UpdateStepToStatusKilled(store model.UpdateStepStore, step model.Step) (*model.Step, error)

func UpdateStepToStatusSkipped

func UpdateStepToStatusSkipped(store model.UpdateStepStore, step model.Step, stopped int64) (*model.Step, error)

func UpdateStepToStatusStarted

func UpdateStepToStatusStarted(store model.UpdateStepStore, step model.Step, state rpc.State) (*model.Step, error)

func UpdateToStatusDeclined

func UpdateToStatusDeclined(store model.UpdatePipelineStore, pipeline model.Pipeline, reviewer string) (*model.Pipeline, error)

func UpdateToStatusError

func UpdateToStatusError(store model.UpdatePipelineStore, pipeline model.Pipeline, err error) (*model.Pipeline, error)

func UpdateToStatusKilled

func UpdateToStatusKilled(store model.UpdatePipelineStore, pipeline model.Pipeline) (*model.Pipeline, error)

func UpdateToStatusPending

func UpdateToStatusPending(store model.UpdatePipelineStore, pipeline model.Pipeline, reviewer string) (*model.Pipeline, error)

func UpdateToStatusRunning

func UpdateToStatusRunning(store model.UpdatePipelineStore, pipeline model.Pipeline, started int64) (*model.Pipeline, error)

func UpdateWorkflowStatusToDone

func UpdateWorkflowStatusToDone(store model.UpdateWorkflowStore, workflow model.Workflow, state rpc.State) (*model.Workflow, error)

func UpdateWorkflowToStatusSkipped

func UpdateWorkflowToStatusSkipped(store model.UpdateWorkflowStore, workflow model.Workflow) (*model.Workflow, error)

func UpdateWorkflowToStatusStarted

func UpdateWorkflowToStatusStarted(store model.UpdateWorkflowStore, workflow model.Workflow, state rpc.State) (*model.Workflow, error)

Types

type ErrBadRequest

type ErrBadRequest struct {
	Msg string
}

func (ErrBadRequest) Error

func (e ErrBadRequest) Error() string

func (ErrBadRequest) Is added in v1.0.3

func (e ErrBadRequest) Is(target error) bool

type ErrFiltered

type ErrFiltered struct {
	Msg string
}

func (ErrFiltered) Error

func (e ErrFiltered) Error() string

func (*ErrFiltered) Is added in v1.0.3

func (e *ErrFiltered) Is(target error) bool

type ErrNotFound

type ErrNotFound struct {
	Msg string
}

func (ErrNotFound) Error

func (e ErrNotFound) Error() string

func (ErrNotFound) Is added in v1.0.3

func (e ErrNotFound) Is(target error) bool

Jump to

Keyboard shortcuts

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