projectpipeline

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: 54 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DefaultCategory CategoryType = "default"
	StarCategory    CategoryType = "primary"

	CreateProjectPipelineNamePreCheckLocaleKey   string = "ProjectPipelineCreateNamePreCheckNotPass"
	CreateProjectPipelineSourcePreCheckLocaleKey string = "ProjectPipelineCreateSourcePreCheckNotPass"

	InitCommitID string = "0000000000000000000000000000000000000000"
	BranchPrefix string = "refs/heads/"
)

Variables

This section is empty.

Functions

func MakeProjectPipelineName

func MakeProjectPipelineName(pipelineYml string, fileName string) string

Types

type AutoRunParams

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

type CategoryType

type CategoryType string

func (CategoryType) String

func (c CategoryType) String() string

type ErdaProjectSourceType

type ErdaProjectSourceType struct {
	PipelineCreateRequestV2 string `json:"pipelineCreateRequestV2"`
}

func (*ErdaProjectSourceType) GeneratePipelineCreateRequestV2

func (*ErdaProjectSourceType) GetPipelineCreateRequestV2

func (s *ErdaProjectSourceType) GetPipelineCreateRequestV2() string

type GithubProjectSourceType

type GithubProjectSourceType struct {
	PipelineCreateRequestV2 string `json:"pipelineCreateRequestV2"`
}

func (*GithubProjectSourceType) GeneratePipelineCreateRequestV2

func (*GithubProjectSourceType) GetPipelineCreateRequestV2

func (s *GithubProjectSourceType) GetPipelineCreateRequestV2() string

type PipelineStatisticsByCategory

type PipelineStatisticsByCategory struct {
	Key      apistructs.PipelineCategory
	Category string
	Rules    []string
	PipelineStatisticsNums
}

type PipelineStatisticsNums

type PipelineStatisticsNums struct {
	RunningNum uint64
	FailedNum  uint64
	TotalNum   uint64
}

type ProjectPipelineService

type ProjectPipelineService struct {
	PipelineSource     sourcepb.SourceServiceServer
	PipelineDefinition dpb.DefinitionServiceServer
	Permission         *permission.Permission
	PipelineCms        cmspb.CmsServiceServer

	GuideSvc     guidepb.GuideServiceServer
	PipelineCron cronpb.CronServiceServer
	// contains filtered or unexported fields
}

func (*ProjectPipelineService) BatchCreateByGittarPushHook

func (*ProjectPipelineService) BatchRun

func (*ProjectPipelineService) Cancel

func (*ProjectPipelineService) CheckBranchRule

func (p *ProjectPipelineService) CheckBranchRule(branch string, projectID int64) (bool, error)

func (*ProjectPipelineService) Create

func (*ProjectPipelineService) CreateOne

func (*ProjectPipelineService) Delete

func (*ProjectPipelineService) DeleteByApp

func (*ProjectPipelineService) EndCron

func (*ProjectPipelineService) GetPipelineYml

func (s *ProjectPipelineService) GetPipelineYml(app *apistructs.ApplicationDTO, userID string, branch string, findPath string) ([]*pb.PipelineYmlList, error)

func (*ProjectPipelineService) GetRemotesByAppID

func (p *ProjectPipelineService) GetRemotesByAppID(appID uint64, orgName, projectName string) ([]string, error)

func (*ProjectPipelineService) IdempotentCreateOne

func (*ProjectPipelineService) List

func (*ProjectPipelineService) ListApp

func (*ProjectPipelineService) ListExecHistory

func (*ProjectPipelineService) ListPipelineCategory

func (*ProjectPipelineService) ListPipelineStatisticsByCategory

func (p *ProjectPipelineService) ListPipelineStatisticsByCategory(ctx context.Context) []PipelineStatisticsByCategory

func (*ProjectPipelineService) ListPipelineYml

func (*ProjectPipelineService) ListPipelineYmlByApp

func (s *ProjectPipelineService) ListPipelineYmlByApp(app *apistructs.ApplicationDTO, branch, userID string) ([]*pb.PipelineYmlList, error)

func (*ProjectPipelineService) ListUsedRefs

func (*ProjectPipelineService) Rerun

func (*ProjectPipelineService) Run

func (*ProjectPipelineService) SetPrimary

func (*ProjectPipelineService) TryAddRunningPipelineLinkToErr

func (p *ProjectPipelineService) TryAddRunningPipelineLinkToErr(orgName string, projectID uint64, appID uint64, err error) (error, bool)

func (*ProjectPipelineService) UnSetPrimary

func (*ProjectPipelineService) Update

func (*ProjectPipelineService) UpdateCmsNsConfigs

func (e *ProjectPipelineService) UpdateCmsNsConfigs(userID string, orgID uint64) error

UpdateCmsNsConfigs update CmsNsConfigs

func (*ProjectPipelineService) WithBranchRuleSve

func (p *ProjectPipelineService) WithBranchRuleSve(svc *branchrule.BranchRule)

func (*ProjectPipelineService) WithPermissionSvc

func (p *ProjectPipelineService) WithPermissionSvc(permission *permission.Permission)

func (*ProjectPipelineService) WithPipelineService

func (p *ProjectPipelineService) WithPipelineService(svc pipelinepb.PipelineServiceServer)

func (*ProjectPipelineService) WithPipelineSvc

func (p *ProjectPipelineService) WithPipelineSvc(svc *pipeline.Pipeline)

type ProjectSourceType

type ProjectSourceType interface {
	GenerateReq(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*spb.PipelineSourceCreateRequest, error)
	GetPipelineCreateRequestV2() string
	GeneratePipelineCreateRequestV2(ctx context.Context, p *ProjectPipelineService, params *pb.CreateProjectPipelineRequest) (*pipelinepb.PipelineCreateRequestV2, error)
}

func NewProjectSourceType

func NewProjectSourceType(t string) ProjectSourceType

type RemoteName

type RemoteName struct {
	OrgName     string
	ProjectName string
	AppName     string
}

type Service

type Service interface {
	Create(ctx context.Context, params *pb.CreateProjectPipelineRequest) (*pb.CreateProjectPipelineResponse, error)
	BatchCreateByGittarPushHook(ctx context.Context, params *pb.GittarPushPayloadEvent) (*pb.BatchCreateProjectPipelineResponse, error)
	List(ctx context.Context, params deftype.ProjectPipelineList) ([]*dpb.PipelineDefinition, int64, error)
	ListUsedRefs(ctx context.Context, params deftype.ProjectPipelineUsedRefList) ([]string, error)
	Delete(ctx context.Context, params deftype.ProjectPipelineDelete) (*deftype.ProjectPipelineDeleteResult, error)
	Update(ctx context.Context, params *pb.UpdateProjectPipelineRequest) (*pb.UpdateProjectPipelineResponse, error)
	SetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error)
	UnSetPrimary(ctx context.Context, params deftype.ProjectPipelineCategory) (*dpb.PipelineDefinitionUpdateResponse, error)
	ListApp(ctx context.Context, params *pb.ListAppRequest) (*pb.ListAppResponse, error)
	ListPipelineYml(ctx context.Context, req *pb.ListAppPipelineYmlRequest) (*pb.ListAppPipelineYmlResponse, error)
	CreateNamePreCheck(ctx context.Context, req *pb.CreateProjectPipelineNamePreCheckRequest) (*pb.CreateProjectPipelineNamePreCheckResponse, error)
	CreateSourcePreCheck(ctx context.Context, req *pb.CreateProjectPipelineSourcePreCheckRequest) (*pb.CreateProjectPipelineSourcePreCheckResponse, error)
	OneClickCreate(ctx context.Context, params *pb.OneClickCreateProjectPipelineRequest) (*pb.OneClickCreateProjectPipelineResponse, error)

	Run(ctx context.Context, params *pb.RunProjectPipelineRequest) (*pb.RunProjectPipelineResponse, error)
	Cancel(ctx context.Context, params *pb.CancelProjectPipelineRequest) (*pb.CancelProjectPipelineResponse, error)
	Rerun(ctx context.Context, params *pb.RerunProjectPipelineRequest) (*pb.RerunProjectPipelineResponse, error)
	RerunFailed(ctx context.Context, params *pb.RerunFailedProjectPipelineRequest) (*pb.RerunFailedProjectPipelineResponse, error)
	BatchRun(ctx context.Context, params deftype.ProjectPipelineBatchRun) (*deftype.ProjectPipelineBatchRunResult, error)
	StartCron(ctx context.Context, params deftype.ProjectPipelineStartCron) (*deftype.ProjectPipelineStartCronResult, error)
	EndCron(ctx context.Context, params deftype.ProjectPipelineEndCron) (*deftype.ProjectPipelineEndCronResult, error)
	ListExecHistory(ctx context.Context, params *pb.ListPipelineExecHistoryRequest) (*pb.ListPipelineExecHistoryResponse, error)
	DeleteByApp(ctx context.Context, params *pb.DeleteByAppRequest) (*pb.DeleteByAppResponse, error)
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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