Documentation ¶
Index ¶
- Constants
- Variables
- func AddTemplatesForGlobalSecretsInWorkflowTemplate(globalCmCsConfigs []*bean.GlobalCMCSDto, steps *[]v1alpha1.ParallelSteps, ...) error
- func CheckIfReTriggerRequired(status, message, workflowRunnerStatus string) bool
- func ConvertStageYamlScriptsToPipelineStageSteps(cdPipeline *bean2.CDPipelineConfigObject) (*bean2.CDPipelineConfigObject, error)
- func CreatePreAndPostStageResponse(cdPipeline *bean2.CDPipelineConfigObject, version string) (*bean2.CDPipelineConfigObject, error)
- func ExtractVolumesFromCmCs(configMaps []bean2.ConfigSecretMap, secrets []bean2.ConfigSecretMap) []v12.Volume
- func GetClientInstance(config *rest.Config, namespace string) (v1alpha12.WorkflowInterface, error)
- func GetConfigMapBody(configMapSecretDto ConfigMapSecretDto) v12.ConfigMap
- func GetConfigMapJson(configMapSecretDto ConfigMapSecretDto) (string, error)
- func GetFromGlobalCmCsDtos(globalCmCsConfigs []*bean.GlobalCMCSDto) ([]bean2.ConfigSecretMap, []bean2.ConfigSecretMap, error)
- func GetSecretBody(configMapSecretDto ConfigMapSecretDto) v12.Secret
- func GetSecretJson(configMapSecretDto ConfigMapSecretDto) (string, error)
- func ModifySshPrivateKey(sshPrivateKey string, authMode repository.AuthMode) string
- func NewDockerArtifactStore(bean *DockerArtifactStoreBean, isActive bool, createdOn time.Time, ...) *repository.DockerArtifactStore
- func SetGitCommitValuesForBuildingCommitHash(ciMaterial *pipelineConfig.CiPipelineMaterial, ...) pipelineConfig.GitCommit
- func StageStepsToCdStageAdapter(deployStage *bean.PipelineStageDto) (*bean2.CdStage, error)
- func StageYamlToPipelineStageAdapter(stageConfig string, stageType repository2.PipelineStageType, ...) (*bean.PipelineStageDto, error)
- func UpdateContainerEnvsFromCmCs(workflowMainContainer *v12.Container, configMaps []bean2.ConfigSecretMap, ...)
- type AppArtifactManager
- type AppArtifactManagerImpl
- func (impl *AppArtifactManagerImpl) BuildArtifactsForCIParent(cdPipelineId int, parentId int, parentType bean.WorkflowType, ...) ([]bean2.CiArtifactBean, error)
- func (impl *AppArtifactManagerImpl) BuildArtifactsForCdStage(pipelineId int, stageType bean.WorkflowType, ...) ([]bean2.CiArtifactBean, map[int]int, int, string, error)
- func (impl *AppArtifactManagerImpl) BuildArtifactsForParentStage(cdPipelineId int, parentId int, parentType bean.WorkflowType, ...) ([]bean2.CiArtifactBean, error)
- func (impl *AppArtifactManagerImpl) FetchArtifactForRollback(cdPipelineId, appId, offset, limit int) (bean2.CiArtifactResponse, error)
- func (impl *AppArtifactManagerImpl) RetrieveArtifactsByCDPipeline(pipeline *pipelineConfig.Pipeline, stage bean.WorkflowType) (*bean2.CiArtifactResponse, error)
- type AppBean
- type AppDeploymentTypeChangeManager
- type AppDeploymentTypeChangeManagerImpl
- func (impl *AppDeploymentTypeChangeManagerImpl) ChangeDeploymentType(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error)
- func (impl *AppDeploymentTypeChangeManagerImpl) ChangePipelineDeploymentType(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error)
- func (impl *AppDeploymentTypeChangeManagerImpl) DeleteDeploymentApps(ctx context.Context, pipelines []*pipelineConfig.Pipeline, userId int32) *bean.DeploymentAppTypeChangeResponse
- func (impl *AppDeploymentTypeChangeManagerImpl) DeleteDeploymentAppsForEnvironment(ctx context.Context, environmentId int, ...) (*bean.DeploymentAppTypeChangeResponse, error)
- func (impl *AppDeploymentTypeChangeManagerImpl) FetchDeletedApp(ctx context.Context, pipelines []*pipelineConfig.Pipeline) *bean.DeploymentAppTypeChangeResponse
- func (impl *AppDeploymentTypeChangeManagerImpl) TriggerDeploymentAfterTypeChange(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error)
- type AppLabelMetadata
- type ArgoPipelineStatusSyncEvent
- type ArgoWorkflowExecutor
- type ArgoWorkflowExecutorImpl
- type ArtifactsForCiJob
- type BuildLogRequest
- type BulkTriggerRequest
- type CdConfig
- type CdHandler
- type CdHandlerImpl
- func (impl *CdHandlerImpl) CancelStage(workflowRunnerId int, userId int32) (int, error)
- func (impl *CdHandlerImpl) CheckAndSendArgoPipelineStatusSyncEventIfNeeded(pipelineId int, userId int32, isAppStoreApplication bool)
- func (impl *CdHandlerImpl) CheckArgoAppStatusPeriodicallyAndUpdateInDb(getPipelineDeployedBeforeMinutes int, getPipelineDeployedWithinHours int) error
- func (impl *CdHandlerImpl) CheckArgoPipelineTimelineStatusPeriodicallyAndUpdateInDb(pendingSinceSeconds int, timeForDegradation int) error
- func (impl *CdHandlerImpl) CheckHelmAppStatusPeriodicallyAndUpdateInDb(helmPipelineStatusCheckEligibleTime int, getPipelineDeployedWithinHours int) error
- func (impl *CdHandlerImpl) DownloadCdWorkflowArtifacts(pipelineId int, buildId int) (*os.File, error)
- func (impl *CdHandlerImpl) FetchAppDeploymentStatusForEnvironments(request resourceGroup2.ResourceGroupingRequest) ([]*pipelineConfig.AppDeploymentStatus, error)
- func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerView(appId int) ([]*pipelineConfig.CdWorkflowStatus, error)
- func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerViewForEnvironment(request resourceGroup2.ResourceGroupingRequest) ([]*pipelineConfig.CdWorkflowStatus, error)
- func (impl *CdHandlerImpl) FetchCdPrePostStageStatus(pipelineId int) ([]pipelineConfig.CdWorkflowWithArtifact, error)
- func (impl *CdHandlerImpl) FetchCdWorkflowDetails(appId int, environmentId int, pipelineId int, buildId int) (WorkflowResponse, error)
- func (impl *CdHandlerImpl) GetCdBuildHistory(appId int, environmentId int, pipelineId int, offset int, size int) ([]pipelineConfig.CdWorkflowWithArtifact, error)
- func (impl *CdHandlerImpl) GetRunningWorkflowLogs(environmentId int, pipelineId int, wfrId int) (*bufio.Reader, func() error, error)
- func (impl *CdHandlerImpl) HandleCdStageReTrigger(runner *pipelineConfig.CdWorkflowRunner) error
- func (impl *CdHandlerImpl) UpdatePipelineTimelineAndStatusByLiveApplicationFetch(pipeline *pipelineConfig.Pipeline, installedApp repository3.InstalledApps, ...) (error, bool)
- func (impl *CdHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, string, error)
- type CdPipelineConfig
- type CdPipelineConfigService
- type CdPipelineConfigServiceImpl
- func (impl *CdPipelineConfigServiceImpl) BulkDeleteCdPipelines(impactedPipelines []*pipelineConfig.Pipeline, ctx context.Context, dryRun bool, ...) []*bean.CdBulkActionResponseDto
- func (impl *CdPipelineConfigServiceImpl) CreateCdPipelines(pipelineCreateRequest *bean.CdPipelines, ctx context.Context) (*bean.CdPipelines, error)
- func (impl *CdPipelineConfigServiceImpl) CreateExternalCiAndAppWorkflowMapping(appId, appWorkflowId int, userId int32, tx *pg.Tx) (int, error)
- func (impl *CdPipelineConfigServiceImpl) DeleteACDAppCdPipelineWithNonCascade(pipeline *pipelineConfig.Pipeline, ctx context.Context, forceDelete bool, ...) error
- func (impl *CdPipelineConfigServiceImpl) DeleteCdPipeline(pipeline *pipelineConfig.Pipeline, ctx context.Context, deleteAction int, ...) (*bean.AppDeleteResponseDTO, error)
- func (impl *CdPipelineConfigServiceImpl) DeleteCdPipelinePartial(pipeline *pipelineConfig.Pipeline, ctx context.Context, deleteAction int, ...) (*bean.AppDeleteResponseDTO, error)
- func (impl *CdPipelineConfigServiceImpl) FindAppAndEnvDetailsByPipelineId(cdPipelineId int) (*pipelineConfig.Pipeline, error)
- func (impl *CdPipelineConfigServiceImpl) FindPipelineById(cdPipelineId int) (*pipelineConfig.Pipeline, error)
- func (impl *CdPipelineConfigServiceImpl) GetBulkActionImpactedPipelines(dto *bean.CdBulkActionRequestDto) ([]*pipelineConfig.Pipeline, error)
- func (impl *CdPipelineConfigServiceImpl) GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error)
- func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironment(request resourceGroup2.ResourceGroupingRequest) (cdPipelines *bean.CdPipelines, err error)
- func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironmentMin(request resourceGroup2.ResourceGroupingRequest) (cdPipelines []*bean.CDPipelineConfigObject, err error)
- func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl *CdPipelineConfigServiceImpl) GetEnvironmentByCdPipelineId(pipelineId int) (int, error)
- func (impl *CdPipelineConfigServiceImpl) GetEnvironmentListForAutocompleteFilter(envName string, clusterIds []int, offset int, size int, emailId string, ...) (*cluster.ResourceGroupingResponse, error)
- func (impl *CdPipelineConfigServiceImpl) GetTriggerViewCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl *CdPipelineConfigServiceImpl) IsGitOpsRequiredForCD(pipelineCreateRequest *bean.CdPipelines) bool
- func (impl *CdPipelineConfigServiceImpl) IsGitopsConfigured() (bool, error)
- func (impl *CdPipelineConfigServiceImpl) MarkGitOpsDevtronAppsDeletedWhereArgoAppIsDeleted(appId int, envId int, acdToken string, pipeline *pipelineConfig.Pipeline) (bool, error)
- func (impl *CdPipelineConfigServiceImpl) PatchCdPipelines(cdPipelines *bean.CDPatchRequest, ctx context.Context) (*bean.CdPipelines, error)
- func (impl *CdPipelineConfigServiceImpl) PerformBulkActionOnCdPipelines(dto *bean.CdBulkActionRequestDto, impactedPipelines []*pipelineConfig.Pipeline, ...) ([]*bean.CdBulkActionResponseDto, error)
- func (impl *CdPipelineConfigServiceImpl) RegisterInACD(gitOpsRepoName string, chartGitAttr *util.ChartGitAttribute, userId int32, ...) error
- func (impl *CdPipelineConfigServiceImpl) RetrieveParentDetails(pipelineId int) (parentId int, parentType bean2.WorkflowType, err error)
- func (impl *CdPipelineConfigServiceImpl) SetPipelineDeploymentAppType(pipelineCreateRequest *bean.CdPipelines, isGitOpsConfigured bool, ...)
- func (impl *CdPipelineConfigServiceImpl) ValidateCDPipelineRequest(pipelineCreateRequest *bean.CdPipelines, ...) (bool, error)
- type CdStageCompleteEvent
- type ChildCdMetadata
- type CiArtifactDTO
- type CiArtifactWebhookRequest
- type CiBuildConfigService
- type CiBuildConfigServiceImpl
- func (impl *CiBuildConfigServiceImpl) Delete(ciBuildConfigId int) error
- func (impl *CiBuildConfigServiceImpl) GetCountByBuildType() map[bean.CiBuildType]int
- func (impl *CiBuildConfigServiceImpl) Save(templateId int, overrideTemplateId int, ...) error
- func (impl *CiBuildConfigServiceImpl) UpdateOrSave(templateId int, overrideTemplateId int, ciBuildConfig *bean.CiBuildConfigBean, ...) (*bean.CiBuildConfigBean, error)
- type CiCdConfig
- func (impl *CiCdConfig) GetArtifactLocationFormat() string
- func (impl *CiCdConfig) GetDefaultAddressPoolBaseCidr() string
- func (impl *CiCdConfig) GetDefaultAddressPoolSize() int
- func (impl *CiCdConfig) GetDefaultArtifactKeyPrefix() string
- func (impl *CiCdConfig) GetDefaultBuildLogsBucket() string
- func (impl *CiCdConfig) GetDefaultBuildLogsKeyPrefix() string
- func (impl *CiCdConfig) GetDefaultCdLogsBucketRegion() string
- func (impl *CiCdConfig) GetDefaultImage() string
- func (impl *CiCdConfig) GetDefaultNamespace() string
- func (impl *CiCdConfig) GetDefaultTimeout() int64
- func (impl *CiCdConfig) GetLimitCpu() string
- func (impl *CiCdConfig) GetLimitMem() string
- func (impl *CiCdConfig) GetReqCpu() string
- func (impl *CiCdConfig) GetReqMem() string
- func (impl *CiCdConfig) GetTaintKey() string
- func (impl *CiCdConfig) GetTaintValue() string
- func (impl *CiCdConfig) GetWorkflowExecutorType() pipelineConfig.WorkflowExecutorType
- func (impl *CiCdConfig) GetWorkflowServiceAccount() string
- func (impl *CiCdConfig) GetWorkflowVolumeAndVolumeMounts() ([]v12.Volume, []v12.VolumeMount, error)
- func (impl *CiCdConfig) WorkflowRetriesEnabled() bool
- type CiCdPipelineOrchestrator
- type CiCdPipelineOrchestratorImpl
- func (impl CiCdPipelineOrchestratorImpl) AddPipelineMaterialInGitSensor(pipelineMaterials []*pipelineConfig.CiPipelineMaterial) error
- func (impl CiCdPipelineOrchestratorImpl) BuildCiPipelineScript(userId int32, ciScript *bean.CiScript, scriptStage string, ...) *pipelineConfig.CiPipelineScript
- func (impl CiCdPipelineOrchestratorImpl) CheckStringMatchRegex(regex string, value string) bool
- func (impl CiCdPipelineOrchestratorImpl) CreateApp(createRequest *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
- func (impl CiCdPipelineOrchestratorImpl) CreateCDPipelines(pipelineRequest *bean.CDPipelineConfigObject, appId int, userId int32, ...) (pipelineId int, err error)
- func (impl CiCdPipelineOrchestratorImpl) CreateCiConf(createRequest *bean.CiConfigRequest, templateId int) (*bean.CiConfigRequest, error)
- func (impl CiCdPipelineOrchestratorImpl) CreateEcrRepo(dockerRepository, AWSRegion, AWSAccessKeyId, AWSSecretAccessKey string) error
- func (impl CiCdPipelineOrchestratorImpl) CreateMaterials(createMaterialRequest *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
- func (impl CiCdPipelineOrchestratorImpl) DeleteApp(appId int, userId int32) error
- func (impl CiCdPipelineOrchestratorImpl) DeleteCdPipeline(pipelineId int, userId int32, tx *pg.Tx) error
- func (impl CiCdPipelineOrchestratorImpl) DeleteCiPipeline(pipeline *pipelineConfig.CiPipeline, request *bean.CiPatchRequest, tx *pg.Tx) error
- func (impl CiCdPipelineOrchestratorImpl) GetByEnvOverrideId(envOverrideId int) (*bean.CdPipelines, error)
- func (impl CiCdPipelineOrchestratorImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl CiCdPipelineOrchestratorImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl CiCdPipelineOrchestratorImpl) GetCdPipelinesForEnv(envId int, requestedAppIds []int) (cdPipelines *bean.CdPipelines, err error)
- func (impl CiCdPipelineOrchestratorImpl) PatchCiMaterialSource(patchRequest *bean.CiMaterialPatchRequest, userId int32) (*bean.CiMaterialPatchRequest, error)
- func (impl CiCdPipelineOrchestratorImpl) PatchCiMaterialSourceValue(patchRequest *bean.CiMaterialValuePatchRequest, userId int32, value string, ...) (*pipelineConfig.CiPipelineMaterial, error)
- func (impl CiCdPipelineOrchestratorImpl) PatchMaterialValue(createRequest *bean.CiPipeline, userId int32, ...) (*bean.CiPipeline, error)
- func (impl CiCdPipelineOrchestratorImpl) PipelineExists(name string) (bool, error)
- func (impl CiCdPipelineOrchestratorImpl) UpdateCDPipeline(pipelineRequest *bean.CDPipelineConfigObject, userId int32, tx *pg.Tx) (err error)
- func (impl CiCdPipelineOrchestratorImpl) UpdateCiPipelineMaterials(materialsUpdate []*pipelineConfig.CiPipelineMaterial) error
- func (impl CiCdPipelineOrchestratorImpl) UpdateMaterial(updateMaterialDTO *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
- type CiCdTriggerEvent
- type CiConfig
- type CiHandler
- type CiHandlerImpl
- func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeBranchFix(ciPipelineMaterial bean.CiPipelineMaterial, ...) (pipelineConfig.GitCommit, error)
- func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeWebhook(ciPipelineMaterial bean.CiPipelineMaterial, ...) (pipelineConfig.GitCommit, map[string]string, error)
- func (impl *CiHandlerImpl) BuildPayload(ciWorkflow *pipelineConfig.CiWorkflow) *client.Payload
- func (impl *CiHandlerImpl) CancelBuild(workflowId int) (int, error)
- func (impl *CiHandlerImpl) CheckAndReTriggerCI(workflowStatus v1alpha1.WorkflowStatus) error
- func (impl *CiHandlerImpl) DownloadCiWorkflowArtifacts(pipelineId int, buildId int) (*os.File, error)
- func (impl *CiHandlerImpl) FetchArtifactsForCiJob(buildId int) (*ArtifactsForCiJob, error)
- func (impl *CiHandlerImpl) FetchCiStatusForTriggerView(appId int) ([]*pipelineConfig.CiWorkflowStatus, error)
- func (impl *CiHandlerImpl) FetchCiStatusForTriggerViewForEnvironment(request resourceGroup.ResourceGroupingRequest) ([]*pipelineConfig.CiWorkflowStatus, error)
- func (impl *CiHandlerImpl) FetchCiStatusForTriggerViewV1(appId int) ([]*pipelineConfig.CiWorkflowStatus, error)
- func (impl *CiHandlerImpl) FetchMaterialInfoByArtifactId(ciArtifactId int, envId int) (*GitTriggerInfoResponse, error)
- func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int, showAll bool) ([]pipelineConfig.CiPipelineMaterialResponse, error)
- func (impl *CiHandlerImpl) FetchMaterialsByPipelineIdAndGitMaterialId(pipelineId int, gitMaterialId int, showAll bool) ([]pipelineConfig.CiPipelineMaterialResponse, error)
- func (impl *CiHandlerImpl) FetchWorkflowDetails(appId int, pipelineId int, buildId int) (WorkflowResponse, error)
- func (impl *CiHandlerImpl) GetBuildHistory(pipelineId int, appId int, offset int, size int) ([]WorkflowResponse, error)
- func (impl *CiHandlerImpl) GetCiPipeline(ciMaterialId int) (*pipelineConfig.CiPipeline, error)
- func (impl *CiHandlerImpl) GetHistoricBuildLogs(pipelineId int, workflowId int, ciWorkflow *pipelineConfig.CiWorkflow) (map[string]string, error)
- func (impl *CiHandlerImpl) GetRunningWorkflowLogs(pipelineId int, workflowId int) (*bufio.Reader, func() error, error)
- func (impl *CiHandlerImpl) HandleCIManual(ciTriggerRequest bean.CiTriggerRequest) (int, error)
- func (impl *CiHandlerImpl) HandleCIWebhook(gitCiTriggerRequest bean.GitCiTriggerRequest) (int, error)
- func (impl *CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err error)
- func (impl *CiHandlerImpl) UpdateCiWorkflowStatusFailure(timeoutForFailureCiBuild int) error
- func (impl *CiHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, error)
- func (impl *CiHandlerImpl) WriteCIFailEvent(ciWorkflow *pipelineConfig.CiWorkflow, ciImage string)
- func (impl *CiHandlerImpl) WriteToCreateTestSuites(pipelineId int, buildId int, triggeredBy int)
- type CiLogService
- type CiLogServiceImpl
- func (impl *CiLogServiceImpl) FetchLogs(baseLogLocationPathConfig string, logRequest BuildLogRequest) (*os.File, func() error, error)
- func (impl *CiLogServiceImpl) FetchRunningWorkflowLogs(ciLogRequest BuildLogRequest, clusterConfig *k8s.ClusterConfig, isExt bool) (io.ReadCloser, func() error, error)
- type CiMaterialConfigService
- type CiMaterialConfigServiceImpl
- func (impl *CiMaterialConfigServiceImpl) BulkPatchCiMaterialSource(ciPipelines *bean.CiMaterialBulkPatchRequest, userId int32, token string, ...) (*bean.CiMaterialBulkPatchResponse, error)
- func (impl *CiMaterialConfigServiceImpl) CreateMaterialsForApp(request *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
- func (impl *CiMaterialConfigServiceImpl) DeleteMaterial(request *bean.UpdateMaterialDTO) error
- func (impl *CiMaterialConfigServiceImpl) GetMaterialsForAppId(appId int) []*bean.GitMaterial
- func (impl *CiMaterialConfigServiceImpl) PatchCiMaterialSource(ciPipeline *bean.CiMaterialPatchRequest, userId int32) (*bean.CiMaterialPatchRequest, error)
- func (impl *CiMaterialConfigServiceImpl) UpdateMaterialsForApp(request *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
- type CiPipelineConfigService
- type CiPipelineConfigServiceImpl
- func (impl *CiPipelineConfigServiceImpl) CreateCiPipeline(createRequest *bean.CiConfigRequest) (*bean.PipelineCreateResponse, error)
- func (impl *CiPipelineConfigServiceImpl) DeleteCiPipeline(request *bean.CiPatchRequest) (*bean.CiPipeline, error)
- func (impl *CiPipelineConfigServiceImpl) GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error)
- func (impl *CiPipelineConfigServiceImpl) GetCiPipelineByEnvironment(request resourceGroup2.ResourceGroupingRequest) ([]*bean.CiConfigRequest, error)
- func (impl *CiPipelineConfigServiceImpl) GetCiPipelineByEnvironmentMin(request resourceGroup2.ResourceGroupingRequest) ([]*bean.CiPipelineMinResponse, error)
- func (impl *CiPipelineConfigServiceImpl) GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error)
- func (impl *CiPipelineConfigServiceImpl) GetCiPipelineMin(appId int, envIds []int) ([]*bean.CiPipelineMin, error)
- func (impl *CiPipelineConfigServiceImpl) GetExternalCi(appId int) (ciConfig []*bean.ExternalCiConfig, err error)
- func (impl *CiPipelineConfigServiceImpl) GetExternalCiByEnvironment(request resourceGroup2.ResourceGroupingRequest) (ciConfig []*bean.ExternalCiConfig, err error)
- func (impl *CiPipelineConfigServiceImpl) GetExternalCiById(appId int, externalCiId int) (ciConfig *bean.ExternalCiConfig, err error)
- func (impl *CiPipelineConfigServiceImpl) GetTriggerViewCiPipeline(appId int) (*bean.TriggerViewCiConfig, error)
- func (impl *CiPipelineConfigServiceImpl) PatchCiPipeline(request *bean.CiPatchRequest) (ciConfig *bean.CiConfigRequest, err error)
- func (impl *CiPipelineConfigServiceImpl) PatchRegexCiPipeline(request *bean.CiRegexPatchRequest) (err error)
- func (impl *CiPipelineConfigServiceImpl) UpdateCiTemplate(updateRequest *bean.CiConfigRequest) (*bean.CiConfigRequest, error)
- type CiService
- type CiServiceImpl
- func (impl *CiServiceImpl) BuildPayload(trigger Trigger, pipeline *pipelineConfig.CiPipeline) *client.Payload
- func (impl *CiServiceImpl) GetCiMaterials(pipelineId int, ciMaterials []*pipelineConfig.CiPipelineMaterial) ([]*pipelineConfig.CiPipelineMaterial, error)
- func (impl *CiServiceImpl) TriggerCiPipeline(trigger Trigger) (int, error)
- func (impl *CiServiceImpl) WriteCITriggerEvent(trigger Trigger, pipeline *pipelineConfig.CiPipeline, ...)
- type CiTemplateService
- type CiTemplateServiceImpl
- func (impl CiTemplateServiceImpl) FindByAppId(appId int) (ciTemplateBean *bean.CiTemplateBean, err error)
- func (impl CiTemplateServiceImpl) FindByAppIds(appIds []int) (map[int]*bean.CiTemplateBean, error)
- func (impl CiTemplateServiceImpl) FindTemplateOverrideByAppId(appId int) (ciTemplateBeans []*bean.CiTemplateBean, err error)
- func (impl CiTemplateServiceImpl) FindTemplateOverrideByCiPipelineId(ciPipelineId int) (*bean.CiTemplateBean, error)
- func (impl CiTemplateServiceImpl) FindTemplateOverrideByCiPipelineIds(ciPipelineIds []int) (ciTemplateBeans []*bean.CiTemplateBean, err error)
- func (impl CiTemplateServiceImpl) Save(ciTemplateBean *bean.CiTemplateBean) error
- func (impl CiTemplateServiceImpl) Update(ciTemplateBean *bean.CiTemplateBean) error
- type CiVolumeMount
- type ConfigMapSecretDto
- type ConfigMapSecretsResponse
- type ConfigMapService
- type ConfigMapServiceImpl
- func (impl ConfigMapServiceImpl) CMEnvironmentAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CMEnvironmentDelete(name string, id int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CMEnvironmentDeleteByAppIdAndEnvId(name string, appId int, envId int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CMEnvironmentFetch(appId int, envId int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CMEnvironmentFetchForEdit(name string, id int, appId int, envId int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CMGlobalAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CMGlobalDelete(name string, id int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CMGlobalDeleteByAppId(name string, appId int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CMGlobalFetch(appId int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CMGlobalFetchForEdit(name string, id int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentDelete(name string, id int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentDeleteByAppIdAndEnvId(name string, appId int, envId int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentFetch(appId int, envId int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentFetchForEdit(name string, id int, appId int, envId int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSGlobalAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSGlobalDelete(name string, id int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CSGlobalDeleteByAppId(name string, appId int, userId int32) (bool, error)
- func (impl ConfigMapServiceImpl) CSGlobalFetch(appId int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSGlobalFetchForEdit(name string, id int) (*bean.ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentBulkPatch(bulkPatchRequest *bean.BulkPatchRequest) (*bean.BulkPatchRequest, error)
- func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentClone(appId int, cloneAppId int, userId int32) ([]chartConfig.ConfigMapEnvModel, error)
- func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentCreate(createJobEnvOverrideRequest *bean.CreateJobEnvOverridePayload) (*bean.CreateJobEnvOverridePayload, error)
- func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentDelete(createJobEnvOverrideRequest *bean.CreateJobEnvOverridePayload) (*bean.CreateJobEnvOverridePayload, error)
- func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentGet(appId int) ([]bean.JobEnvOverrideResponse, error)
- func (impl ConfigMapServiceImpl) ConfigSecretGlobalBulkPatch(bulkPatchRequest *bean.BulkPatchRequest) (*bean.BulkPatchRequest, error)
- type ConfigsList
- type CustomTagService
- type CustomTagServiceImpl
- func (impl *CustomTagServiceImpl) CreateOrUpdateCustomTag(tag *bean.CustomTag) error
- func (impl *CustomTagServiceImpl) DeactivateImagePathReservation(id int) error
- func (impl *CustomTagServiceImpl) DeleteCustomTagIfExists(tag bean.CustomTag) error
- func (impl *CustomTagServiceImpl) GenerateImagePath(entityKey int, entityValue string, dockerRegistryURL string, dockerRepo string) (*repository.ImagePathReservation, error)
- func (impl *CustomTagServiceImpl) GetActiveCustomTagByEntityKeyAndValue(entityKey int, entityValue string) (*repository.CustomTag, error)
- func (impl *CustomTagServiceImpl) GetCustomTagByEntityKeyAndValue(entityKey int, entityValue string) (*repository.CustomTag, error)
- type DbConfigBean
- type DbConfigService
- type DbConfigServiceImpl
- func (impl DbConfigServiceImpl) GetAll() (dbConfigs []*DbConfigBean, err error)
- func (impl DbConfigServiceImpl) GetById(id int) (dbConfig *DbConfigBean, err error)
- func (impl DbConfigServiceImpl) GetForAutocomplete() (dbConfigs []*DbConfigBean, err error)
- func (impl DbConfigServiceImpl) Save(dbConfigBean *DbConfigBean) (dbConfig *DbConfigBean, err error)
- func (impl DbConfigServiceImpl) Update(dbConfigBean *DbConfigBean) (dbConfig *DbConfigBean, err error)
- type DbMigrationConfigBean
- type DbMigrationService
- type DbMigrationServiceImpl
- func (impl DbMigrationServiceImpl) GetByPipelineId(pipelineId int) (*DbMigrationConfigBean, error)
- func (impl DbMigrationServiceImpl) Save(bean *DbMigrationConfigBean) (*DbMigrationConfigBean, error)
- func (impl DbMigrationServiceImpl) Update(bean *DbMigrationConfigBean) (*DbMigrationConfigBean, error)
- type Deployment
- type DeploymentConfigService
- type DeploymentConfigServiceImpl
- func (impl *DeploymentConfigServiceImpl) GetLatestCMCSConfig(pipeline *pipelineConfig.Pipeline, userHasAdminAccess bool) ([]*history.ComponentLevelHistoryDetailDto, ...)
- func (impl *DeploymentConfigServiceImpl) GetLatestDeploymentConfigurationByPipelineId(ctx context.Context, pipelineId int, userHasAdminAccess bool) (*history.AllDeploymentConfigurationDetail, error)
- func (impl *DeploymentConfigServiceImpl) GetLatestDeploymentTemplateConfig(ctx context.Context, pipeline *pipelineConfig.Pipeline) (*history.HistoryDetailDto, error)
- func (impl *DeploymentConfigServiceImpl) GetLatestPipelineStrategyConfig(pipeline *pipelineConfig.Pipeline) (*history.HistoryDetailDto, error)
- func (impl *DeploymentConfigServiceImpl) GetMergedCMCSConfigMap(appLevelConfig, envLevelConfig string, configType repository2.ConfigType) (map[string]*history.ConfigData, error)
- type DeploymentGroupAppWithEnv
- type DeploymentServiceTypeConfig
- type DeploymentType
- type DevtronAppCMCSService
- type DevtronAppCMCSServiceImpl
- type DevtronAppConfigService
- type DevtronAppConfigServiceImpl
- func (impl *DevtronAppConfigServiceImpl) CreateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
- func (impl *DevtronAppConfigServiceImpl) DeleteApp(appId int, userId int32) error
- func (impl *DevtronAppConfigServiceImpl) FindAllMatchesByAppName(appName string, appType helper.AppType) ([]*AppBean, error)
- func (impl *DevtronAppConfigServiceImpl) FindAppsByTeamId(teamId int) ([]*AppBean, error)
- func (impl *DevtronAppConfigServiceImpl) FindAppsByTeamName(teamName string) ([]AppBean, error)
- func (impl *DevtronAppConfigServiceImpl) FindByIds(ids []*int) ([]*AppBean, error)
- func (impl *DevtronAppConfigServiceImpl) GetApp(appId int) (application *bean.CreateAppDTO, err error)
- func (impl *DevtronAppConfigServiceImpl) GetAppList() ([]AppBean, error)
- func (impl *DevtronAppConfigServiceImpl) GetAppListForEnvironment(request resourceGroup.ResourceGroupingRequest) ([]*AppBean, error)
- type DevtronAppStrategyService
- type DevtronAppStrategyServiceImpl
- type DisabledFields
- type DockerArtifactStoreBean
- type DockerRegistryConfig
- type DockerRegistryConfigImpl
- func (impl DockerRegistryConfigImpl) CheckInActiveDockerAccount(storeId string) (bool, error)
- func (impl DockerRegistryConfigImpl) ConfigureOCIRegistry(bean *DockerArtifactStoreBean, isUpdate bool, userId int32, tx *pg.Tx) error
- func (impl DockerRegistryConfigImpl) Create(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) CreateOrUpdateOCIRegistryConfig(ociRegistryConfig *repository.OCIRegistryConfig, userId int32, tx *pg.Tx) error
- func (impl DockerRegistryConfigImpl) Delete(storeId string) (string, error)
- func (impl DockerRegistryConfigImpl) DeleteReg(bean *DockerArtifactStoreBean) error
- func (impl DockerRegistryConfigImpl) FetchAllDockerAccounts() ([]DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) FetchOneDockerAccount(storeId string) (*DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) FilterOCIRegistryConfigForSpecificRepoType(ociRegistryConfigList []*repository.OCIRegistryConfig, repositoryType string) *repository.OCIRegistryConfig
- func (impl DockerRegistryConfigImpl) FilterRegistryBeanListBasedOnStorageTypeAndAction(bean []DockerArtifactStoreBean, storageType string, actionTypes ...string) []DockerArtifactStoreBean
- func (impl DockerRegistryConfigImpl) ListAllActive() ([]DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) PopulateOCIRegistryConfig(store *repository.DockerArtifactStore, storeBean *DockerArtifactStoreBean) *DockerArtifactStoreBean
- func (impl DockerRegistryConfigImpl) Update(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) UpdateInactive(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) ValidateRegistryCredentials(bean *DockerArtifactStoreBean) bool
- func (impl DockerRegistryConfigImpl) ValidateRegistryStorageType(registryId string, storageType string, storageActions ...string) bool
- type DockerRegistryIpsConfigBean
- type EcrConfig
- type EnvironmentOverride
- type GitHostConfig
- type GitHostConfigImpl
- type GitHostRequest
- type GitMetadata
- type GitRegistry
- type GitRegistryConfig
- type GitRegistryConfigImpl
- func (impl GitRegistryConfigImpl) Create(request *GitRegistry) (*GitRegistry, error)
- func (impl GitRegistryConfigImpl) Delete(request *GitRegistry) error
- func (impl GitRegistryConfigImpl) FetchAllGitProviders() ([]GitRegistry, error)
- func (impl GitRegistryConfigImpl) FetchOneGitProvider(providerId string) (*GitRegistry, error)
- func (impl GitRegistryConfigImpl) GetAll() ([]GitRegistry, error)
- func (impl GitRegistryConfigImpl) Update(request *GitRegistry) (*GitRegistry, error)
- func (impl GitRegistryConfigImpl) UpdateGitSensor(provider *repository.GitProvider) error
- type GitTriggerInfoResponse
- type GlobalCMCSDataUpdateDto
- type GlobalCMCSService
- type GlobalCMCSServiceImpl
- func (impl *GlobalCMCSServiceImpl) ConvertGlobalCmcsDbObjectToGlobalCmcsDto(GlobalCMCSDBObject []*repository.GlobalCMCS) []*bean.GlobalCMCSDto
- func (impl *GlobalCMCSServiceImpl) Create(config *bean.GlobalCMCSDto) (*bean.GlobalCMCSDto, error)
- func (impl *GlobalCMCSServiceImpl) DeleteById(id int) error
- func (impl *GlobalCMCSServiceImpl) FindAllActive() ([]*bean.GlobalCMCSDto, error)
- func (impl *GlobalCMCSServiceImpl) FindAllActiveByPipelineType(pipelineType string) ([]*bean.GlobalCMCSDto, error)
- func (impl *GlobalCMCSServiceImpl) GetGlobalCMCSDataByConfigTypeAndName(configName string, configType string) (*bean.GlobalCMCSDto, error)
- func (impl *GlobalCMCSServiceImpl) UpdateDataById(config *GlobalCMCSDataUpdateDto) (*GlobalCMCSDataUpdateDto, error)
- type ImageTaggingRequestDTO
- type ImageTaggingResponseDTO
- type ImageTaggingService
- type ImageTaggingServiceConfig
- type ImageTaggingServiceImpl
- func (impl ImageTaggingServiceImpl) CreateOrUpdateImageTagging(ciPipelineId, appId, artifactId, userId int, ...) (*ImageTaggingResponseDTO, error)
- func (impl ImageTaggingServiceImpl) FindProdEnvExists(externalCi bool, pipelineIds []int) (bool, error)
- func (impl ImageTaggingServiceImpl) GetImageCommentsDataMapByArtifactIds(artifactIds []int) (map[int]*repository.ImageComment, error)
- func (impl ImageTaggingServiceImpl) GetImageTaggingServiceConfig() ImageTaggingServiceConfig
- func (impl ImageTaggingServiceImpl) GetProdEnvByCdPipelineId(pipelineId int) (bool, error)
- func (impl ImageTaggingServiceImpl) GetProdEnvFromParentAndLinkedWorkflow(ciPipelineId int) (bool, error)
- func (impl ImageTaggingServiceImpl) GetTagsByArtifactId(artifactId int) ([]*repository.ImageTag, error)
- func (impl ImageTaggingServiceImpl) GetTagsData(ciPipelineId, appId, artifactId int, externalCi bool) (*ImageTaggingResponseDTO, error)
- func (impl ImageTaggingServiceImpl) GetTagsDataMapByAppId(appId int) (map[int][]*repository.ImageTag, error)
- func (impl ImageTaggingServiceImpl) GetUniqueTagsByAppId(appId int) ([]string, error)
- func (impl ImageTaggingServiceImpl) ValidateImageTaggingRequest(imageTaggingRequest *ImageTaggingRequestDTO, appId, artifactId int) (bool, error)
- type KeyValue
- type PipelineBuilder
- type PipelineBuilderImpl
- type PipelineStageService
- type PipelineStageServiceImpl
- func (impl *PipelineStageServiceImpl) BuildCiStageData(ciStage *repository.PipelineStage) (*bean.PipelineStageDto, error)
- func (impl *PipelineStageServiceImpl) BuildInlineStepData(step *repository.PipelineStageStep) (*bean.InlineStepDetailDto, error)
- func (impl *PipelineStageServiceImpl) BuildInlineStepDataDeepCopy(step *repository.PipelineStageStep) (*bean.InlineStepDetailDto, error)
- func (impl *PipelineStageServiceImpl) BuildPipelineStageDataDeepCopy(pipelineStage *repository.PipelineStage) (*bean.PipelineStageDto, error)
- func (impl *PipelineStageServiceImpl) BuildPipelineStageDataForWfRequest(pipelineStage *repository.PipelineStage) ([]*bean.StepObject, []int, error)
- func (impl *PipelineStageServiceImpl) BuildPipelineStepDataForWfRequest(step *repository.PipelineStageStep) (*bean.StepObject, error)
- func (impl *PipelineStageServiceImpl) BuildPluginStepDataForWfRequest(step *repository2.PluginStep) (*bean.StepObject, error)
- func (impl *PipelineStageServiceImpl) BuildPluginVariableAndConditionDataForWfRequest(stepId int) ([]*bean.VariableObject, []*bean.VariableObject, []*bean.ConditionObject, ...)
- func (impl *PipelineStageServiceImpl) BuildPrePostAndRefPluginStepsDataForWfRequest(pipelineId int, stageType string, scope resourceQualifiers.Scope) (*bean.PrePostAndRefPluginStepsResponse, error)
- func (impl *PipelineStageServiceImpl) BuildRefPluginStepData(step *repository.PipelineStageStep) (*bean.RefPluginStepDetailDto, error)
- func (impl *PipelineStageServiceImpl) BuildRefPluginStepDataDeepCopy(step *repository.PipelineStageStep) (*bean.RefPluginStepDetailDto, error)
- func (impl *PipelineStageServiceImpl) BuildRefPluginStepDataForWfRequest(refPluginIds []int) ([]*bean.RefPluginObject, error)
- func (impl *PipelineStageServiceImpl) BuildVariableAndConditionDataByStepId(stepId int) ([]*bean.StepVariableDto, []*bean.StepVariableDto, []*bean.ConditionDetailDto, ...)
- func (impl *PipelineStageServiceImpl) BuildVariableAndConditionDataByStepIdDeepCopy(stepId int) ([]*bean.StepVariableDto, []*bean.StepVariableDto, []*bean.ConditionDetailDto, ...)
- func (impl *PipelineStageServiceImpl) BuildVariableAndConditionDataForWfRequest(stepId int) ([]*bean.VariableObject, []*bean.VariableObject, []*bean.ConditionObject, ...)
- func (impl *PipelineStageServiceImpl) CreateConditions(stepId int, conditions []*bean.ConditionDetailDto, ...) error
- func (impl *PipelineStageServiceImpl) CreateConditionsEntryInDb(stepId int, conditions []*bean.ConditionDetailDto, ...) ([]repository.PipelineStageStepCondition, error)
- func (impl *PipelineStageServiceImpl) CreateInputAndOutputVariables(stepId int, inputVariables []*bean.StepVariableDto, ...) (inputVariablesRepo []repository.PipelineStageStepVariable, ...)
- func (impl *PipelineStageServiceImpl) CreatePipelineStage(stageReq *bean.PipelineStageDto, stageType repository.PipelineStageType, ...) error
- func (impl *PipelineStageServiceImpl) CreateScriptAndMappingForInlineStep(inlineStepDetail *bean.InlineStepDetailDto, userId int32, tx *pg.Tx) (scriptId int, err error)
- func (impl *PipelineStageServiceImpl) CreateStageSteps(steps []*bean.PipelineStageStepDto, stageId int, userId int32, ...) error
- func (impl *PipelineStageServiceImpl) CreateVariablesEntryInDb(stepId int, variables []*bean.StepVariableDto, ...) ([]repository.PipelineStageStepVariable, error)
- func (impl *PipelineStageServiceImpl) DeletePipelineStage(stageReq *bean.PipelineStageDto, userId int32, tx *pg.Tx) error
- func (impl *PipelineStageServiceImpl) DeletePipelineStageIfReq(stageReq *bean.PipelineStageDto, userId int32) (error, bool)
- func (impl *PipelineStageServiceImpl) FilterAndActOnStepsInPipelineStageUpdateRequest(stageReq *bean.PipelineStageDto, userId int32) error
- func (impl *PipelineStageServiceImpl) GetCdPipelineStageDataDeepCopy(cdPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error)
- func (impl *PipelineStageServiceImpl) GetCdPipelineStageDataDeepCopyForPipelineIds(cdPipelineIds []int) (map[int][]*bean.PipelineStageDto, error)
- func (impl *PipelineStageServiceImpl) GetCdStageByCdPipelineIdAndStageType(cdPipelineId int, stageType repository.PipelineStageType) (*repository.PipelineStage, error)
- func (impl *PipelineStageServiceImpl) GetCiPipelineStageData(ciPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error)
- func (impl *PipelineStageServiceImpl) GetCiPipelineStageDataDeepCopy(ciPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error)
- func (impl *PipelineStageServiceImpl) GetRefPluginStepsByIds(refPluginIds []int, pluginIdsEvaluated map[int]bool) (map[int][]*bean.StepObject, error)
- func (impl *PipelineStageServiceImpl) UpdateInputAndOutputVariables(stepId int, inputVariables []*bean.StepVariableDto, ...) (inputVarNameIdMap map[string]int, outputVarNameIdMap map[string]int, err error)
- func (impl *PipelineStageServiceImpl) UpdatePipelineStage(stageReq *bean.PipelineStageDto, stageType repository.PipelineStageType, ...) error
- func (impl *PipelineStageServiceImpl) UpdatePipelineStageStepConditions(stepId int, conditions []*bean.ConditionDetailDto, ...) ([]repository.PipelineStageStepCondition, error)
- func (impl *PipelineStageServiceImpl) UpdatePipelineStageStepVariables(stepId int, variables []*bean.StepVariableDto, ...) (map[string]int, error)
- func (impl *PipelineStageServiceImpl) UpdateScriptAndMappingForInlineStep(inlineStepDetail *bean.InlineStepDetailDto, scriptId int, userId int32) (err error)
- func (impl *PipelineStageServiceImpl) UpdateStageSteps(steps []*bean.PipelineStageStepDto, userId int32, stageId int, ...) error
- type PipelineStrategiesResponse
- type PipelineStrategy
- type PodRotateRequest
- type PropertiesConfigService
- type PropertiesConfigServiceImpl
- func (impl PropertiesConfigServiceImpl) CreateEnvironmentProperties(appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error)
- func (impl PropertiesConfigServiceImpl) CreateEnvironmentPropertiesWithNamespace(appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error)
- func (impl PropertiesConfigServiceImpl) CreateIfRequired(chart *chartRepoRepository.Chart, environmentId int, userId int32, ...) (*chartConfig.EnvConfigOverride, error)
- func (impl PropertiesConfigServiceImpl) EnvMetricsEnableDisable(appMetricRequest *chartService.AppMetricEnableDisableRequest) (*chartService.AppMetricEnableDisableRequest, error)
- func (impl PropertiesConfigServiceImpl) FetchEnvProperties(appId, envId, chartRefId int) (*chartConfig.EnvConfigOverride, error)
- func (impl PropertiesConfigServiceImpl) FindEnvLevelAppMetricsByAppIdAndEnvId(appId int, envId int) (*repository.EnvLevelAppMetrics, error)
- func (impl PropertiesConfigServiceImpl) GetAppIdByChartEnvId(chartEnvId int) (*chartConfig.EnvConfigOverride, error)
- func (impl PropertiesConfigServiceImpl) GetEnvironmentProperties(appId, environmentId int, chartRefId int) (environmentPropertiesResponse *bean.EnvironmentPropertiesResponse, err error)
- func (impl PropertiesConfigServiceImpl) GetEnvironmentPropertiesById(envId int) ([]bean.EnvironmentProperties, error)
- func (impl PropertiesConfigServiceImpl) GetLatestEnvironmentProperties(appId, environmentId int) (environmentProperties *bean.EnvironmentProperties, err error)
- func (impl PropertiesConfigServiceImpl) ResetEnvironmentProperties(id int) (bool, error)
- func (impl PropertiesConfigServiceImpl) UpdateEnvironmentProperties(appId int, propertiesRequest *bean.EnvironmentProperties, userId int32) (*bean.EnvironmentProperties, error)
- type RequestType
- type SecretsList
- type SecurityConfig
- type StopAppRequest
- type StopDeploymentGroupRequest
- type SystemWorkflowExecutor
- type SystemWorkflowExecutorImpl
- type Task
- type TaskYaml
- type TeamAppBean
- type Trigger
- type WebhookEventDataConfig
- type WebhookEventDataConfigImpl
- type WebhookEventDataRequest
- type WebhookService
- type WebhookServiceImpl
- func (impl WebhookServiceImpl) AuthenticateExternalCiWebhook(apiKey string) (int, error)
- func (impl *WebhookServiceImpl) BuildPayload(request *CiArtifactWebhookRequest, pipeline *pipelineConfig.CiPipeline) *client.Payload
- func (impl WebhookServiceImpl) HandleCiStepFailedEvent(ciPipelineId int, request *CiArtifactWebhookRequest) (err error)
- func (impl WebhookServiceImpl) HandleCiSuccessEvent(ciPipelineId int, request *CiArtifactWebhookRequest, imagePushedAt *time.Time) (id int, err error)
- func (impl WebhookServiceImpl) HandleExternalCiWebhook(externalCiId int, request *CiArtifactWebhookRequest, ...) (id int, err error)
- func (impl *WebhookServiceImpl) HandleMultipleImagesFromEvent(imageDetails []types.ImageDetail, ciWorkflowId int) (map[string]*pipelineConfig.CiWorkflow, error)
- func (impl *WebhookServiceImpl) WriteCIStepFailedEvent(pipeline *pipelineConfig.CiPipeline, request *CiArtifactWebhookRequest, ...)
- func (impl *WebhookServiceImpl) WriteCISuccessEvent(request *CiArtifactWebhookRequest, pipeline *pipelineConfig.CiPipeline, ...)
- type WorkflowDagExecutor
- type WorkflowDagExecutorImpl
- func (impl *WorkflowDagExecutorImpl) BuildManifestForTrigger(overrideRequest *bean.ValuesOverrideRequest, triggeredAt time.Time, ...) (valuesOverrideResponse *app.ValuesOverrideResponse, builtChartPath string, ...)
- func (impl *WorkflowDagExecutorImpl) BuildManifestPushTemplate(overrideRequest *bean.ValuesOverrideRequest, ...) (*bean4.ManifestPushTemplate, error)
- func (impl *WorkflowDagExecutorImpl) CreateHistoriesForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, ...) error
- func (impl *WorkflowDagExecutorImpl) DeployApp(overrideRequest *bean.ValuesOverrideRequest, ...) error
- func (impl *WorkflowDagExecutorImpl) DeployArgocdApp(overrideRequest *bean.ValuesOverrideRequest, ...) error
- func (impl *WorkflowDagExecutorImpl) GetAppMetricsByTriggerType(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (bool, error)
- func (impl *WorkflowDagExecutorImpl) GetArtifactVulnerabilityStatus(artifact *repository.CiArtifact, cdPipeline *pipelineConfig.Pipeline, ...) (bool, error)
- func (impl *WorkflowDagExecutorImpl) GetDeploymentStrategyByTriggerType(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (*chartConfig.PipelineStrategy, error)
- func (impl *WorkflowDagExecutorImpl) GetEnvOverrideByTriggerType(overrideRequest *bean.ValuesOverrideRequest, triggeredAt time.Time, ...) (*chartConfig.EnvConfigOverride, error)
- func (impl *WorkflowDagExecutorImpl) GetManifestPushService(triggerEvent bean.TriggerEvent) app.ManifestPushService
- func (impl *WorkflowDagExecutorImpl) GetTriggerEvent(deploymentAppType string, triggeredAt time.Time, deployedBy int32) bean.TriggerEvent
- func (impl *WorkflowDagExecutorImpl) GetValuesOverrideForTrigger(overrideRequest *bean.ValuesOverrideRequest, triggeredAt time.Time, ...) (*app.ValuesOverrideResponse, error)
- func (impl *WorkflowDagExecutorImpl) HandleCiSuccessEvent(artifact *repository.CiArtifact, applyAuth bool, async bool, triggeredBy int32) error
- func (impl *WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent(pipelineOverride *chartConfig.PipelineOverride) error
- func (impl *WorkflowDagExecutorImpl) HandlePostStageSuccessEvent(cdWorkflowId int, cdPipelineId int, triggeredBy int32) error
- func (impl *WorkflowDagExecutorImpl) HandlePreStageSuccessEvent(cdStageCompleteEvent CdStageCompleteEvent) error
- func (impl *WorkflowDagExecutorImpl) HandleWebhookExternalCiEvent(artifact *repository.CiArtifact, triggeredBy int32, externalCiId int, ...) (bool, error)
- func (impl *WorkflowDagExecutorImpl) ManualCdTrigger(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (int, error)
- func (impl *WorkflowDagExecutorImpl) MarkImageScanDeployed(appId int, envId int, imageDigest string, clusterId int, isScanEnabled bool) error
- func (impl *WorkflowDagExecutorImpl) RotatePods(ctx context.Context, podRotateRequest *PodRotateRequest) (*k8s.RotatePodResponse, error)
- func (impl *WorkflowDagExecutorImpl) SetPipelineFieldsInOverrideRequest(overrideRequest *bean.ValuesOverrideRequest, pipeline *pipelineConfig.Pipeline)
- func (impl *WorkflowDagExecutorImpl) StopStartApp(stopRequest *StopAppRequest, ctx context.Context) (int, error)
- func (impl *WorkflowDagExecutorImpl) Subscribe() error
- func (impl *WorkflowDagExecutorImpl) TriggerBulkDeploymentAsync(requests []*BulkTriggerRequest, UserId int32) (interface{}, error)
- func (impl *WorkflowDagExecutorImpl) TriggerBulkHibernateAsync(request StopDeploymentGroupRequest, ctx context.Context) (interface{}, error)
- func (impl *WorkflowDagExecutorImpl) TriggerCD(artifact *repository.CiArtifact, cdWorkflowId, wfrId int, ...) error
- func (impl *WorkflowDagExecutorImpl) TriggerDeployment(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, ...) error
- func (impl *WorkflowDagExecutorImpl) TriggerPipeline(overrideRequest *bean.ValuesOverrideRequest, triggerEvent bean.TriggerEvent, ...) (releaseNo int, manifest []byte, err error)
- func (impl *WorkflowDagExecutorImpl) TriggerPostStage(cdWf *pipelineConfig.CdWorkflow, pipeline *pipelineConfig.Pipeline, ...) error
- func (impl *WorkflowDagExecutorImpl) TriggerPreStage(ctx context.Context, cdWf *pipelineConfig.CdWorkflow, ...) error
- func (impl *WorkflowDagExecutorImpl) TriggerRelease(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context, ...) (releaseNo int, manifest []byte, err error)
- func (impl *WorkflowDagExecutorImpl) ValidateTriggerEvent(triggerEvent bean.TriggerEvent) (bool, error)
- func (impl *WorkflowDagExecutorImpl) WriteCDTriggerEvent(overrideRequest *bean.ValuesOverrideRequest, artifact *repository.CiArtifact, ...)
- type WorkflowExecutor
- type WorkflowRequest
- func (workflowRequest *WorkflowRequest) AddNodeConstraintsFromConfig(workflowTemplate *bean.WorkflowTemplate, config *CiCdConfig)
- func (workflowRequest *WorkflowRequest) CheckBlobStorageConfig(config *CiCdConfig) bool
- func (workflowRequest *WorkflowRequest) CheckForJob() bool
- func (workflowRequest *WorkflowRequest) GetBlobStorageLogsKey(config *CiCdConfig) string
- func (workflowRequest *WorkflowRequest) GetConfiguredCmCs() (map[string]bool, map[string]bool, error)
- func (workflowRequest *WorkflowRequest) GetEventTypeForWorkflowRequest() string
- func (workflowRequest *WorkflowRequest) GetExistingCmCsNamePrefix() string
- func (workflowRequest *WorkflowRequest) GetGlobalCmCsNamePrefix() string
- func (workflowRequest *WorkflowRequest) GetLimitReqCpuMem(config *CiCdConfig) v12.ResourceRequirements
- func (workflowRequest *WorkflowRequest) GetNodeConstraints(config *CiCdConfig) *bean.NodeConstraints
- func (workflowRequest *WorkflowRequest) GetWorkflowJson(config *CiCdConfig) ([]byte, error)
- func (workflowRequest *WorkflowRequest) GetWorkflowMainContainer(config *CiCdConfig, workflowJson []byte, ...) (v12.Container, error)
- func (workflowRequest *WorkflowRequest) GetWorkflowTemplate(workflowJson []byte, config *CiCdConfig) bean.WorkflowTemplate
- func (workflowRequest *WorkflowRequest) GetWorkflowTypeForWorkflowRequest() string
- type WorkflowResponse
- type WorkflowService
- type WorkflowServiceImpl
- func (impl *WorkflowServiceImpl) GetWorkflow(name string, namespace string, isExt bool, environment *repository.Environment) (*v1alpha1.Workflow, error)
- func (impl *WorkflowServiceImpl) SubmitWorkflow(workflowRequest *WorkflowRequest) (*unstructured.UnstructuredList, error)
- func (impl *WorkflowServiceImpl) TerminateWorkflow(executorType pipelineConfig.WorkflowExecutorType, name string, ...) error
- type WorkflowStatus
Constants ¶
const ( STEP_NAME_REGEX = "create-env-%s-gb-%d" TEMPLATE_NAME_REGEX = "%s-gb-%d" WORKFLOW_MINIO_CRED = "workflow-minio-cred" CRED_ACCESS_KEY = "accessKey" CRED_SECRET_KEY = "secretKey" S3_ENDPOINT_URL = "s3.amazonaws.com" DEVTRON_WORKFLOW_LABEL_KEY = "devtron.ai/workflow-purpose" DEVTRON_WORKFLOW_LABEL_VALUE = "cd" WORKFLOW_GENERATE_NAME_REGEX = "%s-" RESOURCE_CREATE_ACTION = "create" )
const ( DEVTRON_APP_HELM_PIPELINE_STATUS_UPDATE_CRON = "DTAppHelmPipelineStatusUpdateCron" DEVTRON_APP_ARGO_PIPELINE_STATUS_UPDATE_CRON = "DTAppArgoPipelineStatusUpdateCron" HELM_APP_ARGO_PIPELINE_STATUS_UPDATE_CRON = "HelmAppArgoPipelineStatusUpdateCron" )
const ( ExternalCiWebhookPath = "orchestrator/webhook/ext-ci" DevMode = "DEV" ProdMode = "PROD" CiConfigType = "CiConfig" CdConfigType = "CdConfig" )
const ( KubernetesSecret string = "KubernetesSecret" AWSSecretsManager string = "AWSSecretsManager" AWSSystemManager string = "AWSSystemManager" HashiCorpVault string = "HashiCorpVault" )
const ( WORKFLOW_JOB_BACKOFF_LIMIT = 0 WORKFLOW_JOB_FINALIZER = "foregroundDeletion" )
const ( CD_PIPELINE_ENV_NAME_KEY = "CD_PIPELINE_ENV_NAME" CD_PIPELINE_CLUSTER_NAME_KEY = "CD_PIPELINE_CLUSTER_NAME" GIT_COMMIT_HASH_PREFIX = "GIT_COMMIT_HASH" GIT_SOURCE_TYPE_PREFIX = "GIT_SOURCE_TYPE" GIT_SOURCE_VALUE_PREFIX = "GIT_SOURCE_VALUE" GIT_METADATA = "GIT_METADATA" GIT_SOURCE_COUNT = "GIT_SOURCE_COUNT" APP_LABEL_KEY_PREFIX = "APP_LABEL_KEY" APP_LABEL_VALUE_PREFIX = "APP_LABEL_VALUE" APP_LABEL_METADATA = "APP_LABEL_METADATA" APP_LABEL_COUNT = "APP_LABEL_COUNT" CHILD_CD_ENV_NAME_PREFIX = "CHILD_CD_ENV_NAME" CHILD_CD_CLUSTER_NAME_PREFIX = "CHILD_CD_CLUSTER_NAME" CHILD_CD_METADATA = "CHILD_CD_METADATA" CHILD_CD_COUNT = "CHILD_CD_COUNT" DOCKER_IMAGE = "DOCKER_IMAGE" DEPLOYMENT_RELEASE_ID = "DEPLOYMENT_RELEASE_ID" DEPLOYMENT_UNIQUE_ID = "DEPLOYMENT_UNIQUE_ID" CD_TRIGGERED_BY = "CD_TRIGGERED_BY" CD_TRIGGER_TIME = "CD_TRIGGER_TIME" APP_NAME = "APP_NAME" DEVTRON_CD_TRIGGERED_BY = "DEVTRON_CD_TRIGGERED_BY" DEVTRON_CD_TRIGGER_TIME = "DEVTRON_CD_TRIGGER_TIME" )
const ( BLOB_STORAGE_AZURE = "AZURE" BLOB_STORAGE_S3 = "S3" BLOB_STORAGE_GCP = "GCP" BLOB_STORAGE_MINIO = "MINIO" CI_NODE_SELECTOR_APP_LABEL_KEY = "devtron.ai/node-selector" CI_NODE_PVC_ALL_ENV = "devtron.ai/ci-pvc-all" CI_NODE_PVC_PIPELINE_PREFIX = "devtron.ai/ci-pvc" PRE = "PRE" POST = "POST" )
const AFTER_DOCKER_BUILD string = "AFTER_DOCKER_BUILD"
const BEFORE_DOCKER_BUILD string = "BEFORE_DOCKER_BUILD"
const CiStageFailErrorCode = 2
const CommentKey = "comment"
const DashboardConfigMap = "dashboard-cm"
const DefaultCiWorkflowNamespace = "devtron-ci"
const DuplicateTagsInAppError = "cannot create duplicate tags in the same app"
const NotDeployed = "Not Deployed"
const NotTriggered string = "Not Triggered"
const POD_DELETED_MESSAGE = "pod deleted"
const Running = "Running"
const SECURITY_SCANNING = "FORCE_SECURITY_SCANNING"
const Starting = "Starting"
const TagsKey = "tags"
const WorkflowCancel = "CANCELLED"
const WorklowTypeDeploy = "DEPLOY"
const WorklowTypePost = "POST"
const WorklowTypePre = "PRE"
Variables ¶
var ACCESS_KEY_SELECTOR = &v12.SecretKeySelector{Key: CRED_ACCESS_KEY, LocalObjectReference: v12.LocalObjectReference{Name: WORKFLOW_MINIO_CRED}}
var ArgoWorkflowOwnerRef = v1.OwnerReference{APIVersion: "argoproj.io/v1alpha1", Kind: "Workflow", Name: "{{workflow.name}}", UID: "{{workflow.uid}}", BlockOwnerDeletion: &[]bool{true}[0]}
var DefaultPipelineValue = []byte(`{"ConfigMaps":{"enabled":false},"ConfigSecrets":{"enabled":false},"ContainerPort":[],"EnvVariables":[],"GracePeriod":30,"LivenessProbe":{},"MaxSurge":1,"MaxUnavailable":0,"MinReadySeconds":60,"ReadinessProbe":{},"Spec":{"Affinity":{"Values":"nodes","key":""}},"app":"13","appMetrics":false,"args":{},"autoscaling":{},"command":{"enabled":false,"value":[]},"containers":[],"dbMigrationConfig":{"enabled":false},"deployment":{"strategy":{"rolling":{"maxSurge":"25%","maxUnavailable":1}}},"deploymentType":"ROLLING","env":"1","envoyproxy":{"configMapName":"","image":"","resources":{"limits":{"cpu":"50m","memory":"50Mi"},"requests":{"cpu":"50m","memory":"50Mi"}}},"image":{"pullPolicy":"IfNotPresent"},"ingress":{},"ingressInternal":{"annotations":{},"enabled":false,"host":"","path":"","tls":[]},"initContainers":[],"pauseForSecondsBeforeSwitchActive":30,"pipelineName":"","prometheus":{"release":"monitoring"},"rawYaml":[],"releaseVersion":"1","replicaCount":1,"resources":{"limits":{"cpu":"0.05","memory":"50Mi"},"requests":{"cpu":"0.01","memory":"10Mi"}},"secret":{"data":{},"enabled":false},"server":{"deployment":{"image":"","image_tag":""}},"service":{"annotations":{},"type":"ClusterIP"},"servicemonitor":{"additionalLabels":{}},"tolerations":[],"volumeMounts":[],"volumes":[],"waitForSecondsBeforeScalingDown":30}`)
var SECRET_KEY_SELECTOR = &v12.SecretKeySelector{Key: CRED_SECRET_KEY, LocalObjectReference: v12.LocalObjectReference{Name: WORKFLOW_MINIO_CRED}}
Functions ¶
func AddTemplatesForGlobalSecretsInWorkflowTemplate ¶ added in v0.6.17
func AddTemplatesForGlobalSecretsInWorkflowTemplate(globalCmCsConfigs []*bean.GlobalCMCSDto, steps *[]v1alpha1.ParallelSteps, volumes *[]v12.Volume, templates *[]v1alpha1.Template) error
func CheckIfReTriggerRequired ¶ added in v0.6.24
func ConvertStageYamlScriptsToPipelineStageSteps ¶ added in v0.6.21
func ConvertStageYamlScriptsToPipelineStageSteps(cdPipeline *bean2.CDPipelineConfigObject) (*bean2.CDPipelineConfigObject, error)
func CreatePreAndPostStageResponse ¶ added in v0.6.21
func CreatePreAndPostStageResponse(cdPipeline *bean2.CDPipelineConfigObject, version string) (*bean2.CDPipelineConfigObject, error)
func ExtractVolumesFromCmCs ¶ added in v0.6.17
func ExtractVolumesFromCmCs(configMaps []bean2.ConfigSecretMap, secrets []bean2.ConfigSecretMap) []v12.Volume
func GetClientInstance ¶ added in v0.6.24
func GetConfigMapBody ¶ added in v0.6.17
func GetConfigMapBody(configMapSecretDto ConfigMapSecretDto) v12.ConfigMap
func GetConfigMapJson ¶ added in v0.6.17
func GetConfigMapJson(configMapSecretDto ConfigMapSecretDto) (string, error)
func GetFromGlobalCmCsDtos ¶ added in v0.6.17
func GetFromGlobalCmCsDtos(globalCmCsConfigs []*bean.GlobalCMCSDto) ([]bean2.ConfigSecretMap, []bean2.ConfigSecretMap, error)
func GetSecretBody ¶ added in v0.6.17
func GetSecretBody(configMapSecretDto ConfigMapSecretDto) v12.Secret
func GetSecretJson ¶ added in v0.6.17
func GetSecretJson(configMapSecretDto ConfigMapSecretDto) (string, error)
func ModifySshPrivateKey ¶ added in v0.2.32
func ModifySshPrivateKey(sshPrivateKey string, authMode repository.AuthMode) string
Modifying Ssh Private Key because Ssh key authentication requires a new-line at the end of string & there are chances that user skips sending \n
func NewDockerArtifactStore ¶ added in v0.6.15
func SetGitCommitValuesForBuildingCommitHash ¶ added in v0.2.36
func SetGitCommitValuesForBuildingCommitHash(ciMaterial *pipelineConfig.CiPipelineMaterial, oldGitCommit pipelineConfig.GitCommit) pipelineConfig.GitCommit
func StageStepsToCdStageAdapter ¶ added in v0.6.21
func StageStepsToCdStageAdapter(deployStage *bean.PipelineStageDto) (*bean2.CdStage, error)
func StageYamlToPipelineStageAdapter ¶ added in v0.6.21
func StageYamlToPipelineStageAdapter(stageConfig string, stageType repository2.PipelineStageType, triggerType pipelineConfig.TriggerType) (*bean.PipelineStageDto, error)
func UpdateContainerEnvsFromCmCs ¶ added in v0.6.17
func UpdateContainerEnvsFromCmCs(workflowMainContainer *v12.Container, configMaps []bean2.ConfigSecretMap, secrets []bean2.ConfigSecretMap)
Types ¶
type AppArtifactManager ¶ added in v0.6.24
type AppArtifactManager interface { //RetrieveArtifactsByCDPipeline : RetrieveArtifactsByCDPipeline returns all the artifacts for the cd pipeline (pre / deploy / post) RetrieveArtifactsByCDPipeline(pipeline *pipelineConfig.Pipeline, stage bean.WorkflowType) (*bean2.CiArtifactResponse, error) //FetchArtifactForRollback : FetchArtifactForRollback(cdPipelineId, appId, offset, limit int) (bean2.CiArtifactResponse, error) BuildArtifactsForCdStage(pipelineId int, stageType bean.WorkflowType, ciArtifacts []bean2.CiArtifactBean, artifactMap map[int]int, parent bool, limit int, parentCdId int) ([]bean2.CiArtifactBean, map[int]int, int, string, error) BuildArtifactsForParentStage(cdPipelineId int, parentId int, parentType bean.WorkflowType, ciArtifacts []bean2.CiArtifactBean, artifactMap map[int]int, limit int, parentCdId int) ([]bean2.CiArtifactBean, error) }
type AppArtifactManagerImpl ¶ added in v0.6.24
type AppArtifactManagerImpl struct {
// contains filtered or unexported fields
}
func NewAppArtifactManagerImpl ¶ added in v0.6.24
func NewAppArtifactManagerImpl( logger *zap.SugaredLogger, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, userService user.UserService, imageTaggingService ImageTaggingService, ciArtifactRepository repository.CiArtifactRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, pipelineStageService PipelineStageService, cdPipelineConfigService CdPipelineConfigService) *AppArtifactManagerImpl
func (*AppArtifactManagerImpl) BuildArtifactsForCIParent ¶ added in v0.6.24
func (impl *AppArtifactManagerImpl) BuildArtifactsForCIParent(cdPipelineId int, parentId int, parentType bean.WorkflowType, ciArtifacts []bean2.CiArtifactBean, artifactMap map[int]int, limit int) ([]bean2.CiArtifactBean, error)
func (*AppArtifactManagerImpl) BuildArtifactsForCdStage ¶ added in v0.6.24
func (impl *AppArtifactManagerImpl) BuildArtifactsForCdStage(pipelineId int, stageType bean.WorkflowType, ciArtifacts []bean2.CiArtifactBean, artifactMap map[int]int, parent bool, limit int, parentCdId int) ([]bean2.CiArtifactBean, map[int]int, int, string, error)
func (*AppArtifactManagerImpl) BuildArtifactsForParentStage ¶ added in v0.6.24
func (impl *AppArtifactManagerImpl) BuildArtifactsForParentStage(cdPipelineId int, parentId int, parentType bean.WorkflowType, ciArtifacts []bean2.CiArtifactBean, artifactMap map[int]int, limit int, parentCdId int) ([]bean2.CiArtifactBean, error)
func (*AppArtifactManagerImpl) FetchArtifactForRollback ¶ added in v0.6.24
func (impl *AppArtifactManagerImpl) FetchArtifactForRollback(cdPipelineId, appId, offset, limit int) (bean2.CiArtifactResponse, error)
func (*AppArtifactManagerImpl) RetrieveArtifactsByCDPipeline ¶ added in v0.6.24
func (impl *AppArtifactManagerImpl) RetrieveArtifactsByCDPipeline(pipeline *pipelineConfig.Pipeline, stage bean.WorkflowType) (*bean2.CiArtifactResponse, error)
type AppDeploymentTypeChangeManager ¶ added in v0.6.24
type AppDeploymentTypeChangeManager interface { //ChangeDeploymentType : takes in DeploymentAppTypeChangeRequest struct and // deletes all the cd pipelines for that deployment type in all apps that belongs to // that environment and updates the db with desired deployment app type ChangeDeploymentType(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error) //ChangePipelineDeploymentType : takes in DeploymentAppTypeChangeRequest struct and // deletes all the cd pipelines for that deployment type in all apps that belongs to // that environment and updates the db with desired deployment app type ChangePipelineDeploymentType(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error) //TriggerDeploymentAfterTypeChange : TriggerDeploymentAfterTypeChange(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error) //DeleteDeploymentApps : takes in a list of pipelines and delete the applications DeleteDeploymentApps(ctx context.Context, pipelines []*pipelineConfig.Pipeline, userId int32) *bean.DeploymentAppTypeChangeResponse //DeleteDeploymentAppsForEnvironment : takes in environment id and current deployment app type // and deletes all the cd pipelines for that deployment type in all apps that belongs to // that environment. DeleteDeploymentAppsForEnvironment(ctx context.Context, environmentId int, currentDeploymentAppType bean.DeploymentType, exclusionList []int, includeApps []int, userId int32) (*bean.DeploymentAppTypeChangeResponse, error) }
type AppDeploymentTypeChangeManagerImpl ¶ added in v0.6.24
type AppDeploymentTypeChangeManagerImpl struct {
// contains filtered or unexported fields
}
func NewAppDeploymentTypeChangeManagerImpl ¶ added in v0.6.24
func NewAppDeploymentTypeChangeManagerImpl( logger *zap.SugaredLogger, pipelineRepository pipelineConfig.PipelineRepository, workflowDagExecutor WorkflowDagExecutor, appService app2.AppService, chartTemplateService util.ChartTemplateService, appStatusRepository appStatus.AppStatusRepository, helmAppService client.HelmAppService, application application2.ServiceClient, appArtifactManager AppArtifactManager, cdPipelineConfigService CdPipelineConfigService) *AppDeploymentTypeChangeManagerImpl
func (*AppDeploymentTypeChangeManagerImpl) ChangeDeploymentType ¶ added in v0.6.24
func (impl *AppDeploymentTypeChangeManagerImpl) ChangeDeploymentType(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error)
func (*AppDeploymentTypeChangeManagerImpl) ChangePipelineDeploymentType ¶ added in v0.6.24
func (impl *AppDeploymentTypeChangeManagerImpl) ChangePipelineDeploymentType(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error)
func (*AppDeploymentTypeChangeManagerImpl) DeleteDeploymentApps ¶ added in v0.6.24
func (impl *AppDeploymentTypeChangeManagerImpl) DeleteDeploymentApps(ctx context.Context, pipelines []*pipelineConfig.Pipeline, userId int32) *bean.DeploymentAppTypeChangeResponse
func (*AppDeploymentTypeChangeManagerImpl) DeleteDeploymentAppsForEnvironment ¶ added in v0.6.24
func (impl *AppDeploymentTypeChangeManagerImpl) DeleteDeploymentAppsForEnvironment(ctx context.Context, environmentId int, currentDeploymentAppType bean.DeploymentType, exclusionList []int, includeApps []int, userId int32) (*bean.DeploymentAppTypeChangeResponse, error)
func (*AppDeploymentTypeChangeManagerImpl) FetchDeletedApp ¶ added in v0.6.24
func (impl *AppDeploymentTypeChangeManagerImpl) FetchDeletedApp(ctx context.Context, pipelines []*pipelineConfig.Pipeline) *bean.DeploymentAppTypeChangeResponse
func (*AppDeploymentTypeChangeManagerImpl) TriggerDeploymentAfterTypeChange ¶ added in v0.6.24
func (impl *AppDeploymentTypeChangeManagerImpl) TriggerDeploymentAfterTypeChange(ctx context.Context, request *bean.DeploymentAppTypeChangeRequest) (*bean.DeploymentAppTypeChangeResponse, error)
type AppLabelMetadata ¶ added in v0.6.21
type ArgoPipelineStatusSyncEvent ¶ added in v0.6.11
type ArgoWorkflowExecutor ¶ added in v0.6.17
type ArgoWorkflowExecutor interface { WorkflowExecutor }
type ArgoWorkflowExecutorImpl ¶ added in v0.6.17
type ArgoWorkflowExecutorImpl struct {
// contains filtered or unexported fields
}
func NewArgoWorkflowExecutorImpl ¶ added in v0.6.17
func NewArgoWorkflowExecutorImpl(logger *zap.SugaredLogger) *ArgoWorkflowExecutorImpl
func (*ArgoWorkflowExecutorImpl) ExecuteWorkflow ¶ added in v0.6.17
func (impl *ArgoWorkflowExecutorImpl) ExecuteWorkflow(workflowTemplate bean.WorkflowTemplate) (*unstructured.UnstructuredList, error)
func (*ArgoWorkflowExecutorImpl) TerminateWorkflow ¶ added in v0.6.24
type ArtifactsForCiJob ¶ added in v0.6.24
type ArtifactsForCiJob struct {
Artifacts []string `json:"artifacts"`
}
type BuildLogRequest ¶ added in v0.6.0
type BuildLogRequest struct { PipelineId int WorkflowId int PodName string LogsFilePath string Namespace string CloudProvider blob_storage.BlobStorageType AwsS3BaseConfig *blob_storage.AwsS3BaseConfig AzureBlobConfig *blob_storage.AzureBlobBaseConfig GcpBlobBaseConfig *blob_storage.GcpBlobBaseConfig MinioEndpoint string }
type BulkTriggerRequest ¶
type CdHandler ¶
type CdHandler interface { HandleCdStageReTrigger(runner *pipelineConfig.CdWorkflowRunner) error UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, string, error) GetCdBuildHistory(appId int, environmentId int, pipelineId int, offset int, size int) ([]pipelineConfig.CdWorkflowWithArtifact, error) GetRunningWorkflowLogs(environmentId int, pipelineId int, workflowId int) (*bufio.Reader, func() error, error) FetchCdWorkflowDetails(appId int, environmentId int, pipelineId int, buildId int) (WorkflowResponse, error) DownloadCdWorkflowArtifacts(pipelineId int, buildId int) (*os.File, error) FetchCdPrePostStageStatus(pipelineId int) ([]pipelineConfig.CdWorkflowWithArtifact, error) CancelStage(workflowRunnerId int, userId int32) (int, error) FetchAppWorkflowStatusForTriggerView(appId int) ([]*pipelineConfig.CdWorkflowStatus, error) CheckHelmAppStatusPeriodicallyAndUpdateInDb(helmPipelineStatusCheckEligibleTime int, getPipelineDeployedWithinHours int) error CheckArgoAppStatusPeriodicallyAndUpdateInDb(getPipelineDeployedBeforeMinutes int, getPipelineDeployedWithinHours int) error CheckArgoPipelineTimelineStatusPeriodicallyAndUpdateInDb(pendingSinceSeconds int, timeForDegradation int) error UpdatePipelineTimelineAndStatusByLiveApplicationFetch(pipeline *pipelineConfig.Pipeline, installedApp repository3.InstalledApps, userId int32) (err error, isTimelineUpdated bool) CheckAndSendArgoPipelineStatusSyncEventIfNeeded(pipelineId int, userId int32, isAppStoreApplication bool) FetchAppWorkflowStatusForTriggerViewForEnvironment(request resourceGroup2.ResourceGroupingRequest) ([]*pipelineConfig.CdWorkflowStatus, error) FetchAppDeploymentStatusForEnvironments(request resourceGroup2.ResourceGroupingRequest) ([]*pipelineConfig.AppDeploymentStatus, error) }
type CdHandlerImpl ¶
type CdHandlerImpl struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewCdHandlerImpl ¶
func NewCdHandlerImpl(Logger *zap.SugaredLogger, userService user.UserService, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, ciLogService CiLogService, ciArtifactRepository repository.CiArtifactRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, pipelineRepository pipelineConfig.PipelineRepository, envRepository repository2.EnvironmentRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, helmAppService client.HelmAppService, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, workflowDagExecutor WorkflowDagExecutor, appListingService app.AppListingService, appListingRepository repository.AppListingRepository, pipelineStatusTimelineRepository pipelineConfig.PipelineStatusTimelineRepository, application application.ServiceClient, argoUserService argo.ArgoUserService, deploymentEventHandler app.DeploymentEventHandler, eventClient client2.EventClient, pipelineStatusTimelineResourcesService status.PipelineStatusTimelineResourcesService, pipelineStatusSyncDetailService status.PipelineStatusSyncDetailService, pipelineStatusTimelineService status.PipelineStatusTimelineService, appService app.AppService, appStatusService app_status.AppStatusService, enforcerUtil rbac.EnforcerUtil, installedAppRepository repository3.InstalledAppRepository, installedAppVersionHistoryRepository repository3.InstalledAppVersionHistoryRepository, appRepository app2.AppRepository, resourceGroupService resourceGroup2.ResourceGroupService, imageTaggingService ImageTaggingService, k8sUtil *k8s.K8sUtil, workflowService WorkflowService) *CdHandlerImpl
func (*CdHandlerImpl) CancelStage ¶
func (impl *CdHandlerImpl) CancelStage(workflowRunnerId int, userId int32) (int, error)
func (*CdHandlerImpl) CheckAndSendArgoPipelineStatusSyncEventIfNeeded ¶ added in v0.6.11
func (impl *CdHandlerImpl) CheckAndSendArgoPipelineStatusSyncEventIfNeeded(pipelineId int, userId int32, isAppStoreApplication bool)
func (*CdHandlerImpl) CheckArgoAppStatusPeriodicallyAndUpdateInDb ¶ added in v0.5.1
func (impl *CdHandlerImpl) CheckArgoAppStatusPeriodicallyAndUpdateInDb(getPipelineDeployedBeforeMinutes int, getPipelineDeployedWithinHours int) error
func (*CdHandlerImpl) CheckArgoPipelineTimelineStatusPeriodicallyAndUpdateInDb ¶ added in v0.6.4
func (impl *CdHandlerImpl) CheckArgoPipelineTimelineStatusPeriodicallyAndUpdateInDb(pendingSinceSeconds int, timeForDegradation int) error
func (*CdHandlerImpl) CheckHelmAppStatusPeriodicallyAndUpdateInDb ¶ added in v0.4.17
func (impl *CdHandlerImpl) CheckHelmAppStatusPeriodicallyAndUpdateInDb(helmPipelineStatusCheckEligibleTime int, getPipelineDeployedWithinHours int) error
func (*CdHandlerImpl) DownloadCdWorkflowArtifacts ¶
func (*CdHandlerImpl) FetchAppDeploymentStatusForEnvironments ¶ added in v0.6.13
func (impl *CdHandlerImpl) FetchAppDeploymentStatusForEnvironments(request resourceGroup2.ResourceGroupingRequest) ([]*pipelineConfig.AppDeploymentStatus, error)
func (*CdHandlerImpl) FetchAppWorkflowStatusForTriggerView ¶
func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerView(appId int) ([]*pipelineConfig.CdWorkflowStatus, error)
func (*CdHandlerImpl) FetchAppWorkflowStatusForTriggerViewForEnvironment ¶ added in v0.6.13
func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerViewForEnvironment(request resourceGroup2.ResourceGroupingRequest) ([]*pipelineConfig.CdWorkflowStatus, error)
func (*CdHandlerImpl) FetchCdPrePostStageStatus ¶
func (impl *CdHandlerImpl) FetchCdPrePostStageStatus(pipelineId int) ([]pipelineConfig.CdWorkflowWithArtifact, error)
func (*CdHandlerImpl) FetchCdWorkflowDetails ¶
func (impl *CdHandlerImpl) FetchCdWorkflowDetails(appId int, environmentId int, pipelineId int, buildId int) (WorkflowResponse, error)
func (*CdHandlerImpl) GetCdBuildHistory ¶
func (impl *CdHandlerImpl) GetCdBuildHistory(appId int, environmentId int, pipelineId int, offset int, size int) ([]pipelineConfig.CdWorkflowWithArtifact, error)
func (*CdHandlerImpl) GetRunningWorkflowLogs ¶
func (*CdHandlerImpl) HandleCdStageReTrigger ¶ added in v0.6.24
func (impl *CdHandlerImpl) HandleCdStageReTrigger(runner *pipelineConfig.CdWorkflowRunner) error
func (*CdHandlerImpl) UpdatePipelineTimelineAndStatusByLiveApplicationFetch ¶ added in v0.6.11
func (impl *CdHandlerImpl) UpdatePipelineTimelineAndStatusByLiveApplicationFetch(pipeline *pipelineConfig.Pipeline, installedApp repository3.InstalledApps, userId int32) (error, bool)
func (*CdHandlerImpl) UpdateWorkflow ¶
func (impl *CdHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, string, error)
type CdPipelineConfig ¶ added in v0.6.21
type CdPipelineConfigService ¶ added in v0.6.24
type CdPipelineConfigService interface { //GetCdPipelineById : Retrieve cdPipeline for given cdPipelineId. //getting cdPipeline,environment and strategies ,preDeployStage, postDeployStage,appWorkflowMapping from respective repository and service layer //converting above data in proper bean object and then assigning to CDPipelineConfigObject //if any error occur , will get empty object or nil GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error) CreateCdPipelines(cdPipelines *bean.CdPipelines, ctx context.Context) (*bean.CdPipelines, error) //PatchCdPipelines : Handle CD pipeline patch requests, making necessary changes to the configuration and returning the updated version. //Performs Create ,Update and Delete operation. PatchCdPipelines(cdPipelines *bean.CDPatchRequest, ctx context.Context) (*bean.CdPipelines, error) DeleteCdPipeline(pipeline *pipelineConfig.Pipeline, ctx context.Context, deleteAction int, acdDelete bool, userId int32) (*bean.AppDeleteResponseDTO, error) DeleteACDAppCdPipelineWithNonCascade(pipeline *pipelineConfig.Pipeline, ctx context.Context, forceDelete bool, userId int32) (err error) //GetTriggerViewCdPipelinesForApp : GetTriggerViewCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error) //GetCdPipelinesForApp : Retrieve cdPipeline for given appId GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error) //GetCdPipelinesForAppAndEnv : Retrieve cdPipeline for given appId and envId GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error) /* CreateCdPipelines(cdPipelines bean.CdPipelines) (*bean.CdPipelines, error)*/ //GetCdPipelinesByEnvironment : lists cdPipeline for given environmentId and appIds GetCdPipelinesByEnvironment(request resourceGroup2.ResourceGroupingRequest) (cdPipelines *bean.CdPipelines, err error) //GetCdPipelinesByEnvironmentMin : lists minimum detail of cdPipelines for given environmentId and appIds GetCdPipelinesByEnvironmentMin(request resourceGroup2.ResourceGroupingRequest) (cdPipelines []*bean.CDPipelineConfigObject, err error) //PerformBulkActionOnCdPipelines : PerformBulkActionOnCdPipelines(dto *bean.CdBulkActionRequestDto, impactedPipelines []*pipelineConfig.Pipeline, ctx context.Context, dryRun bool, userId int32) ([]*bean.CdBulkActionResponseDto, error) //FindPipelineById : Retrieve Pipeline object from pipelineRepository for given cdPipelineId FindPipelineById(cdPipelineId int) (*pipelineConfig.Pipeline, error) //FindAppAndEnvDetailsByPipelineId : Retrieve app and env details for given cdPipelineId FindAppAndEnvDetailsByPipelineId(cdPipelineId int) (*pipelineConfig.Pipeline, error) // RetrieveParentDetails : Retrieve the parent id and type of the parent. //Here ParentId refers to Parent like parent of CD can be CI , PRE-CD . // It first fetches the workflow details from the appWorkflow repository. //If the workflow is a CD pipeline, it further checks for stage configurations. //If the workflow is a webhook, it returns the webhook workflow type. //In case of error , it returns 0 for parentId and empty string for parentType RetrieveParentDetails(pipelineId int) (parentId int, parentType bean2.WorkflowType, err error) //GetEnvironmentByCdPipelineId : Retrieve environmentId for given cdPipelineId GetEnvironmentByCdPipelineId(pipelineId int) (int, error) GetBulkActionImpactedPipelines(dto *bean.CdBulkActionRequestDto) ([]*pipelineConfig.Pipeline, error) //no usage //IsGitOpsRequiredForCD : Determine if GitOps is required for CD based on the provided pipeline creation request IsGitOpsRequiredForCD(pipelineCreateRequest *bean.CdPipelines) bool //SetPipelineDeploymentAppType : Set pipeline deployment application(helm/argo) types based on the provided configuration SetPipelineDeploymentAppType(pipelineCreateRequest *bean.CdPipelines, isGitOpsConfigured bool, deploymentTypeValidationConfig map[string]bool) MarkGitOpsDevtronAppsDeletedWhereArgoAppIsDeleted(appId int, envId int, acdToken string, pipeline *pipelineConfig.Pipeline) (bool, error) //GetEnvironmentListForAutocompleteFilter : lists environment for given configuration GetEnvironmentListForAutocompleteFilter(envName string, clusterIds []int, offset int, size int, emailId string, checkAuthBatch func(emailId string, appObject []string, envObject []string) (map[string]bool, map[string]bool), ctx context.Context) (*cluster.ResourceGroupingResponse, error) IsGitopsConfigured() (bool, error) RegisterInACD(gitOpsRepoName string, chartGitAttr *util.ChartGitAttribute, userId int32, ctx context.Context) error CreateExternalCiAndAppWorkflowMapping(appId, appWorkflowId int, userId int32, tx *pg.Tx) (int, error) }
type CdPipelineConfigServiceImpl ¶ added in v0.6.24
type CdPipelineConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewCdPipelineConfigServiceImpl ¶ added in v0.6.24
func NewCdPipelineConfigServiceImpl( logger *zap.SugaredLogger, pipelineRepository pipelineConfig.PipelineRepository, environmentRepository repository2.EnvironmentRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, appWorkflowRepository appWorkflow.AppWorkflowRepository, pipelineStageService PipelineStageService, appRepo app2.AppRepository, appService app.AppService, deploymentGroupRepository repository.DeploymentGroupRepository, ciCdPipelineOrchestrator CiCdPipelineOrchestrator, appStatusRepository appStatus.AppStatusRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, prePostCdScriptHistoryService history.PrePostCdScriptHistoryService, clusterRepository repository2.ClusterRepository, helmAppService client.HelmAppService, enforcerUtil rbac.EnforcerUtil, gitOpsRepository repository.GitOpsConfigRepository, pipelineStrategyHistoryService history.PipelineStrategyHistoryService, chartRepository chartRepoRepository.ChartRepository, resourceGroupService resourceGroup2.ResourceGroupService, chartDeploymentService util.ChartDeploymentService, chartTemplateService util.ChartTemplateService, propertiesConfigService PropertiesConfigService, appLevelMetricsRepository repository.AppLevelMetricsRepository, deploymentTemplateHistoryService history.DeploymentTemplateHistoryService, variableEntityMappingService variables.VariableEntityMappingService, variableTemplateParser parsers.VariableTemplateParser, deploymentConfig *DeploymentServiceTypeConfig, application application.ServiceClient, devtronAppCMCSService DevtronAppCMCSService) *CdPipelineConfigServiceImpl
func (*CdPipelineConfigServiceImpl) BulkDeleteCdPipelines ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) BulkDeleteCdPipelines(impactedPipelines []*pipelineConfig.Pipeline, ctx context.Context, dryRun bool, deleteAction int, userId int32) []*bean.CdBulkActionResponseDto
func (*CdPipelineConfigServiceImpl) CreateCdPipelines ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) CreateCdPipelines(pipelineCreateRequest *bean.CdPipelines, ctx context.Context) (*bean.CdPipelines, error)
func (*CdPipelineConfigServiceImpl) CreateExternalCiAndAppWorkflowMapping ¶ added in v0.6.24
func (*CdPipelineConfigServiceImpl) DeleteACDAppCdPipelineWithNonCascade ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) DeleteACDAppCdPipelineWithNonCascade(pipeline *pipelineConfig.Pipeline, ctx context.Context, forceDelete bool, userId int32) error
func (*CdPipelineConfigServiceImpl) DeleteCdPipeline ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) DeleteCdPipeline(pipeline *pipelineConfig.Pipeline, ctx context.Context, deleteAction int, deleteFromAcd bool, userId int32) (*bean.AppDeleteResponseDTO, error)
func (*CdPipelineConfigServiceImpl) DeleteCdPipelinePartial ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) DeleteCdPipelinePartial(pipeline *pipelineConfig.Pipeline, ctx context.Context, deleteAction int, userId int32) (*bean.AppDeleteResponseDTO, error)
func (*CdPipelineConfigServiceImpl) FindAppAndEnvDetailsByPipelineId ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) FindAppAndEnvDetailsByPipelineId(cdPipelineId int) (*pipelineConfig.Pipeline, error)
func (*CdPipelineConfigServiceImpl) FindPipelineById ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) FindPipelineById(cdPipelineId int) (*pipelineConfig.Pipeline, error)
func (*CdPipelineConfigServiceImpl) GetBulkActionImpactedPipelines ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetBulkActionImpactedPipelines(dto *bean.CdBulkActionRequestDto) ([]*pipelineConfig.Pipeline, error)
func (*CdPipelineConfigServiceImpl) GetCdPipelineById ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error)
func (*CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironment ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironment(request resourceGroup2.ResourceGroupingRequest) (cdPipelines *bean.CdPipelines, err error)
func (*CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironmentMin ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesByEnvironmentMin(request resourceGroup2.ResourceGroupingRequest) (cdPipelines []*bean.CDPipelineConfigObject, err error)
func (*CdPipelineConfigServiceImpl) GetCdPipelinesForApp ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
func (*CdPipelineConfigServiceImpl) GetCdPipelinesForAppAndEnv ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
func (*CdPipelineConfigServiceImpl) GetEnvironmentByCdPipelineId ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetEnvironmentByCdPipelineId(pipelineId int) (int, error)
func (*CdPipelineConfigServiceImpl) GetEnvironmentListForAutocompleteFilter ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetEnvironmentListForAutocompleteFilter(envName string, clusterIds []int, offset int, size int, emailId string, checkAuthBatch func(emailId string, appObject []string, envObject []string) (map[string]bool, map[string]bool), ctx context.Context) (*cluster.ResourceGroupingResponse, error)
func (*CdPipelineConfigServiceImpl) GetTriggerViewCdPipelinesForApp ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) GetTriggerViewCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
func (*CdPipelineConfigServiceImpl) IsGitOpsRequiredForCD ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) IsGitOpsRequiredForCD(pipelineCreateRequest *bean.CdPipelines) bool
func (*CdPipelineConfigServiceImpl) IsGitopsConfigured ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) IsGitopsConfigured() (bool, error)
func (*CdPipelineConfigServiceImpl) MarkGitOpsDevtronAppsDeletedWhereArgoAppIsDeleted ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) MarkGitOpsDevtronAppsDeletedWhereArgoAppIsDeleted(appId int, envId int, acdToken string, pipeline *pipelineConfig.Pipeline) (bool, error)
func (*CdPipelineConfigServiceImpl) PatchCdPipelines ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) PatchCdPipelines(cdPipelines *bean.CDPatchRequest, ctx context.Context) (*bean.CdPipelines, error)
func (*CdPipelineConfigServiceImpl) PerformBulkActionOnCdPipelines ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) PerformBulkActionOnCdPipelines(dto *bean.CdBulkActionRequestDto, impactedPipelines []*pipelineConfig.Pipeline, ctx context.Context, dryRun bool, userId int32) ([]*bean.CdBulkActionResponseDto, error)
func (*CdPipelineConfigServiceImpl) RegisterInACD ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) RegisterInACD(gitOpsRepoName string, chartGitAttr *util.ChartGitAttribute, userId int32, ctx context.Context) error
func (*CdPipelineConfigServiceImpl) RetrieveParentDetails ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) RetrieveParentDetails(pipelineId int) (parentId int, parentType bean2.WorkflowType, err error)
func (*CdPipelineConfigServiceImpl) SetPipelineDeploymentAppType ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) SetPipelineDeploymentAppType(pipelineCreateRequest *bean.CdPipelines, isGitOpsConfigured bool, deploymentTypeValidationConfig map[string]bool)
func (*CdPipelineConfigServiceImpl) ValidateCDPipelineRequest ¶ added in v0.6.24
func (impl *CdPipelineConfigServiceImpl) ValidateCDPipelineRequest(pipelineCreateRequest *bean.CdPipelines, isGitOpsConfigured, haveAtleastOneGitOps bool) (bool, error)
type CdStageCompleteEvent ¶
type CdStageCompleteEvent struct { CiProjectDetails []bean3.CiProjectDetails `json:"ciProjectDetails"` WorkflowId int `json:"workflowId"` WorkflowRunnerId int `json:"workflowRunnerId"` CdPipelineId int `json:"cdPipelineId"` TriggeredBy int32 `json:"triggeredBy"` StageYaml string `json:"stageYaml"` ArtifactLocation string `json:"artifactLocation"` PipelineName string `json:"pipelineName"` CiArtifactDTO pipelineConfig.CiArtifactDTO `json:"ciArtifactDTO"` }
type ChildCdMetadata ¶ added in v0.6.21
type CiArtifactDTO ¶
type CiArtifactDTO struct { Id int `json:"id"` PipelineId int `json:"pipelineId"` //id of the ci pipeline from which this webhook was triggered Image string `json:"image"` ImageDigest string `json:"imageDigest"` MaterialInfo string `json:"materialInfo"` //git material metadata json array string DataSource string `json:"dataSource"` WorkflowId *int `json:"workflowId"` // contains filtered or unexported fields }
type CiArtifactWebhookRequest ¶
type CiArtifactWebhookRequest struct { Image string `json:"image"` ImageDigest string `json:"imageDigest"` MaterialInfo json.RawMessage `json:"materialInfo"` DataSource string `json:"dataSource"` PipelineName string `json:"pipelineName"` WorkflowId *int `json:"workflowId"` UserId int32 `json:"userId"` IsArtifactUploaded bool `json:"isArtifactUploaded"` FailureReason string `json:"failureReason"` }
type CiBuildConfigService ¶ added in v0.6.6
type CiBuildConfigService interface { Save(templateId int, overrideTemplateId int, ciBuildConfigBean *bean.CiBuildConfigBean, userId int32) error UpdateOrSave(templateId int, overrideTemplateId int, ciBuildConfig *bean.CiBuildConfigBean, userId int32) (*bean.CiBuildConfigBean, error) Delete(ciBuildConfigId int) error GetCountByBuildType() map[bean.CiBuildType]int }
type CiBuildConfigServiceImpl ¶ added in v0.6.6
type CiBuildConfigServiceImpl struct { Logger *zap.SugaredLogger CiBuildConfigRepository pipelineConfig.CiBuildConfigRepository }
func NewCiBuildConfigServiceImpl ¶ added in v0.6.6
func NewCiBuildConfigServiceImpl(logger *zap.SugaredLogger, ciBuildConfigRepository pipelineConfig.CiBuildConfigRepository) *CiBuildConfigServiceImpl
func (*CiBuildConfigServiceImpl) Delete ¶ added in v0.6.6
func (impl *CiBuildConfigServiceImpl) Delete(ciBuildConfigId int) error
func (*CiBuildConfigServiceImpl) GetCountByBuildType ¶ added in v0.6.6
func (impl *CiBuildConfigServiceImpl) GetCountByBuildType() map[bean.CiBuildType]int
func (*CiBuildConfigServiceImpl) Save ¶ added in v0.6.6
func (impl *CiBuildConfigServiceImpl) Save(templateId int, overrideTemplateId int, ciBuildConfigBean *bean.CiBuildConfigBean, userId int32) error
func (*CiBuildConfigServiceImpl) UpdateOrSave ¶ added in v0.6.6
func (impl *CiBuildConfigServiceImpl) UpdateOrSave(templateId int, overrideTemplateId int, ciBuildConfig *bean.CiBuildConfigBean, userId int32) (*bean.CiBuildConfigBean, error)
type CiCdConfig ¶ added in v0.6.24
type CiCdConfig struct { //from ciConfig DefaultCacheBucket string `env:"DEFAULT_CACHE_BUCKET" envDefault:"ci-caching"` DefaultCacheBucketRegion string `env:"DEFAULT_CACHE_BUCKET_REGION" envDefault:"us-east-2"` CiLogsKeyPrefix string `env:"CI_LOGS_KEY_PREFIX" envDxefault:"my-artifacts"` CiDefaultImage string `env:"DEFAULT_CI_IMAGE" envDefault:"686244538589.dkr.ecr.us-east-2.amazonaws.com/cirunner:47"` CiDefaultNamespace string `env:"DEFAULT_NAMESPACE" envDefault:"devtron-ci"` CiDefaultTimeout int64 `env:"DEFAULT_TIMEOUT" envDefault:"3600"` CiDefaultBuildLogsBucket string `env:"DEFAULT_BUILD_LOGS_BUCKET" envDefault:"devtron-pro-ci-logs"` CiDefaultCdLogsBucketRegion string `env:"DEFAULT_CD_LOGS_BUCKET_REGION" envDefault:"us-east-2"` CiLimitCpu string `env:"LIMIT_CI_CPU" envDefault:"0.5"` CiLimitMem string `env:"LIMIT_CI_MEM" envDefault:"3G"` CiReqCpu string `env:"REQ_CI_CPU" envDefault:"0.5"` CiReqMem string `env:"REQ_CI_MEM" envDefault:"3G"` CiTaintKey string `env:"CI_NODE_TAINTS_KEY" envDefault:""` CiTaintValue string `env:"CI_NODE_TAINTS_VALUE" envDefault:""` CiNodeLabelSelector []string `env:"CI_NODE_LABEL_SELECTOR"` CacheLimit int64 `env:"CACHE_LIMIT" envDefault:"5000000000"` // TODO: Add to default db config also CiDefaultBuildLogsKeyPrefix string `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" envDefault:"arsenal-v1"` CiDefaultArtifactKeyPrefix string `env:"DEFAULT_ARTIFACT_KEY_LOCATION" envDefault:"arsenal-v1/ci-artifacts"` CiWorkflowServiceAccount string `env:"WORKFLOW_SERVICE_ACCOUNT" envDefault:"ci-runner"` ExternalCiApiSecret string `env:"EXTERNAL_CI_API_SECRET" envDefault:"devtroncd-secret"` ExternalCiWebhookUrl string `env:"EXTERNAL_CI_WEB_HOOK_URL" envDefault:""` ExternalCiPayload string `` /* 432-byte string literal not displayed */ CiArtifactLocationFormat string `env:"CI_ARTIFACT_LOCATION_FORMAT" envDefault:"%d/%d.zip"` ImageScannerEndpoint string `env:"IMAGE_SCANNER_ENDPOINT" envDefault:"http://image-scanner-new-demo-devtroncd-service.devtroncd:80"` CiDefaultAddressPoolBaseCidr string `env:"CI_DEFAULT_ADDRESS_POOL_BASE_CIDR"` CiDefaultAddressPoolSize int `env:"CI_DEFAULT_ADDRESS_POOL_SIZE"` CiRunnerDockerMTUValue int `env:"CI_RUNNER_DOCKER_MTU_VALUE" envDefault:"-1"` IgnoreDockerCacheForCI bool `env:"CI_IGNORE_DOCKER_CACHE"` VolumeMountsForCiJson string `env:"CI_VOLUME_MOUNTS_JSON"` BuildPvcCachePath string `env:"PRE_CI_CACHE_PATH" envDefault:"/devtroncd-cache"` DefaultPvcCachePath string `env:"DOCKER_BUILD_CACHE_PATH" envDefault:"/var/lib/docker"` BuildxPvcCachePath string `env:"BUILDX_CACHE_PATH" envDefault:"/var/lib/devtron/buildx"` UseBlobStorageConfigInCiWorkflow bool `env:"USE_BLOB_STORAGE_CONFIG_IN_CI_WORKFLOW" envDefault:"true"` DefaultTargetPlatform string `env:"DEFAULT_TARGET_PLATFORM" envDefault:""` UseBuildx bool `env:"USE_BUILDX" envDefault:"false"` EnableBuildContext bool `env:"ENABLE_BUILD_CONTEXT" envDefault:"false"` ImageRetryCount int `env:"IMAGE_RETRY_COUNT" envDefault:"0"` ImageRetryInterval int `env:"IMAGE_RETRY_INTERVAL" envDefault:"5"` //image retry interval takes value in seconds CiWorkflowExecutorType pipelineConfig.WorkflowExecutorType `env:"CI_WORKFLOW_EXECUTOR_TYPE" envDefault:"AWF"` BuildxK8sDriverOptions string `env:"BUILDX_K8S_DRIVER_OPTIONS" envDefault:""` CIAutoTriggerBatchSize int `env:"CI_SUCCESS_AUTO_TRIGGER_BATCH_SIZE" envDefault:"1"` SkipCreatingEcrRepo bool `env:"SKIP_CREATING_ECR_REPO" envDefault:"false"` MaxCiWorkflowRetries int `env:"MAX_CI_WORKFLOW_RETRIES" envDefault:"0"` //from CdConfig CdLimitCpu string `env:"CD_LIMIT_CI_CPU" envDefault:"0.5"` CdLimitMem string `env:"CD_LIMIT_CI_MEM" envDefault:"3G"` CdReqCpu string `env:"CD_REQ_CI_CPU" envDefault:"0.5"` CdReqMem string `env:"CD_REQ_CI_MEM" envDefault:"3G"` CdTaintKey string `env:"CD_NODE_TAINTS_KEY" envDefault:"dedicated"` ExternalCdTaintKey string `env:"EXTERNAL_CD_NODE_TAINTS_KEY" envDefault:"dedicated"` UseExternalNode bool `env:"USE_EXTERNAL_NODE" envDefault:"false"` CdWorkflowServiceAccount string `env:"CD_WORKFLOW_SERVICE_ACCOUNT" envDefault:"cd-runner"` CdDefaultBuildLogsKeyPrefix string `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" ` CdDefaultArtifactKeyPrefix string `env:"DEFAULT_CD_ARTIFACT_KEY_LOCATION" ` CdTaintValue string `env:"CD_NODE_TAINTS_VALUE" envDefault:"ci"` ExternalCdTaintValue string `env:"EXTERNAL_CD_NODE_TAINTS_VALUE" envDefault:"ci"` CdDefaultBuildLogsBucket string `env:"DEFAULT_BUILD_LOGS_BUCKET" ` CdNodeLabelSelector []string `env:"CD_NODE_LABEL_SELECTOR"` ExternalCdNodeLabelSelector []string `env:"EXTERNAL_CD_NODE_LABEL_SELECTOR"` CdArtifactLocationFormat string `env:"CD_ARTIFACT_LOCATION_FORMAT" envDefault:"%d/%d.zip"` CdDefaultNamespace string `env:"DEFAULT_CD_NAMESPACE"` CdDefaultImage string `env:"DEFAULT_CI_IMAGE"` CdDefaultTimeout int64 `env:"DEFAULT_CD_TIMEOUT" envDefault:"3600"` CdDefaultCdLogsBucketRegion string `env:"DEFAULT_CD_LOGS_BUCKET_REGION" ` WfControllerInstanceID string `env:"WF_CONTROLLER_INSTANCE_ID" envDefault:"devtron-runner"` CdDefaultAddressPoolBaseCidr string `env:"CD_DEFAULT_ADDRESS_POOL_BASE_CIDR"` CdDefaultAddressPoolSize int `env:"CD_DEFAULT_ADDRESS_POOL_SIZE"` ExposeCDMetrics bool `env:"EXPOSE_CD_METRICS" envDefault:"false"` UseBlobStorageConfigInCdWorkflow bool `env:"USE_BLOB_STORAGE_CONFIG_IN_CD_WORKFLOW" envDefault:"true"` CdWorkflowExecutorType pipelineConfig.WorkflowExecutorType `env:"CD_WORKFLOW_EXECUTOR_TYPE" envDefault:"AWF"` TerminationGracePeriod int `env:"TERMINATION_GRACE_PERIOD_SECS" envDefault:"180"` MaxCdWorkflowRunnerRetries int `env:"MAX_CD_WORKFLOW_RUNNER_RETRIES" envDefault:"0"` //common in both ciconfig and cd config Type string Mode string `env:"MODE" envDefault:"DEV"` OrchestratorHost string `env:"ORCH_HOST" envDefault:"http://devtroncd-orchestrator-service-prod.devtroncd/webhook/msg/nats"` OrchestratorToken string `env:"ORCH_TOKEN" envDefault:""` ClusterConfig *rest.Config CloudProvider blob_storage.BlobStorageType `env:"BLOB_STORAGE_PROVIDER" envDefault:"S3"` BlobStorageEnabled bool `env:"BLOB_STORAGE_ENABLED" envDefault:"false"` BlobStorageS3AccessKey string `env:"BLOB_STORAGE_S3_ACCESS_KEY"` BlobStorageS3SecretKey string `env:"BLOB_STORAGE_S3_SECRET_KEY"` BlobStorageS3Endpoint string `env:"BLOB_STORAGE_S3_ENDPOINT"` BlobStorageS3EndpointInsecure bool `env:"BLOB_STORAGE_S3_ENDPOINT_INSECURE" envDefault:"false"` BlobStorageS3BucketVersioned bool `env:"BLOB_STORAGE_S3_BUCKET_VERSIONED" envDefault:"true"` BlobStorageGcpCredentialJson string `env:"BLOB_STORAGE_GCP_CREDENTIALS_JSON"` AzureAccountName string `env:"AZURE_ACCOUNT_NAME"` AzureGatewayUrl string `env:"AZURE_GATEWAY_URL" envDefault:"http://devtron-minio.devtroncd:9000"` AzureGatewayConnectionInsecure bool `env:"AZURE_GATEWAY_CONNECTION_INSECURE" envDefault:"true"` AzureBlobContainerCiLog string `env:"AZURE_BLOB_CONTAINER_CI_LOG"` AzureBlobContainerCiCache string `env:"AZURE_BLOB_CONTAINER_CI_CACHE"` AzureAccountKey string `env:"AZURE_ACCOUNT_KEY"` BuildLogTTLValue int `env:"BUILD_LOG_TTL_VALUE_IN_SECS" envDefault:"3600"` BaseLogLocationPath string `env:"BASE_LOG_LOCATION_PATH" envDefault:"/home/devtron/"` InAppLoggingEnabled bool `env:"IN_APP_LOGGING_ENABLED" envDefault:"false"` BuildxProvenanceMode string `env:"BUILDX_PROVENANCE_MODE" envDefault:""` //provenance is set to false if this flag is not set }
func GetCiCdConfig ¶ added in v0.6.24
func GetCiCdConfig() (*CiCdConfig, error)
func (*CiCdConfig) GetArtifactLocationFormat ¶ added in v0.6.24
func (impl *CiCdConfig) GetArtifactLocationFormat() string
func (*CiCdConfig) GetDefaultAddressPoolBaseCidr ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultAddressPoolBaseCidr() string
func (*CiCdConfig) GetDefaultAddressPoolSize ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultAddressPoolSize() int
func (*CiCdConfig) GetDefaultArtifactKeyPrefix ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultArtifactKeyPrefix() string
func (*CiCdConfig) GetDefaultBuildLogsBucket ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultBuildLogsBucket() string
func (*CiCdConfig) GetDefaultBuildLogsKeyPrefix ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultBuildLogsKeyPrefix() string
func (*CiCdConfig) GetDefaultCdLogsBucketRegion ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultCdLogsBucketRegion() string
func (*CiCdConfig) GetDefaultImage ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultImage() string
func (*CiCdConfig) GetDefaultNamespace ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultNamespace() string
func (*CiCdConfig) GetDefaultTimeout ¶ added in v0.6.24
func (impl *CiCdConfig) GetDefaultTimeout() int64
func (*CiCdConfig) GetLimitCpu ¶ added in v0.6.24
func (impl *CiCdConfig) GetLimitCpu() string
func (*CiCdConfig) GetLimitMem ¶ added in v0.6.24
func (impl *CiCdConfig) GetLimitMem() string
func (*CiCdConfig) GetReqCpu ¶ added in v0.6.24
func (impl *CiCdConfig) GetReqCpu() string
func (*CiCdConfig) GetReqMem ¶ added in v0.6.24
func (impl *CiCdConfig) GetReqMem() string
func (*CiCdConfig) GetTaintKey ¶ added in v0.6.24
func (impl *CiCdConfig) GetTaintKey() string
func (*CiCdConfig) GetTaintValue ¶ added in v0.6.24
func (impl *CiCdConfig) GetTaintValue() string
func (*CiCdConfig) GetWorkflowExecutorType ¶ added in v0.6.24
func (impl *CiCdConfig) GetWorkflowExecutorType() pipelineConfig.WorkflowExecutorType
func (*CiCdConfig) GetWorkflowServiceAccount ¶ added in v0.6.24
func (impl *CiCdConfig) GetWorkflowServiceAccount() string
func (*CiCdConfig) GetWorkflowVolumeAndVolumeMounts ¶ added in v0.6.24
func (impl *CiCdConfig) GetWorkflowVolumeAndVolumeMounts() ([]v12.Volume, []v12.VolumeMount, error)
func (*CiCdConfig) WorkflowRetriesEnabled ¶ added in v0.6.24
func (impl *CiCdConfig) WorkflowRetriesEnabled() bool
type CiCdPipelineOrchestrator ¶ added in v0.6.9
type CiCdPipelineOrchestrator interface { CreateApp(createRequest *bean.CreateAppDTO) (*bean.CreateAppDTO, error) DeleteApp(appId int, userId int32) error CreateMaterials(createMaterialRequest *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error) UpdateMaterial(updateMaterialRequest *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error) CreateCiConf(createRequest *bean.CiConfigRequest, templateId int) (*bean.CiConfigRequest, error) CreateCDPipelines(pipelineRequest *bean.CDPipelineConfigObject, appId int, userId int32, tx *pg.Tx, appName string) (pipelineId int, err error) UpdateCDPipeline(pipelineRequest *bean.CDPipelineConfigObject, userId int32, tx *pg.Tx) (err error) DeleteCiPipeline(pipeline *pipelineConfig.CiPipeline, request *bean.CiPatchRequest, tx *pg.Tx) error DeleteCdPipeline(pipelineId int, userId int32, tx *pg.Tx) error PatchMaterialValue(createRequest *bean.CiPipeline, userId int32, oldPipeline *pipelineConfig.CiPipeline) (*bean.CiPipeline, error) PatchCiMaterialSource(ciPipeline *bean.CiMaterialPatchRequest, userId int32) (*bean.CiMaterialPatchRequest, error) PatchCiMaterialSourceValue(patchRequest *bean.CiMaterialValuePatchRequest, userId int32, value string, token string, checkAppSpecificAccess func(token, action string, appId int) (bool, error)) (*pipelineConfig.CiPipelineMaterial, error) UpdateCiPipelineMaterials(materialsUpdate []*pipelineConfig.CiPipelineMaterial) error PipelineExists(name string) (bool, error) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error) GetByEnvOverrideId(envOverrideId int) (*bean.CdPipelines, error) BuildCiPipelineScript(userId int32, ciScript *bean.CiScript, scriptStage string, ciPipeline *bean.CiPipeline) *pipelineConfig.CiPipelineScript AddPipelineMaterialInGitSensor(pipelineMaterials []*pipelineConfig.CiPipelineMaterial) error CheckStringMatchRegex(regex string, value string) bool CreateEcrRepo(dockerRepository, AWSRegion, AWSAccessKeyId, AWSSecretAccessKey string) error GetCdPipelinesForEnv(envId int, requestedAppIds []int) (cdPipelines *bean.CdPipelines, err error) }
type CiCdPipelineOrchestratorImpl ¶ added in v0.6.9
type CiCdPipelineOrchestratorImpl struct { GitSensorClient gitSensor.Client // contains filtered or unexported fields }
func NewCiCdPipelineOrchestrator ¶ added in v0.6.9
func NewCiCdPipelineOrchestrator( pipelineGroupRepository app2.AppRepository, logger *zap.SugaredLogger, materialRepository pipelineConfig.MaterialRepository, pipelineRepository pipelineConfig.PipelineRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, GitSensorClient gitSensor.Client, ciConfig *CiCdConfig, appWorkflowRepository appWorkflow.AppWorkflowRepository, envRepository repository2.EnvironmentRepository, attributesService attributes.AttributesService, appListingRepository repository.AppListingRepository, appLabelsService app.AppCrudOperationService, userAuthService user.UserAuthService, prePostCdScriptHistoryService history3.PrePostCdScriptHistoryService, prePostCiScriptHistoryService history3.PrePostCiScriptHistoryService, pipelineStageService PipelineStageService, ciTemplateOverrideRepository pipelineConfig.CiTemplateOverrideRepository, gitMaterialHistoryService history3.GitMaterialHistoryService, ciPipelineHistoryService history3.CiPipelineHistoryService, ciTemplateService CiTemplateService, dockerArtifactStoreRepository dockerRegistryRepository.DockerArtifactStoreRepository, configMapService ConfigMapService, customTagService CustomTagService, genericNoteService genericNotes.GenericNoteService) *CiCdPipelineOrchestratorImpl
func (CiCdPipelineOrchestratorImpl) AddPipelineMaterialInGitSensor ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) AddPipelineMaterialInGitSensor(pipelineMaterials []*pipelineConfig.CiPipelineMaterial) error
func (CiCdPipelineOrchestratorImpl) BuildCiPipelineScript ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) BuildCiPipelineScript(userId int32, ciScript *bean.CiScript, scriptStage string, ciPipeline *bean.CiPipeline) *pipelineConfig.CiPipelineScript
func (CiCdPipelineOrchestratorImpl) CheckStringMatchRegex ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) CheckStringMatchRegex(regex string, value string) bool
func (CiCdPipelineOrchestratorImpl) CreateApp ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) CreateApp(createRequest *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
func (CiCdPipelineOrchestratorImpl) CreateCDPipelines ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) CreateCDPipelines(pipelineRequest *bean.CDPipelineConfigObject, appId int, userId int32, tx *pg.Tx, appName string) (pipelineId int, err error)
func (CiCdPipelineOrchestratorImpl) CreateCiConf ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) CreateCiConf(createRequest *bean.CiConfigRequest, templateId int) (*bean.CiConfigRequest, error)
func (CiCdPipelineOrchestratorImpl) CreateEcrRepo ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) CreateEcrRepo(dockerRepository, AWSRegion, AWSAccessKeyId, AWSSecretAccessKey string) error
func (CiCdPipelineOrchestratorImpl) CreateMaterials ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) CreateMaterials(createMaterialRequest *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
func (CiCdPipelineOrchestratorImpl) DeleteApp ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) DeleteApp(appId int, userId int32) error
func (CiCdPipelineOrchestratorImpl) DeleteCdPipeline ¶ added in v0.6.9
func (CiCdPipelineOrchestratorImpl) DeleteCiPipeline ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) DeleteCiPipeline(pipeline *pipelineConfig.CiPipeline, request *bean.CiPatchRequest, tx *pg.Tx) error
func (CiCdPipelineOrchestratorImpl) GetByEnvOverrideId ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) GetByEnvOverrideId(envOverrideId int) (*bean.CdPipelines, error)
func (CiCdPipelineOrchestratorImpl) GetCdPipelinesForApp ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
func (CiCdPipelineOrchestratorImpl) GetCdPipelinesForAppAndEnv ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
func (CiCdPipelineOrchestratorImpl) GetCdPipelinesForEnv ¶ added in v0.6.13
func (impl CiCdPipelineOrchestratorImpl) GetCdPipelinesForEnv(envId int, requestedAppIds []int) (cdPipelines *bean.CdPipelines, err error)
func (CiCdPipelineOrchestratorImpl) PatchCiMaterialSource ¶ added in v0.6.21
func (impl CiCdPipelineOrchestratorImpl) PatchCiMaterialSource(patchRequest *bean.CiMaterialPatchRequest, userId int32) (*bean.CiMaterialPatchRequest, error)
func (CiCdPipelineOrchestratorImpl) PatchCiMaterialSourceValue ¶ added in v0.6.24
func (impl CiCdPipelineOrchestratorImpl) PatchCiMaterialSourceValue(patchRequest *bean.CiMaterialValuePatchRequest, userId int32, value string, token string, checkAppSpecificAccess func(token, action string, appId int) (bool, error)) (*pipelineConfig.CiPipelineMaterial, error)
func (CiCdPipelineOrchestratorImpl) PatchMaterialValue ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) PatchMaterialValue(createRequest *bean.CiPipeline, userId int32, oldPipeline *pipelineConfig.CiPipeline) (*bean.CiPipeline, error)
func (CiCdPipelineOrchestratorImpl) PipelineExists ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) PipelineExists(name string) (bool, error)
func (CiCdPipelineOrchestratorImpl) UpdateCDPipeline ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) UpdateCDPipeline(pipelineRequest *bean.CDPipelineConfigObject, userId int32, tx *pg.Tx) (err error)
func (CiCdPipelineOrchestratorImpl) UpdateCiPipelineMaterials ¶ added in v0.6.24
func (impl CiCdPipelineOrchestratorImpl) UpdateCiPipelineMaterials(materialsUpdate []*pipelineConfig.CiPipelineMaterial) error
func (CiCdPipelineOrchestratorImpl) UpdateMaterial ¶ added in v0.6.9
func (impl CiCdPipelineOrchestratorImpl) UpdateMaterial(updateMaterialDTO *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
type CiCdTriggerEvent ¶
type CiCdTriggerEvent struct { Type string `json:"type"` CommonWorkflowRequest *WorkflowRequest `json:"commonWorkflowRequest"` }
type CiHandler ¶
type CiHandler interface { HandleCIWebhook(gitCiTriggerRequest bean.GitCiTriggerRequest) (int, error) HandleCIManual(ciTriggerRequest bean.CiTriggerRequest) (int, error) CheckAndReTriggerCI(workflowStatus v1alpha1.WorkflowStatus) error FetchMaterialsByPipelineId(pipelineId int, showAll bool) ([]pipelineConfig.CiPipelineMaterialResponse, error) FetchMaterialsByPipelineIdAndGitMaterialId(pipelineId int, gitMaterialId int, showAll bool) ([]pipelineConfig.CiPipelineMaterialResponse, error) FetchWorkflowDetails(appId int, pipelineId int, buildId int) (WorkflowResponse, error) FetchArtifactsForCiJob(buildId int) (*ArtifactsForCiJob, error) //FetchBuildById(appId int, pipelineId int) (WorkflowResponse, error) CancelBuild(workflowId int) (int, error) GetRunningWorkflowLogs(pipelineId int, workflowId int) (*bufio.Reader, func() error, error) GetHistoricBuildLogs(pipelineId int, workflowId int, ciWorkflow *pipelineConfig.CiWorkflow) (map[string]string, error) GetBuildHistory(pipelineId int, appId int, offset int, size int) ([]WorkflowResponse, error) DownloadCiWorkflowArtifacts(pipelineId int, buildId int) (*os.File, error) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, error) FetchCiStatusForTriggerView(appId int) ([]*pipelineConfig.CiWorkflowStatus, error) FetchCiStatusForTriggerViewV1(appId int) ([]*pipelineConfig.CiWorkflowStatus, error) RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err error) FetchMaterialInfoByArtifactId(ciArtifactId int, envId int) (*GitTriggerInfoResponse, error) WriteToCreateTestSuites(pipelineId int, buildId int, triggeredBy int) UpdateCiWorkflowStatusFailure(timeoutForFailureCiBuild int) error FetchCiStatusForTriggerViewForEnvironment(request resourceGroup.ResourceGroupingRequest) ([]*pipelineConfig.CiWorkflowStatus, error) }
type CiHandlerImpl ¶
type CiHandlerImpl struct { Logger *zap.SugaredLogger K8sUtil *k8s.K8sUtil // contains filtered or unexported fields }
func NewCiHandlerImpl ¶
func NewCiHandlerImpl(Logger *zap.SugaredLogger, ciService CiService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, gitSensorClient gitSensor.Client, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, workflowService WorkflowService, ciLogService CiLogService, ciArtifactRepository repository.CiArtifactRepository, userService user.UserService, eventClient client.EventClient, eventFactory client.EventFactory, ciPipelineRepository pipelineConfig.CiPipelineRepository, appListingRepository repository.AppListingRepository, K8sUtil *k8s.K8sUtil, cdPipelineRepository pipelineConfig.PipelineRepository, enforcerUtil rbac.EnforcerUtil, resourceGroupService resourceGroup.ResourceGroupService, envRepository repository3.EnvironmentRepository, imageTaggingService ImageTaggingService, appWorkflowRepository appWorkflow.AppWorkflowRepository, customTagService CustomTagService, k8sCommonService k8s2.K8sCommonService) *CiHandlerImpl
func (*CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeBranchFix ¶ added in v0.2.22
func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeBranchFix(ciPipelineMaterial bean.CiPipelineMaterial, pipeLineMaterialFromDb *pipelineConfig.CiPipelineMaterial) (pipelineConfig.GitCommit, error)
func (*CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeWebhook ¶ added in v0.2.22
func (impl *CiHandlerImpl) BuildManualTriggerCommitHashesForSourceTypeWebhook(ciPipelineMaterial bean.CiPipelineMaterial, pipeLineMaterialFromDb *pipelineConfig.CiPipelineMaterial) (pipelineConfig.GitCommit, map[string]string, error)
func (*CiHandlerImpl) BuildPayload ¶
func (impl *CiHandlerImpl) BuildPayload(ciWorkflow *pipelineConfig.CiWorkflow) *client.Payload
func (*CiHandlerImpl) CancelBuild ¶
func (impl *CiHandlerImpl) CancelBuild(workflowId int) (int, error)
func (*CiHandlerImpl) CheckAndReTriggerCI ¶ added in v0.6.24
func (impl *CiHandlerImpl) CheckAndReTriggerCI(workflowStatus v1alpha1.WorkflowStatus) error
func (*CiHandlerImpl) DownloadCiWorkflowArtifacts ¶
func (*CiHandlerImpl) FetchArtifactsForCiJob ¶ added in v0.6.24
func (impl *CiHandlerImpl) FetchArtifactsForCiJob(buildId int) (*ArtifactsForCiJob, error)
func (*CiHandlerImpl) FetchCiStatusForTriggerView ¶
func (impl *CiHandlerImpl) FetchCiStatusForTriggerView(appId int) ([]*pipelineConfig.CiWorkflowStatus, error)
func (*CiHandlerImpl) FetchCiStatusForTriggerViewForEnvironment ¶ added in v0.6.13
func (impl *CiHandlerImpl) FetchCiStatusForTriggerViewForEnvironment(request resourceGroup.ResourceGroupingRequest) ([]*pipelineConfig.CiWorkflowStatus, error)
func (*CiHandlerImpl) FetchCiStatusForTriggerViewV1 ¶ added in v0.6.17
func (impl *CiHandlerImpl) FetchCiStatusForTriggerViewV1(appId int) ([]*pipelineConfig.CiWorkflowStatus, error)
func (*CiHandlerImpl) FetchMaterialInfoByArtifactId ¶
func (impl *CiHandlerImpl) FetchMaterialInfoByArtifactId(ciArtifactId int, envId int) (*GitTriggerInfoResponse, error)
func (*CiHandlerImpl) FetchMaterialsByPipelineId ¶
func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int, showAll bool) ([]pipelineConfig.CiPipelineMaterialResponse, error)
func (*CiHandlerImpl) FetchMaterialsByPipelineIdAndGitMaterialId ¶ added in v0.6.17
func (impl *CiHandlerImpl) FetchMaterialsByPipelineIdAndGitMaterialId(pipelineId int, gitMaterialId int, showAll bool) ([]pipelineConfig.CiPipelineMaterialResponse, error)
func (*CiHandlerImpl) FetchWorkflowDetails ¶
func (impl *CiHandlerImpl) FetchWorkflowDetails(appId int, pipelineId int, buildId int) (WorkflowResponse, error)
func (*CiHandlerImpl) GetBuildHistory ¶
func (impl *CiHandlerImpl) GetBuildHistory(pipelineId int, appId int, offset int, size int) ([]WorkflowResponse, error)
func (*CiHandlerImpl) GetCiPipeline ¶
func (impl *CiHandlerImpl) GetCiPipeline(ciMaterialId int) (*pipelineConfig.CiPipeline, error)
func (*CiHandlerImpl) GetHistoricBuildLogs ¶
func (impl *CiHandlerImpl) GetHistoricBuildLogs(pipelineId int, workflowId int, ciWorkflow *pipelineConfig.CiWorkflow) (map[string]string, error)
func (*CiHandlerImpl) GetRunningWorkflowLogs ¶
func (*CiHandlerImpl) HandleCIManual ¶
func (impl *CiHandlerImpl) HandleCIManual(ciTriggerRequest bean.CiTriggerRequest) (int, error)
func (*CiHandlerImpl) HandleCIWebhook ¶
func (impl *CiHandlerImpl) HandleCIWebhook(gitCiTriggerRequest bean.GitCiTriggerRequest) (int, error)
func (*CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId ¶
func (impl *CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err error)
func (*CiHandlerImpl) UpdateCiWorkflowStatusFailure ¶ added in v0.6.10
func (impl *CiHandlerImpl) UpdateCiWorkflowStatusFailure(timeoutForFailureCiBuild int) error
func (*CiHandlerImpl) UpdateWorkflow ¶
func (impl *CiHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, error)
func (*CiHandlerImpl) WriteCIFailEvent ¶
func (impl *CiHandlerImpl) WriteCIFailEvent(ciWorkflow *pipelineConfig.CiWorkflow, ciImage string)
func (*CiHandlerImpl) WriteToCreateTestSuites ¶
func (impl *CiHandlerImpl) WriteToCreateTestSuites(pipelineId int, buildId int, triggeredBy int)
type CiLogService ¶
type CiLogService interface { FetchRunningWorkflowLogs(ciLogRequest BuildLogRequest, clusterConfig *k8s.ClusterConfig, isExt bool) (io.ReadCloser, func() error, error) FetchLogs(baseLogLocationPathConfig string, ciLogRequest BuildLogRequest) (*os.File, func() error, error) }
type CiLogServiceImpl ¶
type CiLogServiceImpl struct {
// contains filtered or unexported fields
}
func NewCiLogServiceImpl ¶
func NewCiLogServiceImpl(logger *zap.SugaredLogger, ciService CiService, k8sUtil *k8s.K8sUtil) (*CiLogServiceImpl, error)
func (*CiLogServiceImpl) FetchLogs ¶
func (impl *CiLogServiceImpl) FetchLogs(baseLogLocationPathConfig string, logRequest BuildLogRequest) (*os.File, func() error, error)
func (*CiLogServiceImpl) FetchRunningWorkflowLogs ¶
func (impl *CiLogServiceImpl) FetchRunningWorkflowLogs(ciLogRequest BuildLogRequest, clusterConfig *k8s.ClusterConfig, isExt bool) (io.ReadCloser, func() error, error)
type CiMaterialConfigService ¶ added in v0.6.24
type CiMaterialConfigService interface { //CreateMaterialsForApp : Delegating the request to ciCdPipelineOrchestrator for Material creation CreateMaterialsForApp(request *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error) //UpdateMaterialsForApp : Delegating the request to ciCdPipelineOrchestrator for updating Material UpdateMaterialsForApp(request *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error) DeleteMaterial(request *bean.UpdateMaterialDTO) error //PatchCiMaterialSource : Delegating the request to ciCdPipelineOrchestrator for updating source PatchCiMaterialSource(ciPipeline *bean.CiMaterialPatchRequest, userId int32) (*bean.CiMaterialPatchRequest, error) //BulkPatchCiMaterialSource : Delegating the request to ciCdPipelineOrchestrator for bulk updating source BulkPatchCiMaterialSource(ciPipelines *bean.CiMaterialBulkPatchRequest, userId int32, token string, checkAppSpecificAccess func(token, action string, appId int) (bool, error)) (*bean.CiMaterialBulkPatchResponse, error) //GetMaterialsForAppId : Retrieve material for given appId GetMaterialsForAppId(appId int) []*bean.GitMaterial }
type CiMaterialConfigServiceImpl ¶ added in v0.6.24
type CiMaterialConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewCiMaterialConfigServiceImpl ¶ added in v0.6.24
func NewCiMaterialConfigServiceImpl( logger *zap.SugaredLogger, materialRepo pipelineConfig.MaterialRepository, ciTemplateService CiTemplateService, ciCdPipelineOrchestrator CiCdPipelineOrchestrator, ciPipelineRepository pipelineConfig.CiPipelineRepository, gitMaterialHistoryService history.GitMaterialHistoryService, pipelineRepository pipelineConfig.PipelineRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository) *CiMaterialConfigServiceImpl
func (*CiMaterialConfigServiceImpl) BulkPatchCiMaterialSource ¶ added in v0.6.24
func (impl *CiMaterialConfigServiceImpl) BulkPatchCiMaterialSource(ciPipelines *bean.CiMaterialBulkPatchRequest, userId int32, token string, checkAppSpecificAccess func(token, action string, appId int) (bool, error)) (*bean.CiMaterialBulkPatchResponse, error)
func (*CiMaterialConfigServiceImpl) CreateMaterialsForApp ¶ added in v0.6.24
func (impl *CiMaterialConfigServiceImpl) CreateMaterialsForApp(request *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
func (*CiMaterialConfigServiceImpl) DeleteMaterial ¶ added in v0.6.24
func (impl *CiMaterialConfigServiceImpl) DeleteMaterial(request *bean.UpdateMaterialDTO) error
func (*CiMaterialConfigServiceImpl) GetMaterialsForAppId ¶ added in v0.6.24
func (impl *CiMaterialConfigServiceImpl) GetMaterialsForAppId(appId int) []*bean.GitMaterial
func (*CiMaterialConfigServiceImpl) PatchCiMaterialSource ¶ added in v0.6.24
func (impl *CiMaterialConfigServiceImpl) PatchCiMaterialSource(ciPipeline *bean.CiMaterialPatchRequest, userId int32) (*bean.CiMaterialPatchRequest, error)
func (*CiMaterialConfigServiceImpl) UpdateMaterialsForApp ¶ added in v0.6.24
func (impl *CiMaterialConfigServiceImpl) UpdateMaterialsForApp(request *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
type CiPipelineConfigService ¶ added in v0.6.24
type CiPipelineConfigService interface { //GetCiPipeline : retrieves CI pipeline configuration (CiConfigRequest) for a specific application (appId). // It fetches CI pipeline data, including pipeline materials, scripts, and associated configurations. // It returns a detailed CiConfigRequest. //If any errors occur during the retrieval process CI pipeline configuration remains nil. //If you want less detail of ciPipeline ,Please refer GetCiPipelineMin GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error) //GetCiPipelineById : Retrieve ciPipeline for given ciPipelineId GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error) //GetTriggerViewCiPipeline : retrieves a detailed view of the CI pipelines configured for a specific application (appId). // It includes information on CI pipeline materials, scripts, configurations, and linked pipelines. //If any errors occur ,It returns an error along with a nil result(bean.TriggerViewCiConfig). GetTriggerViewCiPipeline(appId int) (*bean.TriggerViewCiConfig, error) //GetExternalCi : Lists externalCi for given appId //"external CI" refers to CI pipelines and configurations that are managed externally, //like by third-party services or tools. //It fetches information about external CI pipelines, their webhooks, payload configurations, and related roles. //The function constructs an array of ExternalCiConfig objects and returns it. // If any errors occur, the function returns an error along with a nil result([]*bean.ExternalCiConfig). GetExternalCi(appId int) (ciConfig []*bean.ExternalCiConfig, err error) //GetExternalCiById : Retrieve externalCi for given appId and externalCiId. //It begins by validating the provided ID and fetching the corresponding CI pipeline from the repository. //If the CI pipeline is found, the function constructs an ExternalCiConfig object, encapsulating essential details and returns it. // If any errors occur, the function returns an error along with a nil result(*bean.ExternalCiConfig). GetExternalCiById(appId int, externalCiId int) (ciConfig *bean.ExternalCiConfig, err error) //UpdateCiTemplate : handles updates to the CiTemplate based on the provided CiConfigRequest. //It fetches relevant Docker registry information, and updates the CI configuration. //The function then creates or modifies associated resources such as Docker repositories. //After updating the configuration, it ensures to update history . //Finally, the function returns the modified CiConfigRequest. //If an error occurs, the CiConfigRequest is nil. //If you want to Update CiPipeline please refer PatchCiPipeline UpdateCiTemplate(updateRequest *bean.CiConfigRequest) (*bean.CiConfigRequest, error) //PatchCiPipeline : function manages CI pipeline operations based on the provided CiPatchRequest. //It fetches template variables, sets specific attributes, and //handles following actions // 1. create //2. update source //3. delete pipelines PatchCiPipeline(request *bean.CiPatchRequest) (ciConfig *bean.CiConfigRequest, err error) CreateCiPipeline(createRequest *bean.CiConfigRequest) (*bean.PipelineCreateResponse, error) //GetCiPipelineMin : lists minimum detail of ciPipelines for given appId and envIds. //It filters and fetches CI pipelines based on the provided environment identifiers. //If no specific environments are provided, it retrieves all CI pipelines associated with the application. //If you want more details like buildConfig ,gitMaterials etc, please refer GetCiPipeline GetCiPipelineMin(appId int, envIds []int) ([]*bean.CiPipelineMin, error) //PatchRegexCiPipeline : Update CI pipeline materials based on the provided regex patch request PatchRegexCiPipeline(request *bean.CiRegexPatchRequest) (err error) //GetCiPipelineByEnvironment : lists ciPipeline for given environmentId and appIds GetCiPipelineByEnvironment(request resourceGroup2.ResourceGroupingRequest) ([]*bean.CiConfigRequest, error) //GetCiPipelineByEnvironmentMin : lists minimum detail of ciPipelines for given environmentId and appIds GetCiPipelineByEnvironmentMin(request resourceGroup2.ResourceGroupingRequest) ([]*bean.CiPipelineMinResponse, error) //GetExternalCiByEnvironment : lists externalCi for given environmentId and appIds GetExternalCiByEnvironment(request resourceGroup2.ResourceGroupingRequest) (ciConfig []*bean.ExternalCiConfig, err error) DeleteCiPipeline(request *bean.CiPatchRequest) (*bean.CiPipeline, error) }
type CiPipelineConfigServiceImpl ¶ added in v0.6.24
type CiPipelineConfigServiceImpl struct { CiTemplateHistoryService history.CiTemplateHistoryService // contains filtered or unexported fields }
func NewCiPipelineConfigServiceImpl ¶ added in v0.6.24
func NewCiPipelineConfigServiceImpl(logger *zap.SugaredLogger, ciCdPipelineOrchestrator CiCdPipelineOrchestrator, dockerArtifactStoreRepository dockerRegistryRepository.DockerArtifactStoreRepository, materialRepo pipelineConfig.MaterialRepository, pipelineGroupRepo app2.AppRepository, pipelineRepository pipelineConfig.PipelineRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, ecrConfig *EcrConfig, appWorkflowRepository appWorkflow.AppWorkflowRepository, ciConfig *CiCdConfig, attributesService attributes.AttributesService, pipelineStageService PipelineStageService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, ciTemplateService CiTemplateService, ciTemplateOverrideRepository pipelineConfig.CiTemplateOverrideRepository, CiTemplateHistoryService history.CiTemplateHistoryService, enforcerUtil rbac.EnforcerUtil, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, resourceGroupService resourceGroup2.ResourceGroupService, customTagService CustomTagService) *CiPipelineConfigServiceImpl
func (*CiPipelineConfigServiceImpl) CreateCiPipeline ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) CreateCiPipeline(createRequest *bean.CiConfigRequest) (*bean.PipelineCreateResponse, error)
func (*CiPipelineConfigServiceImpl) DeleteCiPipeline ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) DeleteCiPipeline(request *bean.CiPatchRequest) (*bean.CiPipeline, error)
func (*CiPipelineConfigServiceImpl) GetCiPipeline ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error)
func (*CiPipelineConfigServiceImpl) GetCiPipelineByEnvironment ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetCiPipelineByEnvironment(request resourceGroup2.ResourceGroupingRequest) ([]*bean.CiConfigRequest, error)
func (*CiPipelineConfigServiceImpl) GetCiPipelineByEnvironmentMin ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetCiPipelineByEnvironmentMin(request resourceGroup2.ResourceGroupingRequest) ([]*bean.CiPipelineMinResponse, error)
func (*CiPipelineConfigServiceImpl) GetCiPipelineById ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error)
func (*CiPipelineConfigServiceImpl) GetCiPipelineMin ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetCiPipelineMin(appId int, envIds []int) ([]*bean.CiPipelineMin, error)
func (*CiPipelineConfigServiceImpl) GetExternalCi ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetExternalCi(appId int) (ciConfig []*bean.ExternalCiConfig, err error)
func (*CiPipelineConfigServiceImpl) GetExternalCiByEnvironment ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetExternalCiByEnvironment(request resourceGroup2.ResourceGroupingRequest) (ciConfig []*bean.ExternalCiConfig, err error)
func (*CiPipelineConfigServiceImpl) GetExternalCiById ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetExternalCiById(appId int, externalCiId int) (ciConfig *bean.ExternalCiConfig, err error)
func (*CiPipelineConfigServiceImpl) GetTriggerViewCiPipeline ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) GetTriggerViewCiPipeline(appId int) (*bean.TriggerViewCiConfig, error)
func (*CiPipelineConfigServiceImpl) PatchCiPipeline ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) PatchCiPipeline(request *bean.CiPatchRequest) (ciConfig *bean.CiConfigRequest, err error)
func (*CiPipelineConfigServiceImpl) PatchRegexCiPipeline ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) PatchRegexCiPipeline(request *bean.CiRegexPatchRequest) (err error)
func (*CiPipelineConfigServiceImpl) UpdateCiTemplate ¶ added in v0.6.24
func (impl *CiPipelineConfigServiceImpl) UpdateCiTemplate(updateRequest *bean.CiConfigRequest) (*bean.CiConfigRequest, error)
type CiService ¶
type CiService interface { TriggerCiPipeline(trigger Trigger) (int, error) GetCiMaterials(pipelineId int, ciMaterials []*pipelineConfig.CiPipelineMaterial) ([]*pipelineConfig.CiPipelineMaterial, error) }
type CiServiceImpl ¶
type CiServiceImpl struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewCiServiceImpl ¶
func NewCiServiceImpl(Logger *zap.SugaredLogger, workflowService WorkflowService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, eventClient client.EventClient, eventFactory client.EventFactory, mergeUtil *util.MergeUtil, ciPipelineRepository pipelineConfig.CiPipelineRepository, prePostCiScriptHistoryService history.PrePostCiScriptHistoryService, pipelineStageService PipelineStageService, userService user.UserService, ciTemplateService CiTemplateService, appCrudOperationService app.AppCrudOperationService, envRepository repository1.EnvironmentRepository, appRepository appRepository.AppRepository, variableSnapshotHistoryService variables.VariableSnapshotHistoryService, customTagService CustomTagService, ) *CiServiceImpl
func (*CiServiceImpl) BuildPayload ¶
func (impl *CiServiceImpl) BuildPayload(trigger Trigger, pipeline *pipelineConfig.CiPipeline) *client.Payload
TODO: Send all trigger data
func (*CiServiceImpl) GetCiMaterials ¶
func (impl *CiServiceImpl) GetCiMaterials(pipelineId int, ciMaterials []*pipelineConfig.CiPipelineMaterial) ([]*pipelineConfig.CiPipelineMaterial, error)
func (*CiServiceImpl) TriggerCiPipeline ¶
func (impl *CiServiceImpl) TriggerCiPipeline(trigger Trigger) (int, error)
func (*CiServiceImpl) WriteCITriggerEvent ¶
func (impl *CiServiceImpl) WriteCITriggerEvent(trigger Trigger, pipeline *pipelineConfig.CiPipeline, workflowRequest *WorkflowRequest)
type CiTemplateService ¶ added in v0.6.6
type CiTemplateService interface { Save(ciTemplateBean *bean.CiTemplateBean) error FindByAppId(appId int) (ciTemplateBean *bean.CiTemplateBean, err error) FindTemplateOverrideByAppId(appId int) (ciTemplateBeans []*bean.CiTemplateBean, err error) FindTemplateOverrideByCiPipelineIds(ciPipelineIds []int) (ciTemplateBeans []*bean.CiTemplateBean, err error) FindTemplateOverrideByCiPipelineId(ciPipelineId int) (*bean.CiTemplateBean, error) Update(ciTemplateBean *bean.CiTemplateBean) error FindByAppIds(appIds []int) (map[int]*bean.CiTemplateBean, error) }
type CiTemplateServiceImpl ¶ added in v0.6.6
type CiTemplateServiceImpl struct { Logger *zap.SugaredLogger CiBuildConfigService CiBuildConfigService CiTemplateRepository pipelineConfig.CiTemplateRepository CiTemplateOverrideRepository pipelineConfig.CiTemplateOverrideRepository }
func NewCiTemplateServiceImpl ¶ added in v0.6.6
func NewCiTemplateServiceImpl(logger *zap.SugaredLogger, ciBuildConfigService CiBuildConfigService, ciTemplateRepository pipelineConfig.CiTemplateRepository, ciTemplateOverrideRepository pipelineConfig.CiTemplateOverrideRepository) *CiTemplateServiceImpl
func (CiTemplateServiceImpl) FindByAppId ¶ added in v0.6.6
func (impl CiTemplateServiceImpl) FindByAppId(appId int) (ciTemplateBean *bean.CiTemplateBean, err error)
func (CiTemplateServiceImpl) FindByAppIds ¶ added in v0.6.16
func (impl CiTemplateServiceImpl) FindByAppIds(appIds []int) (map[int]*bean.CiTemplateBean, error)
func (CiTemplateServiceImpl) FindTemplateOverrideByAppId ¶ added in v0.6.6
func (impl CiTemplateServiceImpl) FindTemplateOverrideByAppId(appId int) (ciTemplateBeans []*bean.CiTemplateBean, err error)
func (CiTemplateServiceImpl) FindTemplateOverrideByCiPipelineId ¶ added in v0.6.6
func (impl CiTemplateServiceImpl) FindTemplateOverrideByCiPipelineId(ciPipelineId int) (*bean.CiTemplateBean, error)
func (CiTemplateServiceImpl) FindTemplateOverrideByCiPipelineIds ¶ added in v0.6.16
func (impl CiTemplateServiceImpl) FindTemplateOverrideByCiPipelineIds(ciPipelineIds []int) (ciTemplateBeans []*bean.CiTemplateBean, err error)
func (CiTemplateServiceImpl) Save ¶ added in v0.6.6
func (impl CiTemplateServiceImpl) Save(ciTemplateBean *bean.CiTemplateBean) error
func (CiTemplateServiceImpl) Update ¶ added in v0.6.6
func (impl CiTemplateServiceImpl) Update(ciTemplateBean *bean.CiTemplateBean) error
type CiVolumeMount ¶ added in v0.6.4
type ConfigMapSecretDto ¶ added in v0.6.17
type ConfigMapSecretDto struct { Name string Data map[string]string OwnerRef v1.OwnerReference }
type ConfigMapSecretsResponse ¶
type ConfigMapSecretsResponse struct { Maps []bean2.ConfigSecretMap `json:"maps"` Secrets []bean2.ConfigSecretMap `json:"secrets"` }
type ConfigMapService ¶
type ConfigMapService interface { CMGlobalAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error) CMGlobalFetch(appId int) (*bean.ConfigDataRequest, error) CMEnvironmentAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error) CMEnvironmentFetch(appId int, envId int) (*bean.ConfigDataRequest, error) CMGlobalFetchForEdit(name string, id int) (*bean.ConfigDataRequest, error) CMEnvironmentFetchForEdit(name string, id int, appId int, envId int) (*bean.ConfigDataRequest, error) CSGlobalAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error) CSGlobalFetch(appId int) (*bean.ConfigDataRequest, error) CSEnvironmentAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error) CSEnvironmentFetch(appId int, envId int) (*bean.ConfigDataRequest, error) CMGlobalDelete(name string, id int, userId int32) (bool, error) CMEnvironmentDelete(name string, id int, userId int32) (bool, error) CSGlobalDelete(name string, id int, userId int32) (bool, error) CSEnvironmentDelete(name string, id int, userId int32) (bool, error) CMGlobalDeleteByAppId(name string, appId int, userId int32) (bool, error) CMEnvironmentDeleteByAppIdAndEnvId(name string, appId int, envId int, userId int32) (bool, error) CSGlobalDeleteByAppId(name string, appId int, userId int32) (bool, error) CSEnvironmentDeleteByAppIdAndEnvId(name string, appId int, envId int, userId int32) (bool, error) CSGlobalFetchForEdit(name string, id int) (*bean.ConfigDataRequest, error) CSEnvironmentFetchForEdit(name string, id int, appId int, envId int) (*bean.ConfigDataRequest, error) ConfigSecretGlobalBulkPatch(bulkPatchRequest *bean.BulkPatchRequest) (*bean.BulkPatchRequest, error) ConfigSecretEnvironmentBulkPatch(bulkPatchRequest *bean.BulkPatchRequest) (*bean.BulkPatchRequest, error) ConfigSecretEnvironmentCreate(createJobEnvOverrideRequest *bean.CreateJobEnvOverridePayload) (*bean.CreateJobEnvOverridePayload, error) ConfigSecretEnvironmentDelete(createJobEnvOverrideRequest *bean.CreateJobEnvOverridePayload) (*bean.CreateJobEnvOverridePayload, error) ConfigSecretEnvironmentGet(appId int) ([]bean.JobEnvOverrideResponse, error) ConfigSecretEnvironmentClone(appId int, cloneAppId int, userId int32) ([]chartConfig.ConfigMapEnvModel, error) }
type ConfigMapServiceImpl ¶
type ConfigMapServiceImpl struct {
// contains filtered or unexported fields
}
func NewConfigMapServiceImpl ¶
func NewConfigMapServiceImpl(chartRepository chartRepoRepository.ChartRepository, logger *zap.SugaredLogger, repoRepository chartRepoRepository.ChartRepoRepository, mergeUtil util.MergeUtil, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, environmentConfigRepository chartConfig.EnvConfigOverrideRepository, commonService commonService.CommonService, appRepository app.AppRepository, configMapHistoryService history2.ConfigMapHistoryService, environmentRepository repository2.EnvironmentRepository) *ConfigMapServiceImpl
func (ConfigMapServiceImpl) CMEnvironmentAddUpdate ¶
func (impl ConfigMapServiceImpl) CMEnvironmentAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMEnvironmentDelete ¶
func (ConfigMapServiceImpl) CMEnvironmentDeleteByAppIdAndEnvId ¶
func (ConfigMapServiceImpl) CMEnvironmentFetch ¶
func (impl ConfigMapServiceImpl) CMEnvironmentFetch(appId int, envId int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMEnvironmentFetchForEdit ¶ added in v0.6.22
func (impl ConfigMapServiceImpl) CMEnvironmentFetchForEdit(name string, id int, appId int, envId int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMGlobalAddUpdate ¶
func (impl ConfigMapServiceImpl) CMGlobalAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMGlobalDelete ¶
func (ConfigMapServiceImpl) CMGlobalDeleteByAppId ¶
func (ConfigMapServiceImpl) CMGlobalFetch ¶
func (impl ConfigMapServiceImpl) CMGlobalFetch(appId int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMGlobalFetchForEdit ¶ added in v0.6.22
func (impl ConfigMapServiceImpl) CMGlobalFetchForEdit(name string, id int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSEnvironmentAddUpdate ¶
func (impl ConfigMapServiceImpl) CSEnvironmentAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSEnvironmentDelete ¶
func (ConfigMapServiceImpl) CSEnvironmentDeleteByAppIdAndEnvId ¶
func (ConfigMapServiceImpl) CSEnvironmentFetch ¶
func (impl ConfigMapServiceImpl) CSEnvironmentFetch(appId int, envId int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSEnvironmentFetchForEdit ¶
func (impl ConfigMapServiceImpl) CSEnvironmentFetchForEdit(name string, id int, appId int, envId int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSGlobalAddUpdate ¶
func (impl ConfigMapServiceImpl) CSGlobalAddUpdate(configMapRequest *bean.ConfigDataRequest) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSGlobalDelete ¶
func (ConfigMapServiceImpl) CSGlobalDeleteByAppId ¶
func (ConfigMapServiceImpl) CSGlobalFetch ¶
func (impl ConfigMapServiceImpl) CSGlobalFetch(appId int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSGlobalFetchForEdit ¶
func (impl ConfigMapServiceImpl) CSGlobalFetchForEdit(name string, id int) (*bean.ConfigDataRequest, error)
func (ConfigMapServiceImpl) ConfigSecretEnvironmentBulkPatch ¶
func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentBulkPatch(bulkPatchRequest *bean.BulkPatchRequest) (*bean.BulkPatchRequest, error)
func (ConfigMapServiceImpl) ConfigSecretEnvironmentClone ¶ added in v0.6.21
func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentClone(appId int, cloneAppId int, userId int32) ([]chartConfig.ConfigMapEnvModel, error)
func (ConfigMapServiceImpl) ConfigSecretEnvironmentCreate ¶ added in v0.6.21
func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentCreate(createJobEnvOverrideRequest *bean.CreateJobEnvOverridePayload) (*bean.CreateJobEnvOverridePayload, error)
func (ConfigMapServiceImpl) ConfigSecretEnvironmentDelete ¶ added in v0.6.21
func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentDelete(createJobEnvOverrideRequest *bean.CreateJobEnvOverridePayload) (*bean.CreateJobEnvOverridePayload, error)
func (ConfigMapServiceImpl) ConfigSecretEnvironmentGet ¶ added in v0.6.21
func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentGet(appId int) ([]bean.JobEnvOverrideResponse, error)
func (ConfigMapServiceImpl) ConfigSecretGlobalBulkPatch ¶
func (impl ConfigMapServiceImpl) ConfigSecretGlobalBulkPatch(bulkPatchRequest *bean.BulkPatchRequest) (*bean.BulkPatchRequest, error)
type ConfigsList ¶
type ConfigsList struct {
ConfigData []*bean.ConfigData `json:"maps"`
}
type CustomTagService ¶ added in v0.6.25
type CustomTagService interface { CreateOrUpdateCustomTag(tag *bean.CustomTag) error GetCustomTagByEntityKeyAndValue(entityKey int, entityValue string) (*repository.CustomTag, error) GetActiveCustomTagByEntityKeyAndValue(entityKey int, entityValue string) (*repository.CustomTag, error) GenerateImagePath(entityKey int, entityValue string, dockerRegistryURL string, dockerRepo string) (*repository.ImagePathReservation, error) DeleteCustomTagIfExists(tag bean.CustomTag) error DeactivateImagePathReservation(id int) error }
type CustomTagServiceImpl ¶ added in v0.6.25
type CustomTagServiceImpl struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewCustomTagService ¶ added in v0.6.25
func NewCustomTagService(logger *zap.SugaredLogger, customTagRepo repository.ImageTagRepository) *CustomTagServiceImpl
func (*CustomTagServiceImpl) CreateOrUpdateCustomTag ¶ added in v0.6.25
func (impl *CustomTagServiceImpl) CreateOrUpdateCustomTag(tag *bean.CustomTag) error
func (*CustomTagServiceImpl) DeactivateImagePathReservation ¶ added in v0.6.25
func (impl *CustomTagServiceImpl) DeactivateImagePathReservation(id int) error
func (*CustomTagServiceImpl) DeleteCustomTagIfExists ¶ added in v0.6.25
func (impl *CustomTagServiceImpl) DeleteCustomTagIfExists(tag bean.CustomTag) error
func (*CustomTagServiceImpl) GenerateImagePath ¶ added in v0.6.25
func (impl *CustomTagServiceImpl) GenerateImagePath(entityKey int, entityValue string, dockerRegistryURL string, dockerRepo string) (*repository.ImagePathReservation, error)
func (*CustomTagServiceImpl) GetActiveCustomTagByEntityKeyAndValue ¶ added in v0.6.25
func (impl *CustomTagServiceImpl) GetActiveCustomTagByEntityKeyAndValue(entityKey int, entityValue string) (*repository.CustomTag, error)
func (*CustomTagServiceImpl) GetCustomTagByEntityKeyAndValue ¶ added in v0.6.25
func (impl *CustomTagServiceImpl) GetCustomTagByEntityKeyAndValue(entityKey int, entityValue string) (*repository.CustomTag, error)
type DbConfigBean ¶
type DbConfigBean struct { Id int `json:"id,omitempty" validate:"number"` Name string `json:"name,omitempty" validate:"required"` //name by which user identifies this db Type string `json:"type,omitempty" validate:"required"` //type of db, PG, MYsql, MariaDb Host string `json:"host,omitempty" validate:"host"` Port string `json:"port,omitempty" validate:"max=4"` DbName string `json:"dbName,omitempty" validate:"required"` //name of database inside PG UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` Active bool `json:"active,omitempty"` UserId int32 `json:"-"` }
type DbConfigService ¶
type DbConfigService interface { Save(dbConfigBean *DbConfigBean) (dbConfig *DbConfigBean, err error) GetAll() (dbConfigs []*DbConfigBean, err error) GetById(id int) (dbConfig *DbConfigBean, err error) Update(dbConfigBean *DbConfigBean) (dbConfig *DbConfigBean, err error) GetForAutocomplete() (dbConfigs []*DbConfigBean, err error) }
type DbConfigServiceImpl ¶
type DbConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewDbConfigService ¶
func NewDbConfigService(configRepo repository.DbConfigRepository, logger *zap.SugaredLogger) *DbConfigServiceImpl
func (DbConfigServiceImpl) GetAll ¶
func (impl DbConfigServiceImpl) GetAll() (dbConfigs []*DbConfigBean, err error)
func (DbConfigServiceImpl) GetById ¶
func (impl DbConfigServiceImpl) GetById(id int) (dbConfig *DbConfigBean, err error)
func (DbConfigServiceImpl) GetForAutocomplete ¶
func (impl DbConfigServiceImpl) GetForAutocomplete() (dbConfigs []*DbConfigBean, err error)
func (DbConfigServiceImpl) Save ¶
func (impl DbConfigServiceImpl) Save(dbConfigBean *DbConfigBean) (dbConfig *DbConfigBean, err error)
func (DbConfigServiceImpl) Update ¶
func (impl DbConfigServiceImpl) Update(dbConfigBean *DbConfigBean) (dbConfig *DbConfigBean, err error)
type DbMigrationConfigBean ¶
type DbMigrationConfigBean struct { Id int `json:"id"` DbConfigId int `json:"dbConfigId"` PipelineId int `json:"pipelineId"` GitMaterialId int `json:"gitMaterialId"` ScriptSource string `json:"scriptSource"` //location of file in git. relative to git root MigrationTool string `json:"migrationTool"` Active bool `json:"active"` UserId int32 `json:"-"` }
type DbMigrationService ¶
type DbMigrationService interface { Save(bean *DbMigrationConfigBean) (*DbMigrationConfigBean, error) Update(bean *DbMigrationConfigBean) (*DbMigrationConfigBean, error) GetByPipelineId(pipelineId int) (*DbMigrationConfigBean, error) }
type DbMigrationServiceImpl ¶
type DbMigrationServiceImpl struct {
// contains filtered or unexported fields
}
func NewDbMogrationService ¶
func NewDbMogrationService(logger *zap.SugaredLogger, dbMigrationConfigRepository pipelineConfig.DbMigrationConfigRepository) *DbMigrationServiceImpl
func (DbMigrationServiceImpl) GetByPipelineId ¶
func (impl DbMigrationServiceImpl) GetByPipelineId(pipelineId int) (*DbMigrationConfigBean, error)
func (DbMigrationServiceImpl) Save ¶
func (impl DbMigrationServiceImpl) Save(bean *DbMigrationConfigBean) (*DbMigrationConfigBean, error)
func (DbMigrationServiceImpl) Update ¶
func (impl DbMigrationServiceImpl) Update(bean *DbMigrationConfigBean) (*DbMigrationConfigBean, error)
type Deployment ¶
type Deployment struct {
Strategy map[string]interface{} `json:"strategy"`
}
type DeploymentConfigService ¶ added in v0.6.2
type DeploymentConfigServiceImpl ¶ added in v0.6.2
type DeploymentConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewDeploymentConfigServiceImpl ¶ added in v0.6.2
func NewDeploymentConfigServiceImpl(logger *zap.SugaredLogger, envConfigOverrideRepository chartConfig.EnvConfigOverrideRepository, chartRepository chartRepoRepository.ChartRepository, pipelineRepository pipelineConfig.PipelineRepository, envLevelAppMetricsRepository repository.EnvLevelAppMetricsRepository, appLevelMetricsRepository repository.AppLevelMetricsRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, configMapHistoryService history.ConfigMapHistoryService, chartRefRepository chartRepoRepository.ChartRefRepository, variableEntityMappingService variables.VariableEntityMappingService, scopedVariableService variables.ScopedVariableService, variableTemplateParser parsers.VariableTemplateParser, ) *DeploymentConfigServiceImpl
func (*DeploymentConfigServiceImpl) GetLatestCMCSConfig ¶ added in v0.6.2
func (impl *DeploymentConfigServiceImpl) GetLatestCMCSConfig(pipeline *pipelineConfig.Pipeline, userHasAdminAccess bool) ([]*history.ComponentLevelHistoryDetailDto, []*history.ComponentLevelHistoryDetailDto, error)
func (*DeploymentConfigServiceImpl) GetLatestDeploymentConfigurationByPipelineId ¶ added in v0.6.2
func (impl *DeploymentConfigServiceImpl) GetLatestDeploymentConfigurationByPipelineId(ctx context.Context, pipelineId int, userHasAdminAccess bool) (*history.AllDeploymentConfigurationDetail, error)
func (*DeploymentConfigServiceImpl) GetLatestDeploymentTemplateConfig ¶ added in v0.6.2
func (impl *DeploymentConfigServiceImpl) GetLatestDeploymentTemplateConfig(ctx context.Context, pipeline *pipelineConfig.Pipeline) (*history.HistoryDetailDto, error)
func (*DeploymentConfigServiceImpl) GetLatestPipelineStrategyConfig ¶ added in v0.6.2
func (impl *DeploymentConfigServiceImpl) GetLatestPipelineStrategyConfig(pipeline *pipelineConfig.Pipeline) (*history.HistoryDetailDto, error)
func (*DeploymentConfigServiceImpl) GetMergedCMCSConfigMap ¶ added in v0.6.2
func (impl *DeploymentConfigServiceImpl) GetMergedCMCSConfigMap(appLevelConfig, envLevelConfig string, configType repository2.ConfigType) (map[string]*history.ConfigData, error)
type DeploymentServiceTypeConfig ¶ added in v0.6.9
type DeploymentServiceTypeConfig struct {
IsInternalUse bool `env:"IS_INTERNAL_USE" envDefault:"false"`
}
func GetDeploymentServiceTypeConfig ¶ added in v0.6.9
func GetDeploymentServiceTypeConfig() (*DeploymentServiceTypeConfig, error)
type DeploymentType ¶
type DeploymentType struct {
Deployment Deployment `json:"deployment"`
}
type DevtronAppCMCSService ¶ added in v0.6.24
type DevtronAppCMCSService interface { //FetchConfigmapSecretsForCdStages : Delegating the request to appService for fetching cm/cs FetchConfigmapSecretsForCdStages(appId, envId, cdPipelineId int) (ConfigMapSecretsResponse, error) //GetDeploymentConfigMap : Retrieve deployment config values from the attributes table GetDeploymentConfigMap(environmentId int) (map[string]bool, error) }
type DevtronAppCMCSServiceImpl ¶ added in v0.6.24
type DevtronAppCMCSServiceImpl struct {
// contains filtered or unexported fields
}
func NewDevtronAppCMCSServiceImpl ¶ added in v0.6.24
func NewDevtronAppCMCSServiceImpl( logger *zap.SugaredLogger, appService app.AppService, attributesRepository repository.AttributesRepository) *DevtronAppCMCSServiceImpl
func (*DevtronAppCMCSServiceImpl) FetchConfigmapSecretsForCdStages ¶ added in v0.6.24
func (impl *DevtronAppCMCSServiceImpl) FetchConfigmapSecretsForCdStages(appId, envId, cdPipelineId int) (ConfigMapSecretsResponse, error)
func (*DevtronAppCMCSServiceImpl) GetDeploymentConfigMap ¶ added in v0.6.24
func (impl *DevtronAppCMCSServiceImpl) GetDeploymentConfigMap(environmentId int) (map[string]bool, error)
type DevtronAppConfigService ¶ added in v0.6.24
type DevtronAppConfigService interface { //CreateApp : This function creates applications of type Job as well as Devtronapps // In case of error response object is nil CreateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error) //DeleteApp : This function deletes applications of type Job as well as DevtronApps DeleteApp(appId int, userId int32) error //GetApp : Gets Application along with Git materials for given appId. //If the application type is a 'Chart Store App', it doesnt provide any detail. //For application types like Jobs and DevtronApps, it retrieves Git materials associated with the application. //In case of error response object is nil GetApp(appId int) (application *bean.CreateAppDTO, err error) //FindByIds : Find applications by given IDs, delegating the request to the appRepository. // It queries the repository for applications corresponding to the given IDs and constructs //a list of AppBean objects containing ID, name, and team ID. //It returns the list of AppBean instances. //In case of error,AppBean is returned as nil. FindByIds(ids []*int) ([]*AppBean, error) //GetAppList : Retrieve and return a list of applications after converting in proper bean object. //In case of any error , []AppBean is returned as nil. GetAppList() ([]AppBean, error) //FindAllMatchesByAppName : Find and return applications matching the given name and type. //Internally,It performs a case-insensitive search based on the applicationName("%"+appName+"%") and type. //In case of error,[]*AppBean is returned as nil. FindAllMatchesByAppName(appName string, appType helper.AppType) ([]*AppBean, error) //GetAppListForEnvironment : Retrieves a list of applications (AppBean) based on the provided ResourceGroupingRequest. // It first determines the relevant application and environment objects based on the active pipelines fetched from the repository. //The function then performs authorization checks on these objects for the given user. //Finally , the corresponding AppBean objects are added to the applicationList and then returned. //In case of error,[]*AppBean is returned as nil. GetAppListForEnvironment(request resourceGroup.ResourceGroupingRequest) ([]*AppBean, error) //FindAppsByTeamId : Retrieves applications (AppBean) associated with the provided teamId //It queries the repository for applications belonging to the specified team(project) and //constructs a list of AppBean instances containing ID and name. //The function returns the list of applications in valid case. //In case of error,[]*AppBean is returned as nil. FindAppsByTeamId(teamId int) ([]*AppBean, error) //FindAppsByTeamName : Retrieves applications (AppBean) associated with the provided teamName // It queries the repository for applications belonging to the specified team(project) and // constructs a list of AppBean instances containing ID and name. // The function returns the list of applications in valid case. // In case of error,[]*AppBean is returned as nil. FindAppsByTeamName(teamName string) ([]AppBean, error) }
type DevtronAppConfigServiceImpl ¶ added in v0.6.24
type DevtronAppConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewDevtronAppConfigServiceImpl ¶ added in v0.6.24
func NewDevtronAppConfigServiceImpl( logger *zap.SugaredLogger, ciCdPipelineOrchestrator CiCdPipelineOrchestrator, appRepo app.AppRepository, pipelineRepository pipelineConfig.PipelineRepository, resourceGroupService resourceGroup.ResourceGroupService, enforcerUtil rbac.EnforcerUtil, ciMaterialConfigService CiMaterialConfigService) *DevtronAppConfigServiceImpl
func (*DevtronAppConfigServiceImpl) CreateApp ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) CreateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
func (*DevtronAppConfigServiceImpl) DeleteApp ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) DeleteApp(appId int, userId int32) error
func (*DevtronAppConfigServiceImpl) FindAllMatchesByAppName ¶ added in v0.6.24
func (*DevtronAppConfigServiceImpl) FindAppsByTeamId ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) FindAppsByTeamId(teamId int) ([]*AppBean, error)
func (*DevtronAppConfigServiceImpl) FindAppsByTeamName ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) FindAppsByTeamName(teamName string) ([]AppBean, error)
func (*DevtronAppConfigServiceImpl) FindByIds ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) FindByIds(ids []*int) ([]*AppBean, error)
func (*DevtronAppConfigServiceImpl) GetApp ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) GetApp(appId int) (application *bean.CreateAppDTO, err error)
func (*DevtronAppConfigServiceImpl) GetAppList ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) GetAppList() ([]AppBean, error)
func (*DevtronAppConfigServiceImpl) GetAppListForEnvironment ¶ added in v0.6.24
func (impl *DevtronAppConfigServiceImpl) GetAppListForEnvironment(request resourceGroup.ResourceGroupingRequest) ([]*AppBean, error)
type DevtronAppStrategyService ¶ added in v0.6.24
type DevtronAppStrategyService interface { //FetchCDPipelineStrategy : Retrieve CDPipelineStrategy for given appId FetchCDPipelineStrategy(appId int) (PipelineStrategiesResponse, error) // FetchDefaultCDPipelineStrategy : // TODO: uncomment this after code has been refactored as this function doesnt contain any logic to fetch strategy FetchDefaultCDPipelineStrategy(appId int, envId int) (PipelineStrategy, error) }
type DevtronAppStrategyServiceImpl ¶ added in v0.6.24
type DevtronAppStrategyServiceImpl struct {
// contains filtered or unexported fields
}
func NewDevtronAppStrategyServiceImpl ¶ added in v0.6.24
func NewDevtronAppStrategyServiceImpl( logger *zap.SugaredLogger, chartRepository chartRepoRepository.ChartRepository, globalStrategyMetadataChartRefMappingRepository chartRepoRepository.GlobalStrategyMetadataChartRefMappingRepository, ciCdPipelineOrchestrator CiCdPipelineOrchestrator, cdPipelineConfigService CdPipelineConfigService) *DevtronAppStrategyServiceImpl
func (*DevtronAppStrategyServiceImpl) FetchCDPipelineStrategy ¶ added in v0.6.24
func (impl *DevtronAppStrategyServiceImpl) FetchCDPipelineStrategy(appId int) (PipelineStrategiesResponse, error)
func (*DevtronAppStrategyServiceImpl) FetchDefaultCDPipelineStrategy ¶ added in v0.6.24
func (impl *DevtronAppStrategyServiceImpl) FetchDefaultCDPipelineStrategy(appId int, envId int) (PipelineStrategy, error)
type DisabledFields ¶ added in v0.6.23
type DisabledFields string
const ( DISABLED_CONTAINER DisabledFields = "CONTAINER" DISABLED_CHART_PULL DisabledFields = "CHART_PULL" )
type DockerArtifactStoreBean ¶
type DockerArtifactStoreBean struct { Id string `json:"id" validate:"required"` PluginId string `json:"pluginId,omitempty" validate:"required"` RegistryURL string `json:"registryUrl" validate:"required"` RegistryType repository.RegistryType `json:"registryType" validate:"required"` IsOCICompliantRegistry bool `json:"isOCICompliantRegistry"` OCIRegistryConfig map[string]string `json:"ociRegistryConfig,omitempty"` IsPublic bool `json:"isPublic"` RepositoryList []string `json:"repositoryList,omitempty"` AWSAccessKeyId string `json:"awsAccessKeyId,omitempty"` AWSSecretAccessKey string `json:"awsSecretAccessKey,omitempty"` AWSRegion string `json:"awsRegion,omitempty"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` IsDefault bool `json:"isDefault"` Connection string `json:"connection"` Cert string `json:"cert"` Active bool `json:"active"` DisabledFields []DisabledFields `json:"disabledFields"` User int32 `json:"-"` DockerRegistryIpsConfig *DockerRegistryIpsConfigBean `json:"ipsConfig,omitempty"` }
type DockerRegistryConfig ¶
type DockerRegistryConfig interface { Create(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error) ListAllActive() ([]DockerArtifactStoreBean, error) FetchAllDockerAccounts() ([]DockerArtifactStoreBean, error) FetchOneDockerAccount(storeId string) (*DockerArtifactStoreBean, error) Update(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error) UpdateInactive(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error) Delete(storeId string) (string, error) DeleteReg(bean *DockerArtifactStoreBean) error CheckInActiveDockerAccount(storeId string) (bool, error) ValidateRegistryCredentials(bean *DockerArtifactStoreBean) bool ConfigureOCIRegistry(bean *DockerArtifactStoreBean, isUpdate bool, userId int32, tx *pg.Tx) error CreateOrUpdateOCIRegistryConfig(ociRegistryConfig *repository.OCIRegistryConfig, userId int32, tx *pg.Tx) error FilterOCIRegistryConfigForSpecificRepoType(ociRegistryConfigList []*repository.OCIRegistryConfig, repositoryType string) *repository.OCIRegistryConfig FilterRegistryBeanListBasedOnStorageTypeAndAction(bean []DockerArtifactStoreBean, storageType string, actionTypes ...string) []DockerArtifactStoreBean ValidateRegistryStorageType(registryId string, storageType string, storageActions ...string) bool }
type DockerRegistryConfigImpl ¶
type DockerRegistryConfigImpl struct {
// contains filtered or unexported fields
}
func NewDockerRegistryConfigImpl ¶
func NewDockerRegistryConfigImpl(logger *zap.SugaredLogger, helmAppService client.HelmAppService, dockerArtifactStoreRepository repository.DockerArtifactStoreRepository, dockerRegistryIpsConfigRepository repository.DockerRegistryIpsConfigRepository, ociRegistryConfigRepository repository.OCIRegistryConfigRepository) *DockerRegistryConfigImpl
func (DockerRegistryConfigImpl) CheckInActiveDockerAccount ¶ added in v0.6.15
func (impl DockerRegistryConfigImpl) CheckInActiveDockerAccount(storeId string) (bool, error)
func (DockerRegistryConfigImpl) ConfigureOCIRegistry ¶ added in v0.6.19
func (impl DockerRegistryConfigImpl) ConfigureOCIRegistry(bean *DockerArtifactStoreBean, isUpdate bool, userId int32, tx *pg.Tx) error
ConfigureOCIRegistry Takes DockerArtifactStoreBean, IsUpdate flag and the DB context. It finally creates/updates the OCI config in the DB. Returns Error if any.
func (DockerRegistryConfigImpl) Create ¶
func (impl DockerRegistryConfigImpl) Create(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
Create Takes the DockerArtifactStoreBean and creates the record in DB. Returns Error if any
func (DockerRegistryConfigImpl) CreateOrUpdateOCIRegistryConfig ¶ added in v0.6.19
func (impl DockerRegistryConfigImpl) CreateOrUpdateOCIRegistryConfig(ociRegistryConfig *repository.OCIRegistryConfig, userId int32, tx *pg.Tx) error
CreateOrUpdateOCIRegistryConfig Takes the OCIRegistryConfig to be saved/updated and the DB context. For update OCIRegistryConfig.Id should be the record id to be updated. Returns Error if any.
func (DockerRegistryConfigImpl) Delete ¶
func (impl DockerRegistryConfigImpl) Delete(storeId string) (string, error)
Delete is a Deprecated function. It was used to hard delete the registry from DB.
func (DockerRegistryConfigImpl) DeleteReg ¶ added in v0.3.15
func (impl DockerRegistryConfigImpl) DeleteReg(bean *DockerArtifactStoreBean) error
DeleteReg Takes DockerArtifactStoreBean and soft deletes the OCI configs (if exists), finally soft deletes the registry. Returns Error if any.
func (DockerRegistryConfigImpl) FetchAllDockerAccounts ¶
func (impl DockerRegistryConfigImpl) FetchAllDockerAccounts() ([]DockerArtifactStoreBean, error)
FetchAllDockerAccounts method used for getting all registry accounts with complete details
func (DockerRegistryConfigImpl) FetchOneDockerAccount ¶
func (impl DockerRegistryConfigImpl) FetchOneDockerAccount(storeId string) (*DockerArtifactStoreBean, error)
FetchOneDockerAccount this method takes the docker account id and Returns DockerArtifactStoreBean and Error (if any)
func (DockerRegistryConfigImpl) FilterOCIRegistryConfigForSpecificRepoType ¶ added in v0.6.19
func (impl DockerRegistryConfigImpl) FilterOCIRegistryConfigForSpecificRepoType(ociRegistryConfigList []*repository.OCIRegistryConfig, repositoryType string) *repository.OCIRegistryConfig
FilterOCIRegistryConfigForSpecificRepoType Takes the list of OCIRegistryConfigs and the RepositoryType to be filtered. Returns the first entry that matches the repositoryType.
func (DockerRegistryConfigImpl) FilterRegistryBeanListBasedOnStorageTypeAndAction ¶ added in v0.6.19
func (impl DockerRegistryConfigImpl) FilterRegistryBeanListBasedOnStorageTypeAndAction(bean []DockerArtifactStoreBean, storageType string, actionTypes ...string) []DockerArtifactStoreBean
FilterRegistriesBasedOnStorageTypeAndAction
Parameters:
- List of DockerArtifactStoreBean,
- storageType: it can be any from repository.OCI_REGISRTY_REPO_TYPE_LIST
- list of actionTypes: it can be PULL, PUSH, PULL/PUSH
Returns:
- List of DockerArtifactStoreBean
- Error: if invalid storageType
func (DockerRegistryConfigImpl) ListAllActive ¶
func (impl DockerRegistryConfigImpl) ListAllActive() ([]DockerArtifactStoreBean, error)
ListAllActive Returns the list all active artifact stores
func (DockerRegistryConfigImpl) PopulateOCIRegistryConfig ¶ added in v0.6.19
func (impl DockerRegistryConfigImpl) PopulateOCIRegistryConfig(store *repository.DockerArtifactStore, storeBean *DockerArtifactStoreBean) *DockerArtifactStoreBean
PopulateOCIRegistryConfig Takes the DB docker_artifact_store response and generates
func (DockerRegistryConfigImpl) Update ¶
func (impl DockerRegistryConfigImpl) Update(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
Update will update the existing registry with the given DockerArtifactStoreBean
func (DockerRegistryConfigImpl) UpdateInactive ¶ added in v0.6.15
func (impl DockerRegistryConfigImpl) UpdateInactive(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
UpdateInactive will update the existing soft deleted registry with the given DockerArtifactStoreBean instead of creating one
func (DockerRegistryConfigImpl) ValidateRegistryCredentials ¶ added in v0.6.23
func (impl DockerRegistryConfigImpl) ValidateRegistryCredentials(bean *DockerArtifactStoreBean) bool
func (DockerRegistryConfigImpl) ValidateRegistryStorageType ¶ added in v0.6.19
func (impl DockerRegistryConfigImpl) ValidateRegistryStorageType(registryId string, storageType string, storageActions ...string) bool
ValidateRegistryStorageType
Parameters:
- registryId,
- storageType: it can be any from repository.OCI_REGISRTY_REPO_TYPE_LIST
- list of storageActions: it can be PULL, PUSH, PULL/PUSH
Logic:
- Fetch registry config for the given registryId and validate if the storageType has any of the given storageActions
Returns:
- isValid bool
type DockerRegistryIpsConfigBean ¶ added in v0.6.7
type DockerRegistryIpsConfigBean struct { Id int `json:"id"` CredentialType repository.DockerRegistryIpsCredentialType `json:"credentialType,omitempty" validate:"oneof=SAME_AS_REGISTRY NAME CUSTOM_CREDENTIAL"` CredentialValue string `json:"credentialValue,omitempty"` AppliedClusterIdsCsv string `json:"appliedClusterIdsCsv,omitempty"` IgnoredClusterIdsCsv string `json:"ignoredClusterIdsCsv,omitempty"` Active bool `json:"active,omitempty"` }
type EcrConfig ¶
type EcrConfig struct {
EcrPrefix string `env:"ECR_REPO_NAME_PREFIX" envDefault:"test/"`
}
func GetEcrConfig ¶
type EnvironmentOverride ¶ added in v0.6.25
type GitHostConfig ¶ added in v0.2.22
type GitHostConfig interface { GetAll() ([]GitHostRequest, error) GetById(id int) (*GitHostRequest, error) Create(request *GitHostRequest) (int, error) }
type GitHostConfigImpl ¶ added in v0.2.22
type GitHostConfigImpl struct {
// contains filtered or unexported fields
}
func NewGitHostConfigImpl ¶ added in v0.2.22
func NewGitHostConfigImpl(gitHostRepo repository.GitHostRepository, logger *zap.SugaredLogger, attributeService attributes.AttributesService) *GitHostConfigImpl
func (GitHostConfigImpl) Create ¶ added in v0.2.22
func (impl GitHostConfigImpl) Create(request *GitHostRequest) (int, error)
Create in DB
func (GitHostConfigImpl) GetAll ¶ added in v0.2.22
func (impl GitHostConfigImpl) GetAll() ([]GitHostRequest, error)
get all git hosts
func (GitHostConfigImpl) GetById ¶ added in v0.2.22
func (impl GitHostConfigImpl) GetById(id int) (*GitHostRequest, error)
get git host by Id
type GitHostRequest ¶ added in v0.2.22
type GitHostRequest struct { Id int `json:"id,omitempty" validate:"number"` Name string `json:"name,omitempty" validate:"required"` Active bool `json:"active"` WebhookUrl string `json:"webhookUrl"` WebhookSecret string `json:"webhookSecret"` EventTypeHeader string `json:"eventTypeHeader"` SecretHeader string `json:"secretHeader"` SecretValidator string `json:"secretValidator"` UserId int32 `json:"-"` }
type GitMetadata ¶ added in v0.6.21
type GitRegistry ¶ added in v0.2.32
type GitRegistry struct { Id int `json:"id,omitempty" validate:"number"` Name string `json:"name,omitempty" validate:"required"` Url string `json:"url,omitempty"` UserName string `json:"userName,omitempty"` Password string `json:"password,omitempty"` SshPrivateKey string `json:"sshPrivateKey,omitempty"` AccessToken string `json:"accessToken,omitempty"` AuthMode repository.AuthMode `json:"authMode,omitempty" validate:"required"` Active bool `json:"active"` UserId int32 `json:"-"` GitHostId int `json:"gitHostId"` }
type GitRegistryConfig ¶
type GitRegistryConfig interface { Create(request *GitRegistry) (*GitRegistry, error) GetAll() ([]GitRegistry, error) FetchAllGitProviders() ([]GitRegistry, error) FetchOneGitProvider(id string) (*GitRegistry, error) Update(request *GitRegistry) (*GitRegistry, error) Delete(request *GitRegistry) error }
type GitRegistryConfigImpl ¶
type GitRegistryConfigImpl struct { GitSensorGrpcClient gitSensor.Client // contains filtered or unexported fields }
func NewGitRegistryConfigImpl ¶
func NewGitRegistryConfigImpl(logger *zap.SugaredLogger, gitProviderRepo repository.GitProviderRepository, GitSensorClient gitSensor.Client) *GitRegistryConfigImpl
func (GitRegistryConfigImpl) Create ¶
func (impl GitRegistryConfigImpl) Create(request *GitRegistry) (*GitRegistry, error)
func (GitRegistryConfigImpl) Delete ¶ added in v0.3.15
func (impl GitRegistryConfigImpl) Delete(request *GitRegistry) error
func (GitRegistryConfigImpl) FetchAllGitProviders ¶
func (impl GitRegistryConfigImpl) FetchAllGitProviders() ([]GitRegistry, error)
func (GitRegistryConfigImpl) FetchOneGitProvider ¶
func (impl GitRegistryConfigImpl) FetchOneGitProvider(providerId string) (*GitRegistry, error)
func (GitRegistryConfigImpl) GetAll ¶
func (impl GitRegistryConfigImpl) GetAll() ([]GitRegistry, error)
get all active git providers
func (GitRegistryConfigImpl) Update ¶
func (impl GitRegistryConfigImpl) Update(request *GitRegistry) (*GitRegistry, error)
func (GitRegistryConfigImpl) UpdateGitSensor ¶
func (impl GitRegistryConfigImpl) UpdateGitSensor(provider *repository.GitProvider) error
type GitTriggerInfoResponse ¶
type GitTriggerInfoResponse struct { CiMaterials []pipelineConfig.CiPipelineMaterialResponse `json:"ciMaterials"` TriggeredByEmail string `json:"triggeredByEmail"` LastDeployedTime string `json:"lastDeployedTime,omitempty"` AppId int `json:"appId"` AppName string `json:"appName"` EnvironmentId int `json:"environmentId"` EnvironmentName string `json:"environmentName"` Default bool `json:"default,omitempty"` ImageTaggingData ImageTaggingResponseDTO `json:"imageTaggingData"` Image string `json:"image"` }
type GlobalCMCSDataUpdateDto ¶ added in v0.6.15
type GlobalCMCSService ¶ added in v0.6.1
type GlobalCMCSService interface { Create(model *bean.GlobalCMCSDto) (*bean.GlobalCMCSDto, error) UpdateDataById(config *GlobalCMCSDataUpdateDto) (*GlobalCMCSDataUpdateDto, error) GetGlobalCMCSDataByConfigTypeAndName(configName string, configType string) (*bean.GlobalCMCSDto, error) FindAllActiveByPipelineType(pipelineType string) ([]*bean.GlobalCMCSDto, error) FindAllActive() ([]*bean.GlobalCMCSDto, error) DeleteById(id int) error }
type GlobalCMCSServiceImpl ¶ added in v0.6.1
type GlobalCMCSServiceImpl struct {
// contains filtered or unexported fields
}
func NewGlobalCMCSServiceImpl ¶ added in v0.6.1
func NewGlobalCMCSServiceImpl(logger *zap.SugaredLogger, globalCMCSRepository repository.GlobalCMCSRepository) *GlobalCMCSServiceImpl
func (*GlobalCMCSServiceImpl) ConvertGlobalCmcsDbObjectToGlobalCmcsDto ¶ added in v0.6.15
func (impl *GlobalCMCSServiceImpl) ConvertGlobalCmcsDbObjectToGlobalCmcsDto(GlobalCMCSDBObject []*repository.GlobalCMCS) []*bean.GlobalCMCSDto
func (*GlobalCMCSServiceImpl) Create ¶ added in v0.6.1
func (impl *GlobalCMCSServiceImpl) Create(config *bean.GlobalCMCSDto) (*bean.GlobalCMCSDto, error)
func (*GlobalCMCSServiceImpl) DeleteById ¶ added in v0.6.15
func (impl *GlobalCMCSServiceImpl) DeleteById(id int) error
func (*GlobalCMCSServiceImpl) FindAllActive ¶ added in v0.6.1
func (impl *GlobalCMCSServiceImpl) FindAllActive() ([]*bean.GlobalCMCSDto, error)
func (*GlobalCMCSServiceImpl) FindAllActiveByPipelineType ¶ added in v0.6.15
func (impl *GlobalCMCSServiceImpl) FindAllActiveByPipelineType(pipelineType string) ([]*bean.GlobalCMCSDto, error)
func (*GlobalCMCSServiceImpl) GetGlobalCMCSDataByConfigTypeAndName ¶ added in v0.6.15
func (impl *GlobalCMCSServiceImpl) GetGlobalCMCSDataByConfigTypeAndName(configName string, configType string) (*bean.GlobalCMCSDto, error)
func (*GlobalCMCSServiceImpl) UpdateDataById ¶ added in v0.6.15
func (impl *GlobalCMCSServiceImpl) UpdateDataById(config *GlobalCMCSDataUpdateDto) (*GlobalCMCSDataUpdateDto, error)
type ImageTaggingRequestDTO ¶ added in v0.6.19
type ImageTaggingRequestDTO struct { CreateTags []*repository.ImageTag `json:"createTags"` SoftDeleteTags []*repository.ImageTag `json:"softDeleteTags"` ImageComment repository.ImageComment `json:"imageComment"` HardDeleteTags []*repository.ImageTag `json:"hardDeleteTags"` ExternalCi bool `json:"-"` }
type ImageTaggingResponseDTO ¶ added in v0.6.19
type ImageTaggingResponseDTO struct { ImageReleaseTags []*repository.ImageTag `json:"imageReleaseTags"` AppReleaseTags []string `json:"appReleaseTags"` ImageComment *repository.ImageComment `json:"imageComment"` ProdEnvExists bool `json:"tagsEditable"` HideImageTaggingHardDelete bool `json:"hideImageTaggingHardDelete"` }
type ImageTaggingService ¶ added in v0.6.19
type ImageTaggingService interface { // GetTagsData returns the following fields in reponse Object //ImageReleaseTags -> this will get the tags of the artifact, //AppReleaseTags -> all the tags of the given appId, //imageComment -> comment of the given artifactId, // ProdEnvExists -> implies the existence of prod environment in any workflow of given ciPipelineId or its child ciPipelineRequest's GetTagsData(ciPipelineId, appId, artifactId int, externalCi bool) (*ImageTaggingResponseDTO, error) CreateOrUpdateImageTagging(ciPipelineId, appId, artifactId, userId int, imageTaggingRequest *ImageTaggingRequestDTO) (*ImageTaggingResponseDTO, error) GetProdEnvFromParentAndLinkedWorkflow(ciPipelineId int) (bool, error) GetProdEnvByCdPipelineId(pipelineId int) (bool, error) // ValidateImageTaggingRequest validates the requested payload ValidateImageTaggingRequest(imageTaggingRequest *ImageTaggingRequestDTO, appId, artifactId int) (bool, error) GetTagsByArtifactId(artifactId int) ([]*repository.ImageTag, error) // GetTaggingDataMapByAppId this will fetch a map of artifact vs []tags for given appId GetTagsDataMapByAppId(appId int) (map[int][]*repository.ImageTag, error) // GetTaggingDataMapByAppId this will fetch a map of artifact vs imageComment for given artifactIds GetImageCommentsDataMapByArtifactIds(artifactIds []int) (map[int]*repository.ImageComment, error) // GetUniqueTagsByAppId gets all the unique tag names for the given appId GetUniqueTagsByAppId(appId int) ([]string, error) GetImageTaggingServiceConfig() ImageTaggingServiceConfig FindProdEnvExists(externalCi bool, pipelineIds []int) (bool, error) }
type ImageTaggingServiceConfig ¶ added in v0.6.19
type ImageTaggingServiceConfig struct {
HideImageTaggingHardDelete bool `env:"HIDE_IMAGE_TAGGING_HARD_DELETE" envDefault:"false"`
}
type ImageTaggingServiceImpl ¶ added in v0.6.19
type ImageTaggingServiceImpl struct {
// contains filtered or unexported fields
}
func NewImageTaggingServiceImpl ¶ added in v0.6.19
func NewImageTaggingServiceImpl(imageTaggingRepo repository.ImageTaggingRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, cdPipelineRepository pipelineConfig.PipelineRepository, environmentRepository repository2.EnvironmentRepository, logger *zap.SugaredLogger) *ImageTaggingServiceImpl
func (ImageTaggingServiceImpl) CreateOrUpdateImageTagging ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) CreateOrUpdateImageTagging(ciPipelineId, appId, artifactId, userId int, imageTaggingRequest *ImageTaggingRequestDTO) (*ImageTaggingResponseDTO, error)
func (ImageTaggingServiceImpl) FindProdEnvExists ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) FindProdEnvExists(externalCi bool, pipelineIds []int) (bool, error)
func (ImageTaggingServiceImpl) GetImageCommentsDataMapByArtifactIds ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetImageCommentsDataMapByArtifactIds(artifactIds []int) (map[int]*repository.ImageComment, error)
func (ImageTaggingServiceImpl) GetImageTaggingServiceConfig ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetImageTaggingServiceConfig() ImageTaggingServiceConfig
func (ImageTaggingServiceImpl) GetProdEnvByCdPipelineId ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetProdEnvByCdPipelineId(pipelineId int) (bool, error)
func (ImageTaggingServiceImpl) GetProdEnvFromParentAndLinkedWorkflow ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetProdEnvFromParentAndLinkedWorkflow(ciPipelineId int) (bool, error)
func (ImageTaggingServiceImpl) GetTagsByArtifactId ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetTagsByArtifactId(artifactId int) ([]*repository.ImageTag, error)
func (ImageTaggingServiceImpl) GetTagsData ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetTagsData(ciPipelineId, appId, artifactId int, externalCi bool) (*ImageTaggingResponseDTO, error)
GetTagsData returns the following fields in reponse Object ImageReleaseTags -> this will get the tags of the artifact, AppReleaseTags -> all the tags of the given appId, imageComment -> comment of the given artifactId, ProdEnvExists -> implies the existence of prod environment in any workflow of given ciPipelineId or its child ciPipelineRequest's
func (ImageTaggingServiceImpl) GetTagsDataMapByAppId ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetTagsDataMapByAppId(appId int) (map[int][]*repository.ImageTag, error)
GetTaggingDataMapByAppId this will fetch a map of artifact vs []tags for given appId
func (ImageTaggingServiceImpl) GetUniqueTagsByAppId ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) GetUniqueTagsByAppId(appId int) ([]string, error)
func (ImageTaggingServiceImpl) ValidateImageTaggingRequest ¶ added in v0.6.19
func (impl ImageTaggingServiceImpl) ValidateImageTaggingRequest(imageTaggingRequest *ImageTaggingRequestDTO, appId, artifactId int) (bool, error)
type PipelineBuilder ¶
type PipelineBuilderImpl ¶
type PipelineBuilderImpl struct { CiPipelineConfigService CiMaterialConfigService AppArtifactManager DevtronAppCMCSService DevtronAppStrategyService AppDeploymentTypeChangeManager CdPipelineConfigService DevtronAppConfigService // contains filtered or unexported fields }
func NewPipelineBuilderImpl ¶
func NewPipelineBuilderImpl( logger *zap.SugaredLogger, materialRepo pipelineConfig.MaterialRepository, chartRepository chartRepoRepository.ChartRepository, ciPipelineConfigService CiPipelineConfigService, ciMaterialConfigService CiMaterialConfigService, appArtifactManager AppArtifactManager, devtronAppCMCSService DevtronAppCMCSService, devtronAppStrategyService DevtronAppStrategyService, appDeploymentTypeChangeManager AppDeploymentTypeChangeManager, cdPipelineConfigService CdPipelineConfigService, devtronAppConfigService DevtronAppConfigService) *PipelineBuilderImpl
type PipelineStageService ¶ added in v0.4.2
type PipelineStageService interface { GetCiPipelineStageData(ciPipelineId int) (preCiStage *bean.PipelineStageDto, postCiStage *bean.PipelineStageDto, err error) CreatePipelineStage(stageReq *bean.PipelineStageDto, stageType repository.PipelineStageType, pipelineId int, userId int32) error UpdatePipelineStage(stageReq *bean.PipelineStageDto, stageType repository.PipelineStageType, pipelineId int, userId int32) error DeletePipelineStage(stageReq *bean.PipelineStageDto, userId int32, tx *pg.Tx) error BuildPrePostAndRefPluginStepsDataForWfRequest(pipelineId int, stageType string, scope resourceQualifiers.Scope) (*bean.PrePostAndRefPluginStepsResponse, error) GetCiPipelineStageDataDeepCopy(ciPipelineId int) (preCiStage *bean.PipelineStageDto, postCiStage *bean.PipelineStageDto, err error) GetCdPipelineStageDataDeepCopy(cdPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error) GetCdPipelineStageDataDeepCopyForPipelineIds(cdPipelineIds []int) (map[int][]*bean.PipelineStageDto, error) GetCdStageByCdPipelineIdAndStageType(cdPipelineId int, stageType repository.PipelineStageType) (*repository.PipelineStage, error) // DeletePipelineStageIfReq function is used to delete corrupted pipelineStage data // , there was a bug(https://github.com/devtron-labs/devtron/issues/3826) where we were not deleting pipeline stage entry even after deleting all the pipelineStageSteps // , this will delete those pipelineStage entry DeletePipelineStageIfReq(stageReq *bean.PipelineStageDto, userId int32) (error, bool) }
type PipelineStageServiceImpl ¶ added in v0.4.2
type PipelineStageServiceImpl struct {
// contains filtered or unexported fields
}
func NewPipelineStageService ¶ added in v0.4.2
func NewPipelineStageService(logger *zap.SugaredLogger, pipelineStageRepository repository.PipelineStageRepository, globalPluginRepository repository2.GlobalPluginRepository, pipelineRepository pipelineConfig.PipelineRepository, scopedVariableService variables.ScopedVariableService, variableEntityMappingService variables.VariableEntityMappingService, variableTemplateParser parsers.VariableTemplateParser, ) *PipelineStageServiceImpl
func (*PipelineStageServiceImpl) BuildCiStageData ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildCiStageData(ciStage *repository.PipelineStage) (*bean.PipelineStageDto, error)
func (*PipelineStageServiceImpl) BuildInlineStepData ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildInlineStepData(step *repository.PipelineStageStep) (*bean.InlineStepDetailDto, error)
func (*PipelineStageServiceImpl) BuildInlineStepDataDeepCopy ¶ added in v0.6.1
func (impl *PipelineStageServiceImpl) BuildInlineStepDataDeepCopy(step *repository.PipelineStageStep) (*bean.InlineStepDetailDto, error)
func (*PipelineStageServiceImpl) BuildPipelineStageDataDeepCopy ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) BuildPipelineStageDataDeepCopy(pipelineStage *repository.PipelineStage) (*bean.PipelineStageDto, error)
func (*PipelineStageServiceImpl) BuildPipelineStageDataForWfRequest ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) BuildPipelineStageDataForWfRequest(pipelineStage *repository.PipelineStage) ([]*bean.StepObject, []int, error)
func (*PipelineStageServiceImpl) BuildPipelineStepDataForWfRequest ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) BuildPipelineStepDataForWfRequest(step *repository.PipelineStageStep) (*bean.StepObject, error)
func (*PipelineStageServiceImpl) BuildPluginStepDataForWfRequest ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildPluginStepDataForWfRequest(step *repository2.PluginStep) (*bean.StepObject, error)
func (*PipelineStageServiceImpl) BuildPluginVariableAndConditionDataForWfRequest ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildPluginVariableAndConditionDataForWfRequest(stepId int) ([]*bean.VariableObject, []*bean.VariableObject, []*bean.ConditionObject, []*bean.ConditionObject, error)
func (*PipelineStageServiceImpl) BuildPrePostAndRefPluginStepsDataForWfRequest ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildPrePostAndRefPluginStepsDataForWfRequest(pipelineId int, stageType string, scope resourceQualifiers.Scope) (*bean.PrePostAndRefPluginStepsResponse, error)
BuildPrePostAndRefPluginStepsDataForWfRequest and related methods starts
func (*PipelineStageServiceImpl) BuildRefPluginStepData ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildRefPluginStepData(step *repository.PipelineStageStep) (*bean.RefPluginStepDetailDto, error)
func (*PipelineStageServiceImpl) BuildRefPluginStepDataDeepCopy ¶ added in v0.6.1
func (impl *PipelineStageServiceImpl) BuildRefPluginStepDataDeepCopy(step *repository.PipelineStageStep) (*bean.RefPluginStepDetailDto, error)
func (*PipelineStageServiceImpl) BuildRefPluginStepDataForWfRequest ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildRefPluginStepDataForWfRequest(refPluginIds []int) ([]*bean.RefPluginObject, error)
func (*PipelineStageServiceImpl) BuildVariableAndConditionDataByStepId ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildVariableAndConditionDataByStepId(stepId int) ([]*bean.StepVariableDto, []*bean.StepVariableDto, []*bean.ConditionDetailDto, error)
func (*PipelineStageServiceImpl) BuildVariableAndConditionDataByStepIdDeepCopy ¶ added in v0.6.1
func (impl *PipelineStageServiceImpl) BuildVariableAndConditionDataByStepIdDeepCopy(stepId int) ([]*bean.StepVariableDto, []*bean.StepVariableDto, []*bean.ConditionDetailDto, error)
func (*PipelineStageServiceImpl) BuildVariableAndConditionDataForWfRequest ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) BuildVariableAndConditionDataForWfRequest(stepId int) ([]*bean.VariableObject, []*bean.VariableObject, []*bean.ConditionObject, []*bean.ConditionObject, error)
func (*PipelineStageServiceImpl) CreateConditions ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) CreateConditions(stepId int, conditions []*bean.ConditionDetailDto, inputVariablesRepo []repository.PipelineStageStepVariable, outputVariablesRepo []repository.PipelineStageStepVariable, userId int32, tx *pg.Tx) error
func (*PipelineStageServiceImpl) CreateConditionsEntryInDb ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) CreateConditionsEntryInDb(stepId int, conditions []*bean.ConditionDetailDto, variableNameIdMap map[string]int, userId int32, tx *pg.Tx) ([]repository.PipelineStageStepCondition, error)
func (*PipelineStageServiceImpl) CreateInputAndOutputVariables ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) CreateInputAndOutputVariables(stepId int, inputVariables []*bean.StepVariableDto, outputVariables []*bean.StepVariableDto, userId int32, tx *pg.Tx) (inputVariablesRepo []repository.PipelineStageStepVariable, outputVariablesRepo []repository.PipelineStageStepVariable, err error)
func (*PipelineStageServiceImpl) CreatePipelineStage ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) CreatePipelineStage(stageReq *bean.PipelineStageDto, stageType repository.PipelineStageType, pipelineId int, userId int32) error
CreatePipelineStage and related methods starts
func (*PipelineStageServiceImpl) CreateScriptAndMappingForInlineStep ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) CreateScriptAndMappingForInlineStep(inlineStepDetail *bean.InlineStepDetailDto, userId int32, tx *pg.Tx) (scriptId int, err error)
func (*PipelineStageServiceImpl) CreateStageSteps ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) CreateStageSteps(steps []*bean.PipelineStageStepDto, stageId int, userId int32, indexNameString map[int]string, tx *pg.Tx) error
func (*PipelineStageServiceImpl) CreateVariablesEntryInDb ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) CreateVariablesEntryInDb(stepId int, variables []*bean.StepVariableDto, variableType repository.PipelineStageStepVariableType, userId int32, tx *pg.Tx) ([]repository.PipelineStageStepVariable, error)
func (*PipelineStageServiceImpl) DeletePipelineStage ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) DeletePipelineStage(stageReq *bean.PipelineStageDto, userId int32, tx *pg.Tx) error
DeletePipelineStage and related methods starts
func (*PipelineStageServiceImpl) DeletePipelineStageIfReq ¶ added in v0.6.23
func (impl *PipelineStageServiceImpl) DeletePipelineStageIfReq(stageReq *bean.PipelineStageDto, userId int32) (error, bool)
DeletePipelineStageIfReq function is used to delete corrupted pipelineStage data , there was a bug (https://github.com/devtron-labs/devtron/issues/3826) where we were not deleting pipeline stage entry even after deleting all the pipelineStageSteps , this will delete those pipelineStage entry
func (*PipelineStageServiceImpl) FilterAndActOnStepsInPipelineStageUpdateRequest ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) FilterAndActOnStepsInPipelineStageUpdateRequest(stageReq *bean.PipelineStageDto, userId int32) error
func (*PipelineStageServiceImpl) GetCdPipelineStageDataDeepCopy ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) GetCdPipelineStageDataDeepCopy(cdPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error)
func (*PipelineStageServiceImpl) GetCdPipelineStageDataDeepCopyForPipelineIds ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) GetCdPipelineStageDataDeepCopyForPipelineIds(cdPipelineIds []int) (map[int][]*bean.PipelineStageDto, error)
func (*PipelineStageServiceImpl) GetCdStageByCdPipelineIdAndStageType ¶ added in v0.6.24
func (impl *PipelineStageServiceImpl) GetCdStageByCdPipelineIdAndStageType(cdPipelineId int, stageType repository.PipelineStageType) (*repository.PipelineStage, error)
func (*PipelineStageServiceImpl) GetCiPipelineStageData ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) GetCiPipelineStageData(ciPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error)
GetCiPipelineStageData and related methods starts
func (*PipelineStageServiceImpl) GetCiPipelineStageDataDeepCopy ¶ added in v0.6.1
func (impl *PipelineStageServiceImpl) GetCiPipelineStageDataDeepCopy(ciPipelineId int) (*bean.PipelineStageDto, *bean.PipelineStageDto, error)
func (*PipelineStageServiceImpl) GetRefPluginStepsByIds ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) GetRefPluginStepsByIds(refPluginIds []int, pluginIdsEvaluated map[int]bool) (map[int][]*bean.StepObject, error)
func (*PipelineStageServiceImpl) UpdateInputAndOutputVariables ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) UpdateInputAndOutputVariables(stepId int, inputVariables []*bean.StepVariableDto, outputVariables []*bean.StepVariableDto, userId int32) (inputVarNameIdMap map[string]int, outputVarNameIdMap map[string]int, err error)
func (*PipelineStageServiceImpl) UpdatePipelineStage ¶ added in v0.6.21
func (impl *PipelineStageServiceImpl) UpdatePipelineStage(stageReq *bean.PipelineStageDto, stageType repository.PipelineStageType, pipelineId int, userId int32) error
UpdatePipelineStage and related methods starts
func (*PipelineStageServiceImpl) UpdatePipelineStageStepConditions ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) UpdatePipelineStageStepConditions(stepId int, conditions []*bean.ConditionDetailDto, variableNameIdMap map[string]int, userId int32) ([]repository.PipelineStageStepCondition, error)
func (*PipelineStageServiceImpl) UpdatePipelineStageStepVariables ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) UpdatePipelineStageStepVariables(stepId int, variables []*bean.StepVariableDto, variableType repository.PipelineStageStepVariableType, userId int32, tx *pg.Tx) (map[string]int, error)
func (*PipelineStageServiceImpl) UpdateScriptAndMappingForInlineStep ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) UpdateScriptAndMappingForInlineStep(inlineStepDetail *bean.InlineStepDetailDto, scriptId int, userId int32) (err error)
func (*PipelineStageServiceImpl) UpdateStageSteps ¶ added in v0.4.2
func (impl *PipelineStageServiceImpl) UpdateStageSteps(steps []*bean.PipelineStageStepDto, userId int32, stageId int, indexNameString map[int]string) error
type PipelineStrategiesResponse ¶
type PipelineStrategiesResponse struct {
PipelineStrategy []PipelineStrategy `json:"pipelineStrategy"`
}
type PipelineStrategy ¶
type PipelineStrategy struct { DeploymentTemplate chartRepoRepository.DeploymentStrategy `json:"deploymentTemplate,omitempty"` // Config json.RawMessage `json:"config"` Default bool `json:"default"` }
type PodRotateRequest ¶ added in v0.6.17
type PodRotateRequest struct { AppId int `json:"appId" validate:"required"` EnvironmentId int `json:"environmentId" validate:"required"` UserId int32 `json:"-"` ResourceIdentifiers []util5.ResourceIdentifier `json:"resources" validate:"required"` }
type PropertiesConfigService ¶
type PropertiesConfigService interface { CreateEnvironmentProperties(appId int, propertiesRequest *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error) UpdateEnvironmentProperties(appId int, propertiesRequest *bean.EnvironmentProperties, userId int32) (*bean.EnvironmentProperties, error) //create environment entry for each new environment CreateIfRequired(chart *chartRepoRepository.Chart, environmentId int, userId int32, manualReviewed bool, chartStatus models.ChartStatus, isOverride, isAppMetricsEnabled bool, namespace string, IsBasicViewLocked bool, CurrentViewEditor models.ChartsViewEditorType, tx *pg.Tx) (*chartConfig.EnvConfigOverride, error) GetEnvironmentProperties(appId, environmentId int, chartRefId int) (environmentPropertiesResponse *bean.EnvironmentPropertiesResponse, err error) GetEnvironmentPropertiesById(environmentId int) ([]bean.EnvironmentProperties, error) GetAppIdByChartEnvId(chartEnvId int) (*chartConfig.EnvConfigOverride, error) GetLatestEnvironmentProperties(appId, environmentId int) (*bean.EnvironmentProperties, error) FindEnvLevelAppMetricsByAppIdAndEnvId(appId int, envId int) (*repository.EnvLevelAppMetrics, error) ResetEnvironmentProperties(id int) (bool, error) CreateEnvironmentPropertiesWithNamespace(appId int, propertiesRequest *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error) EnvMetricsEnableDisable(appMetricRequest *chartService.AppMetricEnableDisableRequest) (*chartService.AppMetricEnableDisableRequest, error) FetchEnvProperties(appId, envId, chartRefId int) (*chartConfig.EnvConfigOverride, error) }
type PropertiesConfigServiceImpl ¶
type PropertiesConfigServiceImpl struct {
// contains filtered or unexported fields
}
func NewPropertiesConfigServiceImpl ¶
func NewPropertiesConfigServiceImpl(logger *zap.SugaredLogger, envConfigRepo chartConfig.EnvConfigOverrideRepository, chartRepo chartRepoRepository.ChartRepository, chartRefRepository chartRepoRepository.ChartRefRepository, mergeUtil util.MergeUtil, environmentRepository repository2.EnvironmentRepository, ciCdPipelineOrchestrator CiCdPipelineOrchestrator, application application.ServiceClient, envLevelAppMetricsRepository repository.EnvLevelAppMetricsRepository, appLevelMetricsRepository repository.AppLevelMetricsRepository, deploymentTemplateHistoryService history.DeploymentTemplateHistoryService, variableEntityMappingService variables.VariableEntityMappingService, variableTemplateParser parsers.VariableTemplateParser) *PropertiesConfigServiceImpl
func (PropertiesConfigServiceImpl) CreateEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) CreateEnvironmentProperties(appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error)
func (PropertiesConfigServiceImpl) CreateEnvironmentPropertiesWithNamespace ¶
func (impl PropertiesConfigServiceImpl) CreateEnvironmentPropertiesWithNamespace(appId int, environmentProperties *bean.EnvironmentProperties) (*bean.EnvironmentProperties, error)
func (PropertiesConfigServiceImpl) CreateIfRequired ¶
func (impl PropertiesConfigServiceImpl) CreateIfRequired(chart *chartRepoRepository.Chart, environmentId int, userId int32, manualReviewed bool, chartStatus models.ChartStatus, isOverride, isAppMetricsEnabled bool, namespace string, IsBasicViewLocked bool, CurrentViewEditor models.ChartsViewEditorType, tx *pg.Tx) (*chartConfig.EnvConfigOverride, error)
func (PropertiesConfigServiceImpl) EnvMetricsEnableDisable ¶
func (impl PropertiesConfigServiceImpl) EnvMetricsEnableDisable(appMetricRequest *chartService.AppMetricEnableDisableRequest) (*chartService.AppMetricEnableDisableRequest, error)
func (PropertiesConfigServiceImpl) FetchEnvProperties ¶ added in v0.6.21
func (impl PropertiesConfigServiceImpl) FetchEnvProperties(appId, envId, chartRefId int) (*chartConfig.EnvConfigOverride, error)
func (PropertiesConfigServiceImpl) FindEnvLevelAppMetricsByAppIdAndEnvId ¶ added in v0.6.21
func (impl PropertiesConfigServiceImpl) FindEnvLevelAppMetricsByAppIdAndEnvId(appId int, envId int) (*repository.EnvLevelAppMetrics, error)
func (PropertiesConfigServiceImpl) GetAppIdByChartEnvId ¶
func (impl PropertiesConfigServiceImpl) GetAppIdByChartEnvId(chartEnvId int) (*chartConfig.EnvConfigOverride, error)
func (PropertiesConfigServiceImpl) GetEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) GetEnvironmentProperties(appId, environmentId int, chartRefId int) (environmentPropertiesResponse *bean.EnvironmentPropertiesResponse, err error)
func (PropertiesConfigServiceImpl) GetEnvironmentPropertiesById ¶
func (impl PropertiesConfigServiceImpl) GetEnvironmentPropertiesById(envId int) ([]bean.EnvironmentProperties, error)
func (PropertiesConfigServiceImpl) GetLatestEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) GetLatestEnvironmentProperties(appId, environmentId int) (environmentProperties *bean.EnvironmentProperties, err error)
func (PropertiesConfigServiceImpl) ResetEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) ResetEnvironmentProperties(id int) (bool, error)
func (PropertiesConfigServiceImpl) UpdateEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) UpdateEnvironmentProperties(appId int, propertiesRequest *bean.EnvironmentProperties, userId int32) (*bean.EnvironmentProperties, error)
type RequestType ¶
type RequestType string
const START RequestType = "START"
const STOP RequestType = "STOP"
type SecretsList ¶
type SecretsList struct {
ConfigData []*bean.ConfigData `json:"secrets"`
}
type SecurityConfig ¶ added in v0.6.18
type SecurityConfig struct { //FORCE_SECURITY_SCANNING flag is being maintained in both dashboard and orchestrator CM's //TODO: rishabh will remove FORCE_SECURITY_SCANNING from dashboard's CM. ForceSecurityScanning bool `env:"FORCE_SECURITY_SCANNING" envDefault:"false"` }
type StopAppRequest ¶
type StopAppRequest struct { AppId int `json:"appId" validate:"required"` EnvironmentId int `json:"environmentId" validate:"required"` UserId int32 `json:"userId"` RequestType RequestType `json:"requestType" validate:"oneof=START STOP"` }
type StopDeploymentGroupRequest ¶
type StopDeploymentGroupRequest struct { DeploymentGroupId int `json:"deploymentGroupId" validate:"required"` UserId int32 `json:"userId"` RequestType RequestType `json:"requestType" validate:"oneof=START STOP"` }
type SystemWorkflowExecutor ¶ added in v0.6.24
type SystemWorkflowExecutor interface { WorkflowExecutor }
type SystemWorkflowExecutorImpl ¶ added in v0.6.24
type SystemWorkflowExecutorImpl struct {
// contains filtered or unexported fields
}
func NewSystemWorkflowExecutorImpl ¶ added in v0.6.24
func NewSystemWorkflowExecutorImpl(logger *zap.SugaredLogger, k8sUtil *k8s.K8sUtil) *SystemWorkflowExecutorImpl
func (*SystemWorkflowExecutorImpl) ExecuteWorkflow ¶ added in v0.6.24
func (impl *SystemWorkflowExecutorImpl) ExecuteWorkflow(workflowTemplate bean.WorkflowTemplate) (*unstructured.UnstructuredList, error)
func (*SystemWorkflowExecutorImpl) TerminateWorkflow ¶ added in v0.6.24
type Task ¶ added in v0.6.21
type Task struct { Id int `json:"id,omitempty"` Index int `json:"index,omitempty"` Name string `json:"name" yaml:"name"` Script string `json:"script" yaml:"script"` OutputLocation string `json:"outputLocation" yaml:"outputLocation"` // file/dir RunStatus bool `json:"-,omitempty"` // task run was attempted or not }
type TaskYaml ¶ added in v0.6.21
type TaskYaml struct { Version string `yaml:"version"` CdPipelineConfig []CdPipelineConfig `yaml:"cdPipelineConf"` }
func ToTaskYaml ¶ added in v0.6.21
type TeamAppBean ¶
type Trigger ¶
type Trigger struct { PipelineId int CommitHashes map[int]pipelineConfig.GitCommit CiMaterials []*pipelineConfig.CiPipelineMaterial TriggeredBy int32 InvalidateCache bool ExtraEnvironmentVariables map[string]string // extra env variables which will be used for CI EnvironmentId int PipelineType string CiArtifactLastFetch time.Time ReferenceCiWorkflowId int }
func (Trigger) BuildTriggerObject ¶ added in v0.6.24
func (obj Trigger) BuildTriggerObject(refCiWorkflow *pipelineConfig.CiWorkflow, ciMaterials []*pipelineConfig.CiPipelineMaterial, triggeredBy int32, invalidateCache bool, extraEnvironmentVariables map[string]string, pipelineType string)
type WebhookEventDataConfig ¶ added in v0.2.22
type WebhookEventDataConfig interface { Save(webhookEventDataRequest *WebhookEventDataRequest) error GetById(payloadId int) (*WebhookEventDataRequest, error) }
type WebhookEventDataConfigImpl ¶ added in v0.2.22
type WebhookEventDataConfigImpl struct {
// contains filtered or unexported fields
}
func NewWebhookEventDataConfigImpl ¶ added in v0.2.22
func NewWebhookEventDataConfigImpl(logger *zap.SugaredLogger, webhookEventDataRepository repository.WebhookEventDataRepository) *WebhookEventDataConfigImpl
func (WebhookEventDataConfigImpl) GetById ¶ added in v0.2.27
func (impl WebhookEventDataConfigImpl) GetById(payloadId int) (*WebhookEventDataRequest, error)
func (WebhookEventDataConfigImpl) Save ¶ added in v0.2.22
func (impl WebhookEventDataConfigImpl) Save(webhookEventDataRequest *WebhookEventDataRequest) error
type WebhookEventDataRequest ¶ added in v0.2.22
type WebhookService ¶
type WebhookService interface { AuthenticateExternalCiWebhook(apiKey string) (int, error) HandleCiSuccessEvent(ciPipelineId int, request *CiArtifactWebhookRequest, imagePushedAt *time.Time) (id int, err error) HandleExternalCiWebhook(externalCiId int, request *CiArtifactWebhookRequest, auth func(token string, projectObject string, envObject string) bool) (id int, err error) HandleCiStepFailedEvent(ciPipelineId int, request *CiArtifactWebhookRequest) (err error) HandleMultipleImagesFromEvent(imageDetails []types.ImageDetail, ciWorkflowId int) (map[string]*pipelineConfig.CiWorkflow, error) }
type WebhookServiceImpl ¶
type WebhookServiceImpl struct {
// contains filtered or unexported fields
}
func NewWebhookServiceImpl ¶
func NewWebhookServiceImpl( ciArtifactRepository repository.CiArtifactRepository, logger *zap.SugaredLogger, ciPipelineRepository pipelineConfig.CiPipelineRepository, appService app.AppService, eventClient client.EventClient, eventFactory client.EventFactory, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, customTagService CustomTagService, workflowDagExecutor WorkflowDagExecutor, ciHandler CiHandler) *WebhookServiceImpl
func (WebhookServiceImpl) AuthenticateExternalCiWebhook ¶
func (impl WebhookServiceImpl) AuthenticateExternalCiWebhook(apiKey string) (int, error)
func (*WebhookServiceImpl) BuildPayload ¶
func (impl *WebhookServiceImpl) BuildPayload(request *CiArtifactWebhookRequest, pipeline *pipelineConfig.CiPipeline) *client.Payload
func (WebhookServiceImpl) HandleCiStepFailedEvent ¶ added in v0.6.17
func (impl WebhookServiceImpl) HandleCiStepFailedEvent(ciPipelineId int, request *CiArtifactWebhookRequest) (err error)
func (WebhookServiceImpl) HandleCiSuccessEvent ¶ added in v0.6.9
func (impl WebhookServiceImpl) HandleCiSuccessEvent(ciPipelineId int, request *CiArtifactWebhookRequest, imagePushedAt *time.Time) (id int, err error)
func (WebhookServiceImpl) HandleExternalCiWebhook ¶ added in v0.6.9
func (impl WebhookServiceImpl) HandleExternalCiWebhook(externalCiId int, request *CiArtifactWebhookRequest, auth func(token string, projectObject string, envObject string) bool) (id int, err error)
func (*WebhookServiceImpl) HandleMultipleImagesFromEvent ¶ added in v0.6.24
func (impl *WebhookServiceImpl) HandleMultipleImagesFromEvent(imageDetails []types.ImageDetail, ciWorkflowId int) (map[string]*pipelineConfig.CiWorkflow, error)
HandleMultipleImagesFromEvent handles multiple images from plugin and creates ci workflow for n-1 images for mapping in ci_artifact
func (*WebhookServiceImpl) WriteCIStepFailedEvent ¶ added in v0.6.17
func (impl *WebhookServiceImpl) WriteCIStepFailedEvent(pipeline *pipelineConfig.CiPipeline, request *CiArtifactWebhookRequest, ciWorkflow *pipelineConfig.CiWorkflow)
func (*WebhookServiceImpl) WriteCISuccessEvent ¶
func (impl *WebhookServiceImpl) WriteCISuccessEvent(request *CiArtifactWebhookRequest, pipeline *pipelineConfig.CiPipeline, artifact *repository.CiArtifact)
type WorkflowDagExecutor ¶
type WorkflowDagExecutor interface { HandleCiSuccessEvent(artifact *repository.CiArtifact, applyAuth bool, async bool, triggeredBy int32) error HandleWebhookExternalCiEvent(artifact *repository.CiArtifact, triggeredBy int32, externalCiId int, auth func(email string, projectObject string, envObject string) bool) (bool, error) HandlePreStageSuccessEvent(cdStageCompleteEvent CdStageCompleteEvent) error HandleDeploymentSuccessEvent(pipelineOverride *chartConfig.PipelineOverride) error HandlePostStageSuccessEvent(cdWorkflowId int, cdPipelineId int, triggeredBy int32) error Subscribe() error TriggerPostStage(cdWf *pipelineConfig.CdWorkflow, cdPipeline *pipelineConfig.Pipeline, triggeredBy int32, refCdWorkflowRunnerId int) error TriggerPreStage(ctx context.Context, cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, triggeredBy int32, applyAuth bool, refCdWorkflowRunnerId int) error TriggerDeployment(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, applyAuth bool, triggeredBy int32) error ManualCdTrigger(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (int, error) TriggerBulkDeploymentAsync(requests []*BulkTriggerRequest, UserId int32) (interface{}, error) StopStartApp(stopRequest *StopAppRequest, ctx context.Context) (int, error) TriggerBulkHibernateAsync(request StopDeploymentGroupRequest, ctx context.Context) (interface{}, error) RotatePods(ctx context.Context, podRotateRequest *PodRotateRequest) (*k8s.RotatePodResponse, error) }
type WorkflowDagExecutorImpl ¶
type WorkflowDagExecutorImpl struct { CiTemplateRepository pipelineConfig.CiTemplateRepository // contains filtered or unexported fields }
func NewWorkflowDagExecutorImpl ¶
func NewWorkflowDagExecutorImpl(Logger *zap.SugaredLogger, pipelineRepository pipelineConfig.PipelineRepository, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, pubsubClient *pubsub.PubSubClientServiceImpl, appService app.AppService, cdWorkflowService WorkflowService, ciArtifactRepository repository.CiArtifactRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, materialRepository pipelineConfig.MaterialRepository, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, user user.UserService, groupRepository repository.DeploymentGroupRepository, envRepository repository2.EnvironmentRepository, enforcer casbin.Enforcer, enforcerUtil rbac.EnforcerUtil, tokenCache *util3.TokenCache, acdAuthConfig *util3.ACDAuthConfig, eventFactory client.EventFactory, eventClient client.EventClient, cvePolicyRepository security.CvePolicyRepository, scanResultRepository security.ImageScanResultRepository, appWorkflowRepository appWorkflow.AppWorkflowRepository, prePostCdScriptHistoryService history2.PrePostCdScriptHistoryService, argoUserService argo.ArgoUserService, cdPipelineStatusTimelineRepo pipelineConfig.PipelineStatusTimelineRepository, pipelineStatusTimelineService status.PipelineStatusTimelineService, CiTemplateRepository pipelineConfig.CiTemplateRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, appLabelRepository pipelineConfig.AppLabelRepository, gitSensorGrpcClient gitSensorClient.Client, pipelineStageService PipelineStageService, k8sCommonService k8s.K8sCommonService, variableSnapshotHistoryService variables.VariableSnapshotHistoryService, deploymentTemplateHistoryService history2.DeploymentTemplateHistoryService, configMapHistoryService history2.ConfigMapHistoryService, pipelineStrategyHistoryService history2.PipelineStrategyHistoryService, manifestPushConfigRepository repository4.ManifestPushConfigRepository, gitOpsManifestPushService app.GitOpsPushService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, imageScanHistoryRepository security.ImageScanHistoryRepository, imageScanDeployInfoRepository security.ImageScanDeployInfoRepository, appCrudOperationService app.AppCrudOperationService, pipelineConfigRepository chartConfig.PipelineConfigRepository, dockerRegistryIpsConfigService dockerRegistry.DockerRegistryIpsConfigService, chartRepository chartRepoRepository.ChartRepository, chartTemplateService util.ChartTemplateService, strategyHistoryRepository repository3.PipelineStrategyHistoryRepository, appRepository app2.AppRepository, deploymentTemplateHistoryRepository repository3.DeploymentTemplateHistoryRepository, ArgoK8sClient argocdServer.ArgoK8sClient, configMapRepository chartConfig.ConfigMapRepository, configMapHistoryRepository repository3.ConfigMapHistoryRepository, refChartDir chartRepoRepository.RefChartDir, helmAppService client2.HelmAppService, helmAppClient client2.HelmAppClient, chartRefRepository chartRepoRepository.ChartRefRepository, environmentConfigRepository chartConfig.EnvConfigOverrideRepository, appLevelMetricsRepository repository.AppLevelMetricsRepository, envLevelMetricsRepository repository.EnvLevelAppMetricsRepository, dbMigrationConfigRepository pipelineConfig.DbMigrationConfigRepository, mergeUtil *util.MergeUtil, gitOpsConfigRepository repository.GitOpsConfigRepository, gitFactory *util.GitFactory, acdClient application2.ServiceClient, variableEntityMappingService variables.VariableEntityMappingService, variableTemplateParser parsers.VariableTemplateParser, argoClientWrapperService argocdServer.ArgoClientWrapperService, scopedVariableService variables.ScopedVariableService, ) *WorkflowDagExecutorImpl
func (*WorkflowDagExecutorImpl) BuildManifestForTrigger ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) BuildManifestForTrigger(overrideRequest *bean.ValuesOverrideRequest, triggeredAt time.Time, ctx context.Context) (valuesOverrideResponse *app.ValuesOverrideResponse, builtChartPath string, err error)
func (*WorkflowDagExecutorImpl) BuildManifestPushTemplate ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) BuildManifestPushTemplate(overrideRequest *bean.ValuesOverrideRequest, valuesOverrideResponse *app.ValuesOverrideResponse, builtChartPath string, manifest *[]byte) (*bean4.ManifestPushTemplate, error)
func (*WorkflowDagExecutorImpl) CreateHistoriesForDeploymentTrigger ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) CreateHistoriesForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, envOverride *chartConfig.EnvConfigOverride, deployedOn time.Time, deployedBy int32) error
func (*WorkflowDagExecutorImpl) DeployApp ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) DeployApp(overrideRequest *bean.ValuesOverrideRequest, valuesOverrideResponse *app.ValuesOverrideResponse, triggeredAt time.Time, ctx context.Context) error
func (*WorkflowDagExecutorImpl) DeployArgocdApp ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) DeployArgocdApp(overrideRequest *bean.ValuesOverrideRequest, valuesOverrideResponse *app.ValuesOverrideResponse, ctx context.Context) error
func (*WorkflowDagExecutorImpl) GetAppMetricsByTriggerType ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) GetAppMetricsByTriggerType(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (bool, error)
func (*WorkflowDagExecutorImpl) GetArtifactVulnerabilityStatus ¶ added in v0.6.17
func (impl *WorkflowDagExecutorImpl) GetArtifactVulnerabilityStatus(artifact *repository.CiArtifact, cdPipeline *pipelineConfig.Pipeline, ctx context.Context) (bool, error)
func (*WorkflowDagExecutorImpl) GetDeploymentStrategyByTriggerType ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) GetDeploymentStrategyByTriggerType(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (*chartConfig.PipelineStrategy, error)
func (*WorkflowDagExecutorImpl) GetEnvOverrideByTriggerType ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) GetEnvOverrideByTriggerType(overrideRequest *bean.ValuesOverrideRequest, triggeredAt time.Time, ctx context.Context) (*chartConfig.EnvConfigOverride, error)
func (*WorkflowDagExecutorImpl) GetManifestPushService ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) GetManifestPushService(triggerEvent bean.TriggerEvent) app.ManifestPushService
func (*WorkflowDagExecutorImpl) GetTriggerEvent ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) GetTriggerEvent(deploymentAppType string, triggeredAt time.Time, deployedBy int32) bean.TriggerEvent
func (*WorkflowDagExecutorImpl) GetValuesOverrideForTrigger ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) GetValuesOverrideForTrigger(overrideRequest *bean.ValuesOverrideRequest, triggeredAt time.Time, ctx context.Context) (*app.ValuesOverrideResponse, error)
func (*WorkflowDagExecutorImpl) HandleCiSuccessEvent ¶
func (impl *WorkflowDagExecutorImpl) HandleCiSuccessEvent(artifact *repository.CiArtifact, applyAuth bool, async bool, triggeredBy int32) error
func (*WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent ¶
func (impl *WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent(pipelineOverride *chartConfig.PipelineOverride) error
func (*WorkflowDagExecutorImpl) HandlePostStageSuccessEvent ¶ added in v0.3.12
func (impl *WorkflowDagExecutorImpl) HandlePostStageSuccessEvent(cdWorkflowId int, cdPipelineId int, triggeredBy int32) error
func (*WorkflowDagExecutorImpl) HandlePreStageSuccessEvent ¶
func (impl *WorkflowDagExecutorImpl) HandlePreStageSuccessEvent(cdStageCompleteEvent CdStageCompleteEvent) error
func (*WorkflowDagExecutorImpl) HandleWebhookExternalCiEvent ¶ added in v0.6.9
func (impl *WorkflowDagExecutorImpl) HandleWebhookExternalCiEvent(artifact *repository.CiArtifact, triggeredBy int32, externalCiId int, auth func(email string, projectObject string, envObject string) bool) (bool, error)
func (*WorkflowDagExecutorImpl) ManualCdTrigger ¶
func (impl *WorkflowDagExecutorImpl) ManualCdTrigger(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (int, error)
func (*WorkflowDagExecutorImpl) MarkImageScanDeployed ¶ added in v0.6.25
func (*WorkflowDagExecutorImpl) RotatePods ¶ added in v0.6.17
func (impl *WorkflowDagExecutorImpl) RotatePods(ctx context.Context, podRotateRequest *PodRotateRequest) (*k8s.RotatePodResponse, error)
func (*WorkflowDagExecutorImpl) SetPipelineFieldsInOverrideRequest ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) SetPipelineFieldsInOverrideRequest(overrideRequest *bean.ValuesOverrideRequest, pipeline *pipelineConfig.Pipeline)
func (*WorkflowDagExecutorImpl) StopStartApp ¶
func (impl *WorkflowDagExecutorImpl) StopStartApp(stopRequest *StopAppRequest, ctx context.Context) (int, error)
func (*WorkflowDagExecutorImpl) Subscribe ¶
func (impl *WorkflowDagExecutorImpl) Subscribe() error
func (*WorkflowDagExecutorImpl) TriggerBulkDeploymentAsync ¶
func (impl *WorkflowDagExecutorImpl) TriggerBulkDeploymentAsync(requests []*BulkTriggerRequest, UserId int32) (interface{}, error)
func (*WorkflowDagExecutorImpl) TriggerBulkHibernateAsync ¶
func (impl *WorkflowDagExecutorImpl) TriggerBulkHibernateAsync(request StopDeploymentGroupRequest, ctx context.Context) (interface{}, error)
func (*WorkflowDagExecutorImpl) TriggerCD ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) TriggerCD(artifact *repository.CiArtifact, cdWorkflowId, wfrId int, pipeline *pipelineConfig.Pipeline, triggeredAt time.Time) error
func (*WorkflowDagExecutorImpl) TriggerDeployment ¶
func (impl *WorkflowDagExecutorImpl) TriggerDeployment(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, applyAuth bool, triggeredBy int32) error
Only used for auto trigger
func (*WorkflowDagExecutorImpl) TriggerPipeline ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) TriggerPipeline(overrideRequest *bean.ValuesOverrideRequest, triggerEvent bean.TriggerEvent, ctx context.Context) (releaseNo int, manifest []byte, err error)
write integration/unit test for each function
func (*WorkflowDagExecutorImpl) TriggerPostStage ¶
func (impl *WorkflowDagExecutorImpl) TriggerPostStage(cdWf *pipelineConfig.CdWorkflow, pipeline *pipelineConfig.Pipeline, triggeredBy int32, refCdWorkflowRunnerId int) error
func (*WorkflowDagExecutorImpl) TriggerPreStage ¶
func (impl *WorkflowDagExecutorImpl) TriggerPreStage(ctx context.Context, cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, triggeredBy int32, applyAuth bool, refCdWorkflowRunnerId int) error
func (*WorkflowDagExecutorImpl) TriggerRelease ¶ added in v0.6.25
func (*WorkflowDagExecutorImpl) ValidateTriggerEvent ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) ValidateTriggerEvent(triggerEvent bean.TriggerEvent) (bool, error)
func (*WorkflowDagExecutorImpl) WriteCDTriggerEvent ¶ added in v0.6.25
func (impl *WorkflowDagExecutorImpl) WriteCDTriggerEvent(overrideRequest *bean.ValuesOverrideRequest, artifact *repository.CiArtifact, releaseId, pipelineOverrideId int)
type WorkflowExecutor ¶ added in v0.6.17
type WorkflowExecutor interface { ExecuteWorkflow(workflowTemplate bean.WorkflowTemplate) (*unstructured.UnstructuredList, error) TerminateWorkflow(workflowName string, namespace string, clusterConfig *rest.Config) error }
type WorkflowRequest ¶
type WorkflowRequest struct { WorkflowNamePrefix string `json:"workflowNamePrefix"` PipelineName string `json:"pipelineName"` PipelineId int `json:"pipelineId"` DockerImageTag string `json:"dockerImageTag"` DockerRegistryId string `json:"dockerRegistryId"` DockerRegistryType string `json:"dockerRegistryType"` DockerRegistryURL string `json:"dockerRegistryURL"` DockerConnection string `json:"dockerConnection"` DockerCert string `json:"dockerCert"` DockerRepository string `json:"dockerRepository"` CheckoutPath string `json:"checkoutPath"` DockerUsername string `json:"dockerUsername"` DockerPassword string `json:"dockerPassword"` AwsRegion string `json:"awsRegion"` AccessKey string `json:"accessKey"` SecretKey string `json:"secretKey"` CiCacheLocation string `json:"ciCacheLocation"` CiCacheRegion string `json:"ciCacheRegion"` CiCacheFileName string `json:"ciCacheFileName"` CiProjectDetails []bean.CiProjectDetails `json:"ciProjectDetails"` ContainerResources bean.ContainerResources `json:"containerResources"` ActiveDeadlineSeconds int64 `json:"activeDeadlineSeconds"` CiImage string `json:"ciImage"` Namespace string `json:"namespace"` WorkflowId int `json:"workflowId"` TriggeredBy int32 `json:"triggeredBy"` CacheLimit int64 `json:"cacheLimit"` BeforeDockerBuildScripts []*bean3.CiScript `json:"beforeDockerBuildScripts"` AfterDockerBuildScripts []*bean3.CiScript `json:"afterDockerBuildScripts"` CiArtifactLocation string `json:"ciArtifactLocation"` CiArtifactBucket string `json:"ciArtifactBucket"` CiArtifactFileName string `json:"ciArtifactFileName"` CiArtifactRegion string `json:"ciArtifactRegion"` ScanEnabled bool `json:"scanEnabled"` CloudProvider blob_storage.BlobStorageType `json:"cloudProvider"` BlobStorageConfigured bool `json:"blobStorageConfigured"` BlobStorageS3Config *blob_storage.BlobStorageS3Config `json:"blobStorageS3Config"` AzureBlobConfig *blob_storage.AzureBlobConfig `json:"azureBlobConfig"` GcpBlobConfig *blob_storage.GcpBlobConfig `json:"gcpBlobConfig"` BlobStorageLogsKey string `json:"blobStorageLogsKey"` InAppLoggingEnabled bool `json:"inAppLoggingEnabled"` DefaultAddressPoolBaseCidr string `json:"defaultAddressPoolBaseCidr"` DefaultAddressPoolSize int `json:"defaultAddressPoolSize"` PreCiSteps []*bean.StepObject `json:"preCiSteps"` PostCiSteps []*bean.StepObject `json:"postCiSteps"` RefPlugins []*bean.RefPluginObject `json:"refPlugins"` AppName string `json:"appName"` TriggerByAuthor string `json:"triggerByAuthor"` CiBuildConfig *bean.CiBuildConfigBean `json:"ciBuildConfig"` CiBuildDockerMtuValue int `json:"ciBuildDockerMtuValue"` IgnoreDockerCachePush bool `json:"ignoreDockerCachePush"` IgnoreDockerCachePull bool `json:"ignoreDockerCachePull"` CacheInvalidate bool `json:"cacheInvalidate"` IsPvcMounted bool `json:"IsPvcMounted"` ExtraEnvironmentVariables map[string]string `json:"extraEnvironmentVariables"` EnableBuildContext bool `json:"enableBuildContext"` AppId int `json:"appId"` EnvironmentId int `json:"environmentId"` OrchestratorHost string `json:"orchestratorHost"` OrchestratorToken string `json:"orchestratorToken"` IsExtRun bool `json:"isExtRun"` ImageRetryCount int `json:"imageRetryCount"` ImageRetryInterval int `json:"imageRetryInterval"` // Data from CD Workflow service WorkflowRunnerId int `json:"workflowRunnerId"` CdPipelineId int `json:"cdPipelineId"` StageYaml string `json:"stageYaml"` ArtifactLocation string `json:"artifactLocation"` CiArtifactDTO CiArtifactDTO `json:"ciArtifactDTO"` CdImage string `json:"cdImage"` StageType string `json:"stageType"` CdCacheLocation string `json:"cdCacheLocation"` CdCacheRegion string `json:"cdCacheRegion"` WorkflowPrefixForLog string `json:"workflowPrefixForLog"` DeploymentTriggeredBy string `json:"deploymentTriggeredBy,omitempty"` DeploymentTriggerTime time.Time `json:"deploymentTriggerTime,omitempty"` DeploymentReleaseCounter int `json:"deploymentReleaseCounter,omitempty"` WorkflowExecutor pipelineConfig.WorkflowExecutorType `json:"workflowExecutor"` PrePostDeploySteps []*bean.StepObject `json:"prePostDeploySteps"` CiArtifactLastFetch time.Time `json:"ciArtifactLastFetch"` Type bean.WorkflowPipelineType Pipeline *pipelineConfig.Pipeline Env *repository2.Environment AppLabels map[string]string }
func (*WorkflowRequest) AddNodeConstraintsFromConfig ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) AddNodeConstraintsFromConfig(workflowTemplate *bean.WorkflowTemplate, config *CiCdConfig)
func (*WorkflowRequest) CheckBlobStorageConfig ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) CheckBlobStorageConfig(config *CiCdConfig) bool
func (*WorkflowRequest) CheckForJob ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) CheckForJob() bool
func (*WorkflowRequest) GetBlobStorageLogsKey ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetBlobStorageLogsKey(config *CiCdConfig) string
func (*WorkflowRequest) GetConfiguredCmCs ¶ added in v0.6.24
func (*WorkflowRequest) GetEventTypeForWorkflowRequest ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetEventTypeForWorkflowRequest() string
func (*WorkflowRequest) GetExistingCmCsNamePrefix ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetExistingCmCsNamePrefix() string
func (*WorkflowRequest) GetGlobalCmCsNamePrefix ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetGlobalCmCsNamePrefix() string
func (*WorkflowRequest) GetLimitReqCpuMem ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetLimitReqCpuMem(config *CiCdConfig) v12.ResourceRequirements
func (*WorkflowRequest) GetNodeConstraints ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetNodeConstraints(config *CiCdConfig) *bean.NodeConstraints
func (*WorkflowRequest) GetWorkflowJson ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetWorkflowJson(config *CiCdConfig) ([]byte, error)
func (*WorkflowRequest) GetWorkflowMainContainer ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetWorkflowMainContainer(config *CiCdConfig, workflowJson []byte, workflowTemplate *bean.WorkflowTemplate, workflowConfigMaps []bean2.ConfigSecretMap, workflowSecrets []bean2.ConfigSecretMap) (v12.Container, error)
func (*WorkflowRequest) GetWorkflowTemplate ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetWorkflowTemplate(workflowJson []byte, config *CiCdConfig) bean.WorkflowTemplate
func (*WorkflowRequest) GetWorkflowTypeForWorkflowRequest ¶ added in v0.6.24
func (workflowRequest *WorkflowRequest) GetWorkflowTypeForWorkflowRequest() string
type WorkflowResponse ¶
type WorkflowResponse struct { Id int `json:"id"` Name string `json:"name"` Status string `json:"status"` PodStatus string `json:"podStatus"` Message string `json:"message"` StartedOn time.Time `json:"startedOn"` FinishedOn time.Time `json:"finishedOn"` CiPipelineId int `json:"ciPipelineId"` Namespace string `json:"namespace"` LogLocation string `json:"logLocation"` BlobStorageEnabled bool `json:"blobStorageEnabled"` GitTriggers map[int]pipelineConfig.GitCommit `json:"gitTriggers"` CiMaterials []pipelineConfig.CiPipelineMaterialResponse `json:"ciMaterials"` TriggeredBy int32 `json:"triggeredBy"` Artifact string `json:"artifact"` TriggeredByEmail string `json:"triggeredByEmail"` Stage string `json:"stage"` ArtifactId int `json:"artifactId"` IsArtifactUploaded bool `json:"isArtifactUploaded"` IsVirtualEnvironment bool `json:"isVirtualEnvironment"` PodName string `json:"podName"` EnvironmentId int `json:"environmentId"` EnvironmentName string `json:"environmentName"` ImageReleaseTags []*repository2.ImageTag `json:"imageReleaseTags"` ImageComment *repository2.ImageComment `json:"imageComment"` AppWorkflowId int `json:"appWorkflowId"` CustomTag *bean2.CustomTagErrorResponse `json:"customTag,omitempty"` PipelineType string `json:"pipelineType"` ReferenceWorkflowId int `json:"referenceWorkflowId"` }
type WorkflowService ¶
type WorkflowService interface { SubmitWorkflow(workflowRequest *WorkflowRequest) (*unstructured.UnstructuredList, error) //DeleteWorkflow(wfName string, namespace string) error GetWorkflow(name string, namespace string, isExt bool, environment *repository.Environment) (*v1alpha1.Workflow, error) //ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error) //UpdateWorkflow(wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error) TerminateWorkflow(executorType pipelineConfig.WorkflowExecutorType, name string, namespace string, restConfig *rest.Config, isExt bool, environment *repository.Environment) error }
type WorkflowServiceImpl ¶
type WorkflowServiceImpl struct { Logger *zap.SugaredLogger // contains filtered or unexported fields }
func NewWorkflowServiceImpl ¶
func NewWorkflowServiceImpl(Logger *zap.SugaredLogger, envRepository repository.EnvironmentRepository, ciCdConfig *CiCdConfig, appService app.AppService, globalCMCSService GlobalCMCSService, argoWorkflowExecutor ArgoWorkflowExecutor, k8sUtil *k8s.K8sUtil, systemWorkflowExecutor SystemWorkflowExecutor, k8sCommonService k8s2.K8sCommonService) (*WorkflowServiceImpl, error)
func (*WorkflowServiceImpl) GetWorkflow ¶
func (impl *WorkflowServiceImpl) GetWorkflow(name string, namespace string, isExt bool, environment *repository.Environment) (*v1alpha1.Workflow, error)
func (*WorkflowServiceImpl) SubmitWorkflow ¶
func (impl *WorkflowServiceImpl) SubmitWorkflow(workflowRequest *WorkflowRequest) (*unstructured.UnstructuredList, error)
func (*WorkflowServiceImpl) TerminateWorkflow ¶
func (impl *WorkflowServiceImpl) TerminateWorkflow(executorType pipelineConfig.WorkflowExecutorType, name string, namespace string, restConfig *rest.Config, isExt bool, environment *repository.Environment) error
type WorkflowStatus ¶
type WorkflowStatus struct {
WorkflowName, Status, PodStatus, Message, LogLocation, PodName string
}
Source Files ¶
- AppArtifactManager.go
- AppDeploymentTypeChangeManager.go
- ArgoWorkflowExecutor.go
- BuildPipelineConfigService.go
- CdHandler.go
- CiBuildConfigService.go
- CiCdConfig.go
- CiCdPipelineOrchestrator.go
- CiHandler.go
- CiLogService.go
- CiMaterialConfigService.go
- CiService.go
- CiTemplateService.go
- ConfigMapService.go
- CustomTagService.go
- DbConfigService.go
- DbMigrationService.go
- DeploymentConfigService.go
- DeploymentPipelineConfigService.go
- DevtronAppCMCSService.go
- DevtronAppConfigService.go
- DevtronAppStrategyService.go
- DockerRegistryConfig.go
- GitHostConfig.go
- GitRegistryConfig.go
- GlobalCMCSService.go
- ImageTaggingService.go
- PipelineBuilder.go
- PipelineStageService.go
- PropertiesConfig.go
- StageServiceUtil.go
- SystemWorkflowExecutor.go
- WebhookEventDataConfig.go
- WebhookService.go
- WorkflowDagExecutor.go
- WorkflowService.go
- WorkflowUtils.go
Directories ¶
Path | Synopsis |
---|---|
Package mock_pipeline is a generated GoMock package.
|
Package mock_pipeline is a generated GoMock package. |