Documentation ¶
Overview ¶
Package pipeline pipeline相关的结构信息
Index ¶
- Constants
- func DecodeV1UniquePipelineYmlName(p *apistructs.PagePipeline, name string) string
- func GenerateV1UniquePipelineYmlName(source apistructs.PipelineSource, oriYmlName, appID, branch, workspace string) string
- func GetPipelineYmlList(req apistructs.CICDPipelineYmlListRequest, bdl *bundle.Bundle) []string
- type Option
- type Pipeline
- func (p *Pipeline) AllValidBranchWorkspaces(appID uint64) ([]apistructs.ValidBranch, error)
- func (p *Pipeline) AppCombos(appID uint64, req *spec.PipelineCombosReq) ([]apistructs.PipelineInvokedCombo, error)
- func (p *Pipeline) ConvertPipelineToV2(pv1 *apistructs.PipelineCreateRequest) (*apistructs.PipelineCreateRequestV2, error)
- func (p *Pipeline) CreatePipeline(reqPipeline *apistructs.PipelineCreateRequest) (*apistructs.PipelineDTO, error)
- func (p *Pipeline) CreatePipelineV2(reqPipeline *apistructs.PipelineCreateRequestV2) (*apistructs.PipelineDTO, error)
- func (p *Pipeline) FetchPipelineYml(gittarURL, ref, pipelineYmlName string) (string, error)
- func (p *Pipeline) GenerateReleaseYml(strPipelineYml, branchName string) (string, error)
- func (p *Pipeline) GetPipelineCron(projectID, appID int64, pathOld, branch string) (*apistructs.PipelineCronDTO, error)
- func (p *Pipeline) PipelineCronUpdate(req apistructs.GittarPushPayloadEvent) error
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 GetPipelineYmlList ¶
func GetPipelineYmlList(req apistructs.CICDPipelineYmlListRequest, bdl *bundle.Bundle) []string
获取应用下的所有.yml文件
Types ¶
type Option ¶
type Option func(*Pipeline)
Option Pipeline 配置选项
func WithBranchRuleSvc ¶
func WithBranchRuleSvc(svc *branchrule.BranchRule) Option
func WithPipelineCms ¶
func WithPipelineCms(cms cmspb.CmsServiceServer) Option
func WithPublisherSvc ¶
type Pipeline ¶
type Pipeline struct {
// contains filtered or unexported fields
}
Pipeline pipeline 结构体
func (*Pipeline) AllValidBranchWorkspaces ¶
func (p *Pipeline) AllValidBranchWorkspaces(appID uint64) ([]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 *apistructs.PipelineCreateRequest) (*apistructs.PipelineCreateRequestV2, error)
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 ¶
FetchPipelineYml 获取pipeline.yml文件
func (*Pipeline) GenerateReleaseYml ¶
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
Click to show internal directories.
Click to hide internal directories.