Documentation ¶
Overview ¶
Package pipeline pipeline相关的结构信息
Index ¶
- func DecodeV1UniquePipelineYmlName(p *apistructs.PagePipeline, name string) string
- func GenerateV1UniquePipelineYmlName(source apistructs.PipelineSource, oriYmlName, appID, branch, workspace string) string
- func GetGittarYmlNamesLabels(appID, workspace, branch, ymlName string) string
- func GetPipelineYmlList(req apistructs.CICDPipelineYmlListRequest, bdl *bundle.Bundle, userID string) []string
- type Option
- func WithAppSvc(svc *application.Application) Option
- func WithBranchRuleSvc(svc *branchrule.BranchRule) Option
- func WithBundle(bdl *bundle.Bundle) Option
- func WithPipelineCms(cms cmspb.CmsServiceServer) Option
- func WithPipelineCron(cronService cronpb.CronServiceServer) Option
- func WithPipelineDefinition(pipelineDefinition definitionpb.DefinitionServiceServer) Option
- func WithPipelineSource(source sourcepb.SourceServiceServer) Option
- func WithPipelineSvc(svc pipelinepb.PipelineServiceServer) Option
- func WithProjectSvc(svc *project.Project) Option
- func WithPublisherSvc(svc *publisher.Publisher) Option
- func WithQueueService(queueService queue.Interface) Option
- type Pipeline
- func (p *Pipeline) AllValidBranchWorkspaces(appID uint64, userID string) ([]apistructs.ValidBranch, error)
- func (p *Pipeline) AppCombos(appID uint64, req *spec.PipelineCombosReq) ([]apistructs.PipelineInvokedCombo, error)
- func (p *Pipeline) ConvertPipelineToV2(pv1 *pipelinepb.PipelineCreateRequest) (*pipelinepb.PipelineCreateRequestV2, error)
- func (p *Pipeline) CreatePipeline(reqPipeline *pipelinepb.PipelineCreateRequest) (*basepb.PipelineDTO, error)
- func (p *Pipeline) CreatePipelineV2(reqPipeline *pipelinepb.PipelineCreateRequestV2) (*basepb.PipelineDTO, error)
- func (p *Pipeline) FetchPipelineYml(gittarURL, ref, pipelineYmlName, userID string) (string, error)
- func (p *Pipeline) GenerateReleaseYml(strPipelineYml, branchName string) (string, error)
- func (p *Pipeline) GetPipelineCron(projectID, appID int64, pathOld, branch string) (*commonpb.Cron, bool, error)
- func (p *Pipeline) PipelineCronUpdate(req apistructs.GittarPushPayloadEvent) error
- func (p *Pipeline) PipelineDefinitionUpdate(req apistructs.GittarPushPayloadEvent) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeV1UniquePipelineYmlName ¶
func DecodeV1UniquePipelineYmlName(p *apistructs.PagePipeline, name string) string
DecodeV1UniquePipelineYmlName 根据 GenerateV1UniquePipelineYmlName 生成规则,反解析得到 originName
func GenerateV1UniquePipelineYmlName ¶
func GenerateV1UniquePipelineYmlName(source apistructs.PipelineSource, oriYmlName, appID, branch, workspace string) string
GenerateV1UniquePipelineYmlName 为 v1 pipeline 返回 pipelineYmlName,该 name 在 source 下唯一 生成规则: AppID/DiceWorkspace/Branch/PipelineYmlPath 1) 100/PROD/master/ec/dws/itm/workflow/item_1d_df_process.workflow 2) 200/DEV/feature/dice/pipeline.yml
func GetGittarYmlNamesLabels ¶
func GetPipelineYmlList ¶
func GetPipelineYmlList(req apistructs.CICDPipelineYmlListRequest, bdl *bundle.Bundle, userID string) []string
获取应用下的所有.yml文件
Types ¶
type Option ¶
type Option func(*Pipeline)
Option Pipeline 配置选项
func WithAppSvc ¶
func WithAppSvc(svc *application.Application) Option
func WithBranchRuleSvc ¶
func WithBranchRuleSvc(svc *branchrule.BranchRule) Option
func WithPipelineCms ¶
func WithPipelineCms(cms cmspb.CmsServiceServer) Option
func WithPipelineCron ¶
func WithPipelineCron(cronService cronpb.CronServiceServer) Option
func WithPipelineDefinition ¶
func WithPipelineDefinition(pipelineDefinition definitionpb.DefinitionServiceServer) Option
func WithPipelineSource ¶
func WithPipelineSource(source sourcepb.SourceServiceServer) Option
func WithPipelineSvc ¶
func WithPipelineSvc(svc pipelinepb.PipelineServiceServer) Option
func WithProjectSvc ¶
func WithPublisherSvc ¶
func WithQueueService ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline pipeline 结构体
func (*Pipeline) AllValidBranchWorkspaces ¶
func (p *Pipeline) AllValidBranchWorkspaces(appID uint64, userID string) ([]apistructs.ValidBranch, error)
func (*Pipeline) AppCombos ¶
func (p *Pipeline) AppCombos(appID uint64, req *spec.PipelineCombosReq) ([]apistructs.PipelineInvokedCombo, error)
func (*Pipeline) ConvertPipelineToV2 ¶
func (p *Pipeline) ConvertPipelineToV2(pv1 *pipelinepb.PipelineCreateRequest) (*pipelinepb.PipelineCreateRequestV2, error)
func (*Pipeline) CreatePipeline ¶
func (p *Pipeline) CreatePipeline(reqPipeline *pipelinepb.PipelineCreateRequest) (*basepb.PipelineDTO, error)
CreatePipeline 创建pipeline流程
func (*Pipeline) CreatePipelineV2 ¶
func (p *Pipeline) CreatePipelineV2(reqPipeline *pipelinepb.PipelineCreateRequestV2) (*basepb.PipelineDTO, error)
CreatePipeline 创建pipeline流程
func (*Pipeline) FetchPipelineYml ¶
FetchPipelineYml 获取pipeline.yml文件
func (*Pipeline) GenerateReleaseYml ¶
GenerateReleaseYml 根据pipeline.yml生成新的release.yml
func (*Pipeline) GetPipelineCron ¶
func (p *Pipeline) GetPipelineCron(projectID, appID int64, pathOld, branch string) (*commonpb.Cron, bool, error)
GetPipelineCron get pipeline cron
func (*Pipeline) PipelineCronUpdate ¶
func (p *Pipeline) PipelineCronUpdate(req apistructs.GittarPushPayloadEvent) error
PipelineCronUpdate pipeline cron update
func (*Pipeline) PipelineDefinitionUpdate ¶
func (p *Pipeline) PipelineDefinitionUpdate(req apistructs.GittarPushPayloadEvent) error
PipelineDefinitionUpdate pipeline definition update