pipeline

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Jan 6, 2022 License: Apache-2.0 Imports: 25 Imported by: 0

Documentation

Overview

Package pipeline pipeline相关的结构信息

Index

Constants

View Source
const (
	DicePipelinesGitFolder = ".dice/pipelines"
)

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 added in v1.3.0

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 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 WithPipelineDefinitionServices added in v1.3.0

func WithPipelineDefinitionServices(ds definition_client.Processor) Option

func WithPublisherSvc

func WithPublisherSvc(svc *publisher.Publisher) 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 *apistructs.PipelineCreateRequest) (*apistructs.PipelineDTO, error)

CreatePipeline 创建pipeline流程

func (*Pipeline) CreatePipelineV2

func (p *Pipeline) CreatePipelineV2(reqPipeline *apistructs.PipelineCreateRequestV2) (*apistructs.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) (*apistructs.PipelineCronDTO, error)

GetPipelineCron get pipeline cron

func (*Pipeline) PipelineCronUpdate

func (p *Pipeline) PipelineCronUpdate(req apistructs.GittarPushPayloadEvent) error

PipelineCronUpdate pipeline cron update

func (*Pipeline) PipelineDefinitionUpdate added in v1.3.0

func (p *Pipeline) PipelineDefinitionUpdate(req apistructs.GittarPushPayloadEvent) error

PipelineCronUpdate pipeline cron update

Jump to

Keyboard shortcuts

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