pipeline

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Aug 15, 2024 License: Apache-2.0 Imports: 36 Imported by: 0

Documentation

Overview

Package pipeline pipeline相关的结构信息

Index

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 GetGittarYmlNamesLabels(appID, workspace, branch, ymlName string) string

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 WithBundle

func WithBundle(bdl *bundle.Bundle) Option

WithBundle 配置 bundle

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 WithProjectSvc(svc *project.Project) Option

func WithPublisherSvc

func WithPublisherSvc(svc *publisher.Publisher) Option

func WithQueueService

func WithQueueService(queueService queue.Interface) Option

type Pipeline

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

Pipeline pipeline 结构体

func New

func New(options ...Option) *Pipeline

New Pipeline service

func (*Pipeline) AllValidBranchWorkspaces

func (p *Pipeline) AllValidBranchWorkspaces(appID uint64, userID string) ([]apistructs.ValidBranch, error)

func (*Pipeline) AppCombos

func (*Pipeline) ConvertPipelineToV2

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

func (p *Pipeline) FetchPipelineYml(gittarURL, ref, pipelineYmlName, userID string) (string, error)

FetchPipelineYml 获取pipeline.yml文件

func (*Pipeline) GenerateReleaseYml

func (p *Pipeline) GenerateReleaseYml(strPipelineYml, branchName string) (string, error)

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

Jump to

Keyboard shortcuts

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