pipeline_run

package
v0.0.0-...-1ae172a Latest Latest
Warning

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

Go to latest
Published: Oct 8, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// StageActionManualExec 手动触发执行
	StageActionManualExec = "manual_exec"

	// StageActionCancel 取消执行中阶段
	StageActionCancel = "cancel"

	// StageActionCancelReexec 重新执行取消阶段
	StageActionCancelReexec = "cancel_reexec"

	// StageActionReexec 重新执行已执行完成阶段
	StageActionReexec = "reexec"

	// StageActionErrorRetry 失败阶段重试
	StageActionErrorRetry = "error_retry"
)

Variables

This section is empty.

Functions

func MatchBranchSource

func MatchBranchSource(sources types.PipelineSources, branch string) bool

MatchBranchSource 判断是否匹配代码分支源

Types

type BuildForPipelineParams

type BuildForPipelineParams struct {
	BuildIds []*BuildForPipelineParamsBuilds `json:"build_ids"`
}

type BuildForPipelineParamsBuilds

type BuildForPipelineParamsBuilds struct {
	WorkspaceId         uint   `json:"workspace_id"`
	WorkspaceName       string `json:"workspace_name"`
	PipelineId          uint   `json:"pipeline_id"`
	PipelineName        string `json:"pipeline_name"`
	BuildReleaseVersion string `json:"build_release_version"`
	BuildId             uint   `json:"build_id"`
	BuildNumber         uint   `json:"build_number"`
	BuildOperator       string `json:"build_operator"`
	CodeAuthor          string `json:"code_author"`
	CodeBranch          string `json:"code_branch"`
	CodeComment         string `json:"code_comment"`
	CodeCommit          string `json:"code_commit"`
	CodeCommitTime      string `json:"code_commit_time"`
	IsBuild             bool   `json:"is_build" default:"true"`
}

type PipelineRunService

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

func NewPipelineRunService

func NewPipelineRunService(models *model.Models) *PipelineRunService

func (*PipelineRunService) Build

func (r *PipelineRunService) Build(pipelineId uint, buildConfig *types.PipelineBuildConfig, username string) (*types.PipelineRun, error)

func (*PipelineRunService) Get

func (r *PipelineRunService) Get(pipelineRunId uint) *utils.Response

func (*PipelineRunService) InitialCodeEnvs

func (r *PipelineRunService) InitialCodeEnvs(
	pipeline *types.Pipeline,
	workspace *types.PipelineWorkspace,
	codeBranch *types.PipelineBuildCodeBranch,
	envs map[string]interface{}) error

func (*PipelineRunService) InitialEnvs

func (r *PipelineRunService) InitialEnvs(pipeline *types.Pipeline, workspace *types.PipelineWorkspace, params *types.PipelineBuildConfig) (map[string]interface{}, error)

func (*PipelineRunService) JobCallback

func (r *PipelineRunService) JobCallback(jobId uint, status string) error

JobCallback spacelet节点执行完成任务后进行回调,不写数据库,通知controller-manager

func (*PipelineRunService) StageAction

func (r *PipelineRunService) StageAction(
	action string,
	stageRunId uint,
	params StageActionParams) (*types.PipelineRun, *types.PipelineRunStage, error)

type StageActionParams

type StageActionParams struct {
	CustomParams map[string]interface{}
	JobParams    map[uint]map[string]interface{}
}

StageActionParams 阶段执行时参数

Jump to

Keyboard shortcuts

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