pipelinesvc

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: AGPL-3.0 Imports: 63 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type OperateAction

type OperateAction string
var (
	OpDisableTask OperateAction = "DISABLE-TASK"
	OpEnableTask  OperateAction = "ENABLE-TASK"
	OpPauseTask   OperateAction = "PAUSE-TASK"
	OpUnpauseTask OperateAction = "UNPAUSE-TASK"
)

type PipelineSvc

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

func New

func New(appSvc *appsvc.AppSvc, crondSvc *crondsvc.CrondSvc,
	actionAgentSvc *actionagentsvc.ActionAgentSvc, extMarketSvc *extmarketsvc.ExtMarketSvc,
	pipelineCronSvc *pipelinecronsvc.PipelineCronSvc, permissionSvc *permissionsvc.PermissionSvc,
	queueManage *queuemanage.QueueManage,
	dbClient *dbclient.Client, bdl *bundle.Bundle, publisher *websocket.Publisher,
	engine *pipengine.Engine, js jsonstore.JsonStore, etcd *etcd.Store) *PipelineSvc

func (*PipelineSvc) AllValidBranchWorkspaces

func (s *PipelineSvc) AllValidBranchWorkspaces(appID uint64) (map[string]string, error)

func (*PipelineSvc) BatchConvert2PagePipeline

func (s *PipelineSvc) BatchConvert2PagePipeline(pipelines []spec.Pipeline) []apistructs.PagePipeline

func (*PipelineSvc) BatchCreate

func (*PipelineSvc) BatchCreateLabels added in v1.0.1

func (s *PipelineSvc) BatchCreateLabels(createReq *apistructs.PipelineLabelBatchInsertRequest) error

func (*PipelineSvc) Cancel

func (*PipelineSvc) ClusterHook added in v1.1.0

func (s *PipelineSvc) ClusterHook(clusterEvent apistructs.ClusterEvent) error

ClusterHook listen and dispatch cluster event from eventbox

func (*PipelineSvc) ContinueCompensate

func (s *PipelineSvc) ContinueCompensate()

func (*PipelineSvc) Convert2PagePipeline

func (s *PipelineSvc) Convert2PagePipeline(p *spec.Pipeline) *apistructs.PagePipeline

func (*PipelineSvc) ConvertPipeline

func (s *PipelineSvc) ConvertPipeline(p *spec.Pipeline) *apistructs.PipelineDTO

func (*PipelineSvc) Create

Deprecated

func (*PipelineSvc) CreateV2

func (*PipelineSvc) CronNotExecuteCompensateById

func (s *PipelineSvc) CronNotExecuteCompensateById(id uint64) error

func (*PipelineSvc) DealPipelineCallbackOfAction

func (s *PipelineSvc) DealPipelineCallbackOfAction(data []byte) (err error)

func (*PipelineSvc) Delete

func (s *PipelineSvc) Delete(pipelineID uint64) error

func (*PipelineSvc) Detail

func (s *PipelineSvc) Detail(pipelineID uint64) (*apistructs.PipelineDetailDTO, error)

func (*PipelineSvc) FetchPlatformSecrets

func (s *PipelineSvc) FetchPlatformSecrets(p *spec.Pipeline, ignoreKeys []string) (map[string]string, error)

FetchPlatformSecrets 获取平台级别 secrets ignoreKeys: 平台只生成不在 ignoreKeys 列表中的 secrets

func (*PipelineSvc) FetchSecrets

func (s *PipelineSvc) FetchSecrets(p *spec.Pipeline) (secrets, cmsDiceFiles map[string]string, holdOnKeys []string, err error)

FetchSecrets return secrets, cmsDiceFiles and error. holdOnKeys: 声明 key 需要持有,不能被平台 secrets 覆盖,与 ignoreKeys 配合使用

func (*PipelineSvc) Get

func (s *PipelineSvc) Get(pipelineID uint64) (*spec.Pipeline, error)

func (*PipelineSvc) GetOpenapiOAuth2TokenForActionInvokeOpenapi

func (s *PipelineSvc) GetOpenapiOAuth2TokenForActionInvokeOpenapi(task *spec.PipelineTask) (*apistructs.OpenapiOAuth2Token, error)

func (*PipelineSvc) HandleQueryPipelineYamlBySnippetConfigs added in v1.1.0

func (s *PipelineSvc) HandleQueryPipelineYamlBySnippetConfigs(sourceSnippetConfigs []apistructs.SnippetConfig) (map[string]string, error)

handleQueryPipelineYamlBySnippetConfigs 统一查询 snippetConfigs

func (*PipelineSvc) List

func (*PipelineSvc) ListLabels added in v1.0.1

func (*PipelineSvc) Operate

func (s *PipelineSvc) Operate(pipelineID uint64, req *apistructs.PipelineOperateRequest) error

func (*PipelineSvc) PipelineYmlGraph

func (*PipelineSvc) PreCheck

func (s *PipelineSvc) PreCheck(p *spec.Pipeline) error

func (*PipelineSvc) QueryDetails added in v1.1.0

handleQueryPipelineYamlBySnippetConfigs 统一查询 snippetConfigs

func (*PipelineSvc) Rerun

Rerun commit 不变

func (*PipelineSvc) RerunFailed

func (*PipelineSvc) RunCronPipelineFunc

func (s *PipelineSvc) RunCronPipelineFunc(id uint64)

RunCronPipelineFunc 定时触发时会先创建 pipeline 记录,然后尝试执行; 如果因为某些因素(比如并行数量限制)不能立即执行,用户后续仍然可以再次手动执行这条 pipeline。

func (*PipelineSvc) RunPipeline

func (s *PipelineSvc) RunPipeline(req *apistructs.PipelineRunRequest) (*spec.Pipeline, error)

func (*PipelineSvc) SimplePipelineBaseDetail added in v1.1.0

func (s *PipelineSvc) SimplePipelineBaseDetail(pipelineID uint64) (*apistructs.PipelineDetailDTO, error)

func (*PipelineSvc) Statistic

func (s *PipelineSvc) Statistic(source, clusterName string) (*apistructs.PipelineStatisticResponseData, error)

Statistic pipeline 运行情况统计

func (*PipelineSvc) SyncAfterSplitTable

func (s *PipelineSvc) SyncAfterSplitTable()

SyncAfterSplitTable 表结构拆分后,extra 表里有些字段需要移动 commit 字段处理:移动到 commit_detail 中,并将 commit 字段置空作为标志位 org_name 字段处理:移动到 normal_labels 中,简单起见,同样使用 commit 字段为空作为标志位

func (*PipelineSvc) TaskDetail

func (s *PipelineSvc) TaskDetail(taskID uint64) (*spec.PipelineTask, error)

func (*PipelineSvc) UpdatePipelineCron

func (s *PipelineSvc) UpdatePipelineCron(p *spec.Pipeline, cronStartFrom *time.Time, configManageNamespaces []string, cronCompensator *pipelineyml.CronCompensator) error

非定时触发的,如果有定时配置,需要插入或更新 pipeline_crons enable 配置 不管是定时还是非定时,只要定时配置是空的,就将pipeline_crons disable

func (*PipelineSvc) UpgradePipelineCron

func (s *PipelineSvc) UpgradePipelineCron(pc *spec.PipelineCron) error

更新老数据 1) 根据 application 和 branch 获取元数据 2) 根据 basePipelineID 获取元数据

func (*PipelineSvc) WithCmsService added in v1.1.0

func (s *PipelineSvc) WithCmsService(cmsService pb.CmsServiceServer)

Jump to

Keyboard shortcuts

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