dag

package
v0.6.29 Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 44 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DevtronAppReleaseContextType

type DevtronAppReleaseContextType struct {
	CancelContext context.CancelFunc
	RunnerId      int
}

type WorkflowDagExecutor

type WorkflowDagExecutor interface {
	HandleCiSuccessEvent(triggerContext bean5.TriggerContext, ciPipelineId int, request *bean2.CiArtifactWebhookRequest, imagePushedAt *time.Time) (id int, err error)
	HandlePreStageSuccessEvent(triggerContext bean5.TriggerContext, cdStageCompleteEvent bean7.CdStageCompleteEvent) error
	HandleDeploymentSuccessEvent(triggerContext bean5.TriggerContext, pipelineOverride *chartConfig.PipelineOverride) error
	HandlePostStageSuccessEvent(triggerContext bean5.TriggerContext, cdWorkflowId int, cdPipelineId int, triggeredBy int32, pluginRegistryImageDetails map[string][]string) error
	HandleCdStageReTrigger(runner *pipelineConfig.CdWorkflowRunner) error
	HandleCiStepFailedEvent(ciPipelineId int, request *bean2.CiArtifactWebhookRequest) (err error)
	HandleExternalCiWebhook(externalCiId int, request *bean2.CiArtifactWebhookRequest,
		auth func(token string, projectObject string, envObject string) bool, token string) (id int, err error)

	UpdateWorkflowRunnerStatusForDeployment(appIdentifier *client2.AppIdentifier, wfr *pipelineConfig.CdWorkflowRunner, skipReleaseNotFound bool) bool
	OnDeleteCdPipelineEvent(pipelineId int, triggeredBy int32)

	BuildCiArtifactRequestForWebhook(event pipeline.ExternalCiWebhookDto) (*bean2.CiArtifactWebhookRequest, error)
}

type WorkflowDagExecutorImpl

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

func NewWorkflowDagExecutorImpl

func NewWorkflowDagExecutorImpl(Logger *zap.SugaredLogger, pipelineRepository pipelineConfig.PipelineRepository,
	cdWorkflowRepository pipelineConfig.CdWorkflowRepository,
	pubsubClient *pubsub.PubSubClientServiceImpl,
	ciArtifactRepository repository.CiArtifactRepository,
	enforcerUtil rbac.EnforcerUtil,
	appWorkflowRepository appWorkflow.AppWorkflowRepository,
	pipelineStageService pipeline.PipelineStageService,
	ciWorkflowRepository pipelineConfig.CiWorkflowRepository,
	ciPipelineRepository pipelineConfig.CiPipelineRepository,
	pipelineStageRepository repository4.PipelineStageRepository,
	globalPluginRepository repository2.GlobalPluginRepository,
	eventClient client.EventClient,
	eventFactory client.EventFactory,
	customTagService pipeline.CustomTagService,
	helmAppService client2.HelmAppService,
	pipelineConfigListenerService pipeline.PipelineConfigListenerService,
	cdWorkflowCommonService cd.CdWorkflowCommonService,
	cdTriggerService devtronApps.TriggerService,
	manifestCreationService manifest.ManifestCreationService,
	commonArtifactService artifacts.CommonArtifactService) *WorkflowDagExecutorImpl

func (*WorkflowDagExecutorImpl) BuildCiArtifactRequestForWebhook

func (impl *WorkflowDagExecutorImpl) BuildCiArtifactRequestForWebhook(event pipeline.ExternalCiWebhookDto) (*bean2.CiArtifactWebhookRequest, error)

TODO: move in adapter

func (*WorkflowDagExecutorImpl) HandleCdStageReTrigger

func (impl *WorkflowDagExecutorImpl) HandleCdStageReTrigger(runner *pipelineConfig.CdWorkflowRunner) error

func (*WorkflowDagExecutorImpl) HandleCiStepFailedEvent

func (impl *WorkflowDagExecutorImpl) HandleCiStepFailedEvent(ciPipelineId int, request *bean2.CiArtifactWebhookRequest) (err error)

func (*WorkflowDagExecutorImpl) HandleCiSuccessEvent

func (impl *WorkflowDagExecutorImpl) HandleCiSuccessEvent(triggerContext bean5.TriggerContext, ciPipelineId int, request *bean2.CiArtifactWebhookRequest, imagePushedAt *time.Time) (id int, err error)

func (*WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent

func (impl *WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent(triggerContext bean5.TriggerContext, pipelineOverride *chartConfig.PipelineOverride) error

func (*WorkflowDagExecutorImpl) HandleExternalCiWebhook

func (impl *WorkflowDagExecutorImpl) HandleExternalCiWebhook(externalCiId int, request *bean2.CiArtifactWebhookRequest,
	auth func(token string, projectObject string, envObject string) bool, token string) (id int, err error)

func (*WorkflowDagExecutorImpl) HandlePostStageSuccessEvent

func (impl *WorkflowDagExecutorImpl) HandlePostStageSuccessEvent(triggerContext bean5.TriggerContext, cdWorkflowId int, cdPipelineId int, triggeredBy int32, pluginRegistryImageDetails map[string][]string) error

func (*WorkflowDagExecutorImpl) HandlePreStageSuccessEvent

func (impl *WorkflowDagExecutorImpl) HandlePreStageSuccessEvent(triggerContext bean5.TriggerContext, cdStageCompleteEvent bean7.CdStageCompleteEvent) error

func (*WorkflowDagExecutorImpl) OnDeleteCdPipelineEvent

func (impl *WorkflowDagExecutorImpl) OnDeleteCdPipelineEvent(pipelineId int, triggeredBy int32)

func (*WorkflowDagExecutorImpl) RemoveReleaseContextForPipeline

func (impl *WorkflowDagExecutorImpl) RemoveReleaseContextForPipeline(pipelineId int, triggeredBy int32)

func (*WorkflowDagExecutorImpl) SubscribeDevtronAsyncHelmInstallRequest

func (impl *WorkflowDagExecutorImpl) SubscribeDevtronAsyncHelmInstallRequest() error

func (*WorkflowDagExecutorImpl) UpdateReleaseContextForPipeline

func (impl *WorkflowDagExecutorImpl) UpdateReleaseContextForPipeline(pipelineId, cdWfrId int, cancel context.CancelFunc)

func (*WorkflowDagExecutorImpl) UpdateWorkflowRunnerStatusForDeployment

func (impl *WorkflowDagExecutorImpl) UpdateWorkflowRunnerStatusForDeployment(appIdentifier *client2.AppIdentifier, wfr *pipelineConfig.CdWorkflowRunner, skipReleaseNotFound bool) bool

UpdateWorkflowRunnerStatusForDeployment will update CD workflow runner based on release status and app status

func (*WorkflowDagExecutorImpl) WriteCIStepFailedEvent

func (impl *WorkflowDagExecutorImpl) WriteCIStepFailedEvent(pipeline *pipelineConfig.CiPipeline, request *bean2.CiArtifactWebhookRequest, ciWorkflow *pipelineConfig.CiWorkflow)

func (*WorkflowDagExecutorImpl) WriteCISuccessEvent

func (impl *WorkflowDagExecutorImpl) WriteCISuccessEvent(request *bean2.CiArtifactWebhookRequest, pipeline *pipelineConfig.CiPipeline, artifact *repository.CiArtifact)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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