 Documentation
      ¶
      Documentation
      ¶
    
    
  
    
  
    Index ¶
- Constants
- Variables
- type AppBean
- type AppConfigResponse
- type AppMetricEnableDisableRequest
- type AppMetricsEnabled
- type AzureBlob
- type AzureBlobConfig
- type BlueGreen
- type BulkPatchFilter
- type BulkPatchPayload
- type BulkPatchRequest
- type BulkTriggerRequest
- type BulkUpdatePayload
- type BulkUpdateResponse
- type BulkUpdateResponseStatusForOneApp
- type BulkUpdateScript
- type BulkUpdateSeeExampleResponse
- type BulkUpdateService
- type BulkUpdateServiceImpl
- func (impl BulkUpdateServiceImpl) ApplyJsonPatch(patch jsonpatch.Patch, target string) (string, error)
- func (impl BulkUpdateServiceImpl) BulkUpdateDeploymentTemplate(bulkUpdatePayload BulkUpdatePayload) BulkUpdateResponse
- func (impl BulkUpdateServiceImpl) FindBulkUpdateReadme(operation string) (BulkUpdateSeeExampleResponse, error)
- func (impl BulkUpdateServiceImpl) GetBulkAppName(bulkUpdatePayload BulkUpdatePayload) ([]*ImpactedObjectsResponse, error)
 
- type Canary
- type CanaryStep
- type CdConfig
- type CdHandler
- type CdHandlerImpl
- func (impl *CdHandlerImpl) CancelStage(workflowRunnerId int) (int, error)
- func (impl *CdHandlerImpl) DownloadCdWorkflowArtifacts(pipelineId int, buildId int) (*os.File, error)
- func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerView(appId int) ([]*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) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, string, error)
 
- type CdStageCompleteEvent
- type CdWorkflowRequest
- type CdWorkflowService
- type CdWorkflowServiceImpl
- func (impl *CdWorkflowServiceImpl) DeleteWorkflow(wfName string, namespace string) error
- func (impl *CdWorkflowServiceImpl) GetWorkflow(name string, namespace string, url string, token string, isExtRun bool) (*v1alpha1.Workflow, error)
- func (impl *CdWorkflowServiceImpl) ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error)
- func (impl *CdWorkflowServiceImpl) SubmitWorkflow(workflowRequest *CdWorkflowRequest, pipeline *pipelineConfig.Pipeline, ...) (*v1alpha1.Workflow, error)
- func (impl *CdWorkflowServiceImpl) TerminateWorkflow(name string, namespace string, url string, token string, isExtRun bool) error
- func (impl *CdWorkflowServiceImpl) UpdateWorkflow(wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
 
- type ChartService
- type ChartServiceImpl
- func (impl ChartServiceImpl) AppMetricsEnableDisable(appMetricRequest AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
- func (impl ChartServiceImpl) ChartRefAutocomplete() ([]chartRef, error)
- func (impl ChartServiceImpl) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefResponse, error)
- func (impl ChartServiceImpl) Create(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
- func (impl ChartServiceImpl) CreateChartFromEnvOverride(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
- func (impl ChartServiceImpl) FindLatestChartForAppByAppId(appId int) (chartTemplate *TemplateRequest, err error)
- func (impl ChartServiceImpl) FindPreviousChartByAppId(appId int) (chartTemplate *TemplateRequest, err error)
- func (impl ChartServiceImpl) GetAppOverrideForDefaultTemplate(chartRefId int) (map[string]json.RawMessage, error)
- func (impl ChartServiceImpl) GetByAppIdAndChartRefId(appId int, chartRefId int) (chartTemplate *TemplateRequest, err error)
- func (impl ChartServiceImpl) IsReadyToTrigger(appId int, envId int, pipelineId int) (IsReady, error)
- func (impl ChartServiceImpl) UpdateAppOverride(templateRequest *TemplateRequest) (*TemplateRequest, error)
- func (impl ChartServiceImpl) UpgradeForApp(appId int, chartRefId int, newAppOverride map[string]json.RawMessage, ...) (bool, error)
 
- type ChartUpgradeRequest
- type CiArtifactDTO
- type CiArtifactWebhookRequest
- type CiCdTriggerEvent
- type CiConfig
- type CiHandler
- type CiHandlerImpl
- func (impl *CiHandlerImpl) BuildPayload(ciWorkflow *pipelineConfig.CiWorkflow) *client.Payload
- func (impl *CiHandlerImpl) CancelBuild(workflowId int) (int, error)
- func (impl *CiHandlerImpl) DownloadCiWorkflowArtifacts(pipelineId int, buildId int) (*os.File, error)
- func (impl *CiHandlerImpl) FetchCiStatusForTriggerView(appId int) ([]*pipelineConfig.CiWorkflowStatus, error)
- func (impl *CiHandlerImpl) FetchMaterialInfoByArtifactId(ciArtifactId int) (*GitTriggerInfoResponse, error)
- func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int) ([]CiPipelineMaterialResponse, error)
- func (impl *CiHandlerImpl) FetchWorkflowDetails(appId int, pipelineId int, buildId int) (WorkflowResponse, error)
- func (impl *CiHandlerImpl) GetBuildHistory(pipelineId 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) HandleGitCiTrigger(ciGitTriggerRequest bean.CiGitWebhookTriggerRequest) error
- func (impl *CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err 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 CiLogRequest
- type CiLogService
- type CiLogServiceImpl
- type CiPipelineMaterialResponse
- type CiProjectDetails
- 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 ConfigData
- type ConfigDataRequest
- type ConfigMapRequest
- type ConfigMapSecretsResponse
- type ConfigMapService
- type ConfigMapServiceImpl
- func (impl ConfigMapServiceImpl) CMEnvironmentAddUpdate(configMapRequest *ConfigDataRequest) (*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) (*ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CMGlobalAddUpdate(configMapRequest *ConfigDataRequest) (*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) (*ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentAddUpdate(configMapRequest *ConfigDataRequest) (*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) (*ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSEnvironmentFetchForEdit(name string, id int, appId int, envId int, userId int32) (*ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSGlobalAddUpdate(configMapRequest *ConfigDataRequest) (*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) (*ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) CSGlobalFetchForEdit(name string, id int, userId int32) (*ConfigDataRequest, error)
- func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentBulkPatch(bulkPatchRequest *BulkPatchRequest) (*BulkPatchRequest, error)
- func (impl ConfigMapServiceImpl) ConfigSecretGlobalBulkPatch(bulkPatchRequest *BulkPatchRequest) (*BulkPatchRequest, error)
 
- type ConfigsList
- type ContainerResources
- 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 DbPipelineOrchestrator
- type DbPipelineOrchestratorImpl
- func (impl DbPipelineOrchestratorImpl) CreateApp(createRequest *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
- func (impl DbPipelineOrchestratorImpl) CreateCDPipelines(pipelineRequest *bean.CDPipelineConfigObject, appId int, userId int32, ...) (pipelineId int, err error)
- func (impl DbPipelineOrchestratorImpl) CreateCiConf(createRequest *bean.CiConfigRequest, templateId int) (*bean.CiConfigRequest, error)
- func (impl DbPipelineOrchestratorImpl) CreateMaterials(createMaterialRequest *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
- func (impl DbPipelineOrchestratorImpl) DeleteApp(appId int, userId int32) error
- func (impl DbPipelineOrchestratorImpl) DeleteCdPipeline(pipelineId int, tx *pg.Tx) error
- func (impl DbPipelineOrchestratorImpl) DeleteCiPipeline(pipeline *pipelineConfig.CiPipeline, userId int32, tx *pg.Tx) error
- func (impl DbPipelineOrchestratorImpl) GetByEnvOverrideId(envOverrideId int) (*bean.CdPipelines, error)
- func (impl DbPipelineOrchestratorImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl DbPipelineOrchestratorImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl DbPipelineOrchestratorImpl) PatchMaterialValue(createRequest *bean.CiPipeline, userId int32) (*bean.CiPipeline, error)
- func (impl DbPipelineOrchestratorImpl) PipelineExists(name string) (bool, error)
- func (impl DbPipelineOrchestratorImpl) UpdateCDPipeline(pipelineRequest *bean.CDPipelineConfigObject, userId int32, tx *pg.Tx) (err error)
- func (impl DbPipelineOrchestratorImpl) UpdateMaterial(updateMaterialDTO *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
 
- type DefaultChart
- type Deployment
- type DeploymentGroupAppWithEnv
- type DeploymentType
- type DockerArtifactStoreBean
- type DockerRegistryConfig
- type DockerRegistryConfigImpl
- func (impl DockerRegistryConfigImpl) Create(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) Delete(storeId string) (string, error)
- func (impl DockerRegistryConfigImpl) FetchAllDockerAccounts() ([]DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) FetchOneDockerAccount(storeId string) (*DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) ListAllActive() ([]DockerArtifactStoreBean, error)
- func (impl DockerRegistryConfigImpl) Update(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
 
- type EcrConfig
- type EnvironmentProperties
- type EnvironmentPropertiesResponse
- type ExternalSecret
- type GitOptions
- type GitRegistryConfig
- type GitRegistryConfigImpl
- func (impl GitRegistryConfigImpl) Create(request *GitRegistryRequest) (*GitRegistryRequest, error)
- func (impl GitRegistryConfigImpl) FetchAllGitProviders() ([]GitRegistryRequest, error)
- func (impl GitRegistryConfigImpl) FetchOneGitProvider(providerId string) (*GitRegistryRequest, error)
- func (impl GitRegistryConfigImpl) GetAll() ([]GitRegistryRequest, error)
- func (impl GitRegistryConfigImpl) Update(request *GitRegistryRequest) (*GitRegistryRequest, error)
- func (impl GitRegistryConfigImpl) UpdateGitSensor(provider *repository.GitProvider) error
 
- type GitRegistryRequest
- type GitTriggerInfoResponse
- type ImpactedObjectsResponse
- type IsReady
- type NameIncludesExcludes
- type PipelineBuilder
- type PipelineBuilderImpl
- func (impl PipelineBuilderImpl) CreateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
- func (impl PipelineBuilderImpl) CreateCdPipelines(cdPipelines *bean.CdPipelines, ctx context.Context) (*bean.CdPipelines, error)
- func (impl PipelineBuilderImpl) CreateCiPipeline(createRequest *bean.CiConfigRequest) (*bean.PipelineCreateResponse, error)
- func (impl PipelineBuilderImpl) CreateMaterialsForApp(request *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
- func (impl PipelineBuilderImpl) DeleteApp(appId int, userId int32) error
- func (impl PipelineBuilderImpl) FetchArtifactForRollback(cdPipelineId int) (bean.CiArtifactResponse, error)
- func (impl PipelineBuilderImpl) FetchCDPipelineStrategy(appId int) (PipelineStrategiesResponse, error)
- func (impl PipelineBuilderImpl) FetchConfigmapSecretsForCdStages(appId, envId, cdPipelineId int) (ConfigMapSecretsResponse, error)
- func (impl PipelineBuilderImpl) FindAppsByTeamId(teamId int) ([]AppBean, error)
- func (impl PipelineBuilderImpl) FindAppsByTeamName(teamName string) ([]AppBean, error)
- func (impl PipelineBuilderImpl) FindByIds(ids []*int) ([]*AppBean, error)
- func (impl PipelineBuilderImpl) FindPipelineById(cdPipelineId int) (*pipelineConfig.Pipeline, error)
- func (impl PipelineBuilderImpl) GetApp(appId int) (application *bean.CreateAppDTO, err error)
- func (impl PipelineBuilderImpl) GetAppList() ([]AppBean, error)
- func (impl PipelineBuilderImpl) GetAppListByTeamIds(teamIds []int) ([]*TeamAppBean, error)
- func (impl PipelineBuilderImpl) GetArtifactsByCDPipeline(cdPipelineId int, stage bean2.CdWorkflowType) (bean.CiArtifactResponse, error)
- func (impl PipelineBuilderImpl) GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error)
- func (impl PipelineBuilderImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl PipelineBuilderImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
- func (impl PipelineBuilderImpl) GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error)
- func (impl PipelineBuilderImpl) GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error)
- func (impl PipelineBuilderImpl) GetCiPipelineMin(appId int) ([]*bean.CiPipelineMin, error)
- func (impl PipelineBuilderImpl) PatchCdPipelines(cdPipelines *bean.CDPatchRequest, ctx context.Context) (*bean.CdPipelines, error)
- func (impl PipelineBuilderImpl) PatchCiPipeline(request *bean.CiPatchRequest) (ciConfig *bean.CiConfigRequest, err error)
- func (impl PipelineBuilderImpl) UpdateCiTemplate(updateRequest *bean.CiConfigRequest) (*bean.CiConfigRequest, error)
- func (impl PipelineBuilderImpl) UpdateMaterialsForApp(request *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
 
- type PipelineConfigRequest
- type PipelineConfigRequestResponse
- type PipelineStrategiesResponse
- type PipelineStrategy
- type PropertiesConfigService
- type PropertiesConfigServiceImpl
- func (impl PropertiesConfigServiceImpl) CreateEnvironmentProperties(appId int, environmentProperties *EnvironmentProperties) (*EnvironmentProperties, error)
- func (impl PropertiesConfigServiceImpl) CreateEnvironmentPropertiesWithNamespace(appId int, environmentProperties *EnvironmentProperties) (*EnvironmentProperties, error)
- func (impl PropertiesConfigServiceImpl) CreateIfRequired(chart *chartConfig.Chart, environmentId int, userId int32, manualReviewed bool, ...) (*chartConfig.EnvConfigOverride, error)
- func (impl PropertiesConfigServiceImpl) EnvMetricsEnableDisable(appMetricRequest *AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
- func (impl PropertiesConfigServiceImpl) GetAppIdByChartEnvId(chartEnvId int) (*chartConfig.EnvConfigOverride, error)
- func (impl PropertiesConfigServiceImpl) GetEnvironmentProperties(appId, environmentId int, chartRefId int) (environmentPropertiesResponse *EnvironmentPropertiesResponse, err error)
- func (impl PropertiesConfigServiceImpl) GetEnvironmentPropertiesById(envId int) ([]EnvironmentProperties, error)
- func (impl PropertiesConfigServiceImpl) GetLatestEnvironmentProperties(appId, environmentId int) (environmentProperties *EnvironmentProperties, err error)
- func (impl PropertiesConfigServiceImpl) ResetEnvironmentProperties(id int) (bool, error)
- func (impl PropertiesConfigServiceImpl) UpdateEnvironmentProperties(appId int, propertiesRequest *EnvironmentProperties, userId int32) (*EnvironmentProperties, error)
 
- type Recreate
- type RefChartDir
- type RequestType
- type Rolling
- type RolloutPause
- type SecretsList
- type Spec
- type StopAppRequest
- type StopDeploymentGroupRequest
- type Strategy
- type Tasks
- type TeamAppBean
- type TemplateRequest
- type Trigger
- 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) SaveCiArtifactWebhook(ciPipelineId int, request *CiArtifactWebhookRequest) (id int, err error)
- func (impl *WebhookServiceImpl) WriteCISuccessEvent(request *CiArtifactWebhookRequest, pipeline *pipelineConfig.CiPipeline, ...)
 
- type WorkflowDagExecutor
- type WorkflowDagExecutorImpl
- func (impl *WorkflowDagExecutorImpl) HandleCiSuccessEvent(artifact *repository.CiArtifact, applyAuth bool, async bool, triggeredBy int32) error
- func (impl *WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent(gitHash string) error
- func (impl *WorkflowDagExecutorImpl) HandlePreStageSuccessEvent(cdStageCompleteEvent CdStageCompleteEvent) error
- func (impl *WorkflowDagExecutorImpl) ManualCdTrigger(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (int, error)
- 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) TriggerDeployment(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, ...) error
- func (impl *WorkflowDagExecutorImpl) TriggerPostStage(cdWf *pipelineConfig.CdWorkflow, cpipeline *pipelineConfig.Pipeline, ...) error
- func (impl *WorkflowDagExecutorImpl) TriggerPreStage(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, ...) error
 
- type WorkflowRequest
- type WorkflowResponse
- type WorkflowService
- type WorkflowServiceImpl
- func (impl *WorkflowServiceImpl) DeleteWorkflow(wfName string, namespace string) error
- func (impl *WorkflowServiceImpl) GetWorkflow(name string, namespace string) (*v1alpha1.Workflow, error)
- func (impl *WorkflowServiceImpl) ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error)
- func (impl *WorkflowServiceImpl) SubmitWorkflow(workflowRequest *WorkflowRequest) (*v1alpha1.Workflow, error)
- func (impl *WorkflowServiceImpl) TerminateWorkflow(name string, namespace string) error
- func (impl *WorkflowServiceImpl) UpdateWorkflow(wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
 
- type WorkflowStatus
Constants ¶
      View Source
      
  
    const ( KubernetesSecret string = "KubernetesSecret" AWSSecretsManager string = "AWSSecretsManager" AWSSystemManager string = "AWSSystemManager" HashiCorpVault string = "HashiCorpVault" )
      View Source
      
  
    const AFTER_DOCKER_BUILD string = "AFTER_DOCKER_BUILD"
    
      View Source
      
  
    const BEFORE_DOCKER_BUILD string = "BEFORE_DOCKER_BUILD"
    
      View Source
      
  
    const BLOB_STORAGE_AZURE = "AZURE"
    
      View Source
      
  
    const BLOB_STORAGE_GCP = "GCP"
    
      View Source
      
  
    const BLOB_STORAGE_MINIO = "MINIO"
    
      View Source
      
  
    const BLOB_STORAGE_S3 = "S3"
    
      View Source
      
  
    const BULK_DEPLOY_DURABLE = "ORCHESTRATOR.CD.BULK.DURABLE-1"
    
      View Source
      
  
    const BULK_DEPLOY_GROUP = "ORCHESTRATOR.CD.BULK.GROUP-1"
    
      View Source
      
  
    const BULK_DEPLOY_TOPIC = "ORCHESTRATOR.CD.BULK"
    
      View Source
      
  
    const BULK_HIBERNATE_DURABLE = "ORCHESTRATOR.CD.BULK-HIBERNATE.DURABLE-1"
    
      View Source
      
  
    const BULK_HIBERNATE_GROUP = "ORCHESTRATOR.CD.BULK-HIBERNATE.GROUP-1"
    
      View Source
      
  
    const BULK_HIBERNATE_TOPIC = "ORCHESTRATOR.CD.BULK-HIBERNATE"
    
      View Source
      
  
    const CD_COMPLETE_DURABLE = "CI-RUNNER.CD-COMPLETE_DURABLE-1"
    
      View Source
      
  
    const CD_COMPLETE_GROUP = "CI-RUNNER.CD-COMPLETE_GROUP-1"
    
      View Source
      
  
    const CD_STAGE_COMPLETE_TOPIC = "CI-RUNNER.CD-STAGE-COMPLETE"
    
      View Source
      
  
    const CD_WORKFLOW_NAME = "cd"
    
      View Source
      
  
    const DevMode = "DEV"
    
      View Source
      
  
    const ExternalCiWebhookPath = "orchestrator/webhook/ext-ci"
    
      View Source
      
  
    const POST = "POST"
    
      View Source
      
  
    const PRE = "PRE"
    
      View Source
      
  
    const ProdMode = "PROD"
    
      View Source
      
  
    const WorkflowAborted = "Aborted"
    
      View Source
      
  
    const WorkflowCancel = "CANCELLED"
    
      View Source
      
  
    const WorkflowFailed = "Failed"
    
      View Source
      
  
const WorkflowStarting = "Starting"
    Variables ¶
      View Source
      
  
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}`)
    Functions ¶
This section is empty.
Types ¶
type AppConfigResponse ¶
type AppConfigResponse struct {
	//DefaultAppConfig  json.RawMessage `json:"defaultAppConfig"`
	//AppConfig         TemplateRequest            `json:"appConfig"`
	LatestAppConfig   TemplateRequest `json:"latestAppConfig"`
	PreviousAppConfig TemplateRequest `json:"previousAppConfig"`
}
    type AppMetricsEnabled ¶
type AppMetricsEnabled struct {
	AppMetrics bool `json:"app-metrics"`
}
    type AzureBlob ¶
type AzureBlob struct {
	// contains filtered or unexported fields
}
    func (*AzureBlob) DownloadBlob ¶
func (*AzureBlob) UploadBlob ¶
type AzureBlobConfig ¶
type BulkPatchFilter ¶
type BulkPatchPayload ¶
type BulkPatchRequest ¶
type BulkPatchRequest struct {
	Payload     []*BulkPatchPayload `json:"payload"`
	Filter      *BulkPatchFilter    `json:"filter,omitempty"`
	ProjectId   int                 `json:"projectId"`
	Global      bool                `json:"global"`
	Type        string              `json:"type"`
	Name        string              `json:"name"`
	Key         string              `json:"key"`
	Value       string              `json:"value"`
	PatchAction int                 `json:"patchAction"` // 1=add, 2=update, 0=delete
	UserId      int32               `json:"-"`
}
    type BulkTriggerRequest ¶
type BulkUpdatePayload ¶ added in v0.2.17
type BulkUpdatePayload struct {
	Includes           NameIncludesExcludes `json:"includes"`
	Excludes           NameIncludesExcludes `json:"excludes"`
	EnvIds             []int                `json:"envIds"`
	Global             bool                 `json:"global"`
	DeploymentTemplate Tasks                `json:"deploymentTemplate"`
}
    type BulkUpdateResponse ¶ added in v0.2.17
type BulkUpdateResponse struct {
	Message    []string                             `json:"message"`
	Failure    []*BulkUpdateResponseStatusForOneApp `json:"failure"`
	Successful []*BulkUpdateResponseStatusForOneApp `json:"successful"`
}
    type BulkUpdateResponseStatusForOneApp ¶ added in v0.2.17
type BulkUpdateScript ¶ added in v0.2.17
type BulkUpdateScript struct {
	ApiVersion string            `json:"apiVersion" validate:"required"`
	Kind       string            `json:"kind" validate:"required"`
	Spec       BulkUpdatePayload `json:"spec" validate:"required"`
}
    type BulkUpdateSeeExampleResponse ¶ added in v0.2.17
type BulkUpdateSeeExampleResponse struct {
	Operation string           `json:"operation"`
	Script    BulkUpdateScript `json:"script" validate:"required"`
	ReadMe    string           `json:"readme"`
}
    type BulkUpdateService ¶ added in v0.2.17
type BulkUpdateService interface {
	FindBulkUpdateReadme(operation string) (response BulkUpdateSeeExampleResponse, err error)
	GetBulkAppName(bulkUpdateRequest BulkUpdatePayload) ([]*ImpactedObjectsResponse, error)
	ApplyJsonPatch(patch jsonpatch.Patch, target string) (string, error)
	BulkUpdateDeploymentTemplate(bulkUpdateRequest BulkUpdatePayload) (bulkUpdateResponse BulkUpdateResponse)
}
    type BulkUpdateServiceImpl ¶ added in v0.2.17
type BulkUpdateServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewBulkUpdateServiceImpl ¶ added in v0.2.17
func NewBulkUpdateServiceImpl(bulkUpdateRepository bulkUpdate.BulkUpdateRepository, chartRepository chartConfig.ChartRepository, logger *zap.SugaredLogger, chartTemplateService util.ChartTemplateService, repoRepository chartConfig.ChartRepoRepository, pipelineGroupRepository pipelineConfig.AppRepository, refChartDir RefChartDir, defaultChart DefaultChart, mergeUtil util.MergeUtil, repositoryService repository.ServiceClient, chartRefRepository chartConfig.ChartRefRepository, envOverrideRepository chartConfig.EnvConfigOverrideRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, environmentRepository cluster.EnvironmentRepository, pipelineRepository pipelineConfig.PipelineRepository, appLevelMetricsRepository repository3.AppLevelMetricsRepository, client *http.Client, ) *BulkUpdateServiceImpl
func (BulkUpdateServiceImpl) ApplyJsonPatch ¶ added in v0.2.17
func (BulkUpdateServiceImpl) BulkUpdateDeploymentTemplate ¶ added in v0.2.17
func (impl BulkUpdateServiceImpl) BulkUpdateDeploymentTemplate(bulkUpdatePayload BulkUpdatePayload) BulkUpdateResponse
func (BulkUpdateServiceImpl) FindBulkUpdateReadme ¶ added in v0.2.17
func (impl BulkUpdateServiceImpl) FindBulkUpdateReadme(operation string) (BulkUpdateSeeExampleResponse, error)
func (BulkUpdateServiceImpl) GetBulkAppName ¶ added in v0.2.17
func (impl BulkUpdateServiceImpl) GetBulkAppName(bulkUpdatePayload BulkUpdatePayload) ([]*ImpactedObjectsResponse, error)
type Canary ¶
type Canary struct {
	MaxSurge       string       `json:"maxSurge,omitempty"`
	Steps          []CanaryStep `json:"steps,omitempty"`
}
    type CanaryStep ¶
type CanaryStep struct {
	// SetWeight sets what percentage of the newRS should receive
	SetWeight *int32 `json:"setWeight,omitempty"`
	// Pause freezes the rollout by setting spec.Paused to true.
	// A Rollout will resume when spec.Paused is reset to false.
	// +optional
	Pause *RolloutPause `json:"pause,omitempty"`
}
    type CdConfig ¶
type CdConfig struct {
	Mode                      string   `env:"MODE" envDefault:"DEV"`
	LimitCpu                  string   `env:"CD_LIMIT_CI_CPU" envDefault:"0.5"`
	LimitMem                  string   `env:"CD_LIMIT_CI_MEM" envDefault:"3G"`
	ReqCpu                    string   `env:"CD_REQ_CI_CPU" envDefault:"0.5"`
	ReqMem                    string   `env:"CD_REQ_CI_MEM" envDefault:"3G"`
	TaintKey                  string   `env:"CD_NODE_TAINTS_KEY" envDefault:"dedicated"`
	WorkflowServiceAccount    string   `env:"CD_WORKFLOW_SERVICE_ACCOUNT" envDefault:"cd-runner"`
	DefaultBuildLogsKeyPrefix string   `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" `
	DefaultArtifactKeyPrefix  string   `env:"DEFAULT_CD_ARTIFACT_KEY_LOCATION" `
	TaintValue                string   `env:"CD_NODE_TAINTS_VALUE" envDefault:"ci"`
	DefaultBuildLogsBucket    string   `env:"DEFAULT_BUILD_LOGS_BUCKET" `
	NodeLabelSelector         []string `env:"CD_NODE_LABEL_SELECTOR"`
	CdArtifactLocationFormat  string   `env:"CD_ARTIFACT_LOCATION_FORMAT" `
	DefaultNamespace          string   `env:"DEFAULT_CD_NAMESPACE"`
	DefaultImage              string   `env:"DEFAULT_CI_IMAGE" `
	DefaultTimeout            int64    `env:"DEFAULT_CD_TIMEOUT" envDefault:"3600"`
	DefaultCdLogsBucketRegion string   `env:"DEFAULT_CD_LOGS_BUCKET_REGION" `
	WfControllerInstanceID    string   `env:"WF_CONTROLLER_INSTANCE_ID" envDefault:"devtron-runner"`
	OrchestratorHost          string   `env:"ORCH_HOST" envDefault:"http://devtroncd-orchestrator-service-prod.devtroncd/webhook/msg/nats"`
	OrchestratorToken         string   `env:"ORCH_TOKEN" envDefault:""`
	ClusterConfig             *rest.Config
	NodeLabel                 map[string]string
	CloudProvider             string `env:"BLOB_STORAGE_PROVIDER" envDefault:"S3"`
	AzureAccountName          string `env:"AZURE_ACCOUNT_NAME"`
	AzureBlobContainerCiLog   string `env:"AZURE_BLOB_CONTAINER_CI_LOG"`
	AzureBlobContainerCiCache string `env:"AZURE_BLOB_CONTAINER_CI_CACHE"`
	MinioEndpoint             string `env:"MINIO_ENDPOINT"`
	MinioAccessKey            string `env:"MINIO_ACCESS_KEY"`
	MinioSecretKey            string `env:"MINIO_SECRET_KEY"`
	AzureAccountKey           string `env:"AZURE_ACCOUNT_KEY"`
}
    func GetCdConfig ¶
type CdHandler ¶
type CdHandler interface {
	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) (int, error)
	FetchAppWorkflowStatusForTriggerView(pipelineId int) ([]*pipelineConfig.CdWorkflowStatus, error)
}
    type CdHandlerImpl ¶
type CdHandlerImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}
    func NewCdHandlerImpl ¶
func NewCdHandlerImpl(Logger *zap.SugaredLogger, cdConfig *CdConfig, userService user.UserService, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, cdWorkflowService CdWorkflowService, ciLogService CiLogService, ciArtifactRepository repository.CiArtifactRepository, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, pipelineRepository pipelineConfig.PipelineRepository, envRepository cluster.EnvironmentRepository, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, ciConfig *CiConfig) *CdHandlerImpl
func (*CdHandlerImpl) CancelStage ¶
func (impl *CdHandlerImpl) CancelStage(workflowRunnerId int) (int, error)
func (*CdHandlerImpl) DownloadCdWorkflowArtifacts ¶
func (*CdHandlerImpl) FetchAppWorkflowStatusForTriggerView ¶
func (impl *CdHandlerImpl) FetchAppWorkflowStatusForTriggerView(appId int) ([]*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) UpdateWorkflow ¶
func (impl *CdHandlerImpl) UpdateWorkflow(workflowStatus v1alpha1.WorkflowStatus) (int, string, error)
type CdStageCompleteEvent ¶
type CdStageCompleteEvent struct {
	CiProjectDetails []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 CdWorkflowRequest ¶
type CdWorkflowRequest struct {
	AppId                     int                `json:"appId"`
	EnvironmentId             int                `json:"envId"`
	WorkflowId                int                `json:"workflowId"`
	WorkflowRunnerId          int                `json:"workflowRunnerId"`
	CdPipelineId              int                `json:"cdPipelineId"`
	TriggeredBy               int32              `json:"triggeredBy"`
	StageYaml                 string             `json:"stageYaml"`
	ArtifactLocation          string             `json:"artifactLocation"`
	CiProjectDetails          []CiProjectDetails `json:"ciProjectDetails"`
	CiArtifactDTO             CiArtifactDTO      `json:"ciArtifactDTO"`
	Namespace                 string             `json:"namespace"`
	WorkflowNamePrefix        string             `json:"workflowNamePrefix"`
	CdImage                   string             `json:"cdImage"`
	ActiveDeadlineSeconds     int64              `json:"activeDeadlineSeconds"`
	StageType                 string             `json:"stageType"`
	DockerUsername            string             `json:"dockerUsername"`
	DockerPassword            string             `json:"dockerPassword"`
	AwsRegion                 string             `json:"awsRegion"`
	SecretKey                 string             `json:"secretKey"`
	AccessKey                 string             `json:"accessKey"`
	CdCacheLocation           string             `json:"cdCacheLocation"`
	CdCacheRegion             string             `json:"cdCacheRegion"`
	DockerRegistryType        string             `json:"dockerRegistryType"`
	DockerRegistryURL         string             `json:"dockerRegistryURL"`
	OrchestratorHost          string             `json:"orchestratorHost"`
	OrchestratorToken         string             `json:"orchestratorToken"`
	IsExtRun                  bool               `json:"isExtRun"`
	ExtraEnvironmentVariables map[string]string  `json:"extraEnvironmentVariables"`
	CloudProvider             string             `json:"cloudProvider"`
	AzureBlobConfig           *AzureBlobConfig   `json:"azureBlobConfig"`
	MinioEndpoint             string             `json:"minioEndpoint"`
}
    type CdWorkflowService ¶
type CdWorkflowService interface {
	SubmitWorkflow(workflowRequest *CdWorkflowRequest, pipeline *pipelineConfig.Pipeline, env *cluster.Environment) (*v1alpha1.Workflow, error)
	DeleteWorkflow(wfName string, namespace string) error
	GetWorkflow(name string, namespace string, url string, token string, isExtRun bool) (*v1alpha1.Workflow, error)
	ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error)
	UpdateWorkflow(wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
	TerminateWorkflow(name string, namespace string, url string, token string, isExtRun bool) error
}
    type CdWorkflowServiceImpl ¶
type CdWorkflowServiceImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}
    func NewCdWorkflowServiceImpl ¶
func NewCdWorkflowServiceImpl(Logger *zap.SugaredLogger, envRepository cluster.EnvironmentRepository, cdConfig *CdConfig, appService app.AppService) *CdWorkflowServiceImpl
func (*CdWorkflowServiceImpl) DeleteWorkflow ¶
func (impl *CdWorkflowServiceImpl) DeleteWorkflow(wfName string, namespace string) error
func (*CdWorkflowServiceImpl) GetWorkflow ¶
func (*CdWorkflowServiceImpl) ListAllWorkflows ¶
func (impl *CdWorkflowServiceImpl) ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error)
func (*CdWorkflowServiceImpl) SubmitWorkflow ¶
func (impl *CdWorkflowServiceImpl) SubmitWorkflow(workflowRequest *CdWorkflowRequest, pipeline *pipelineConfig.Pipeline, env *cluster.Environment) (*v1alpha1.Workflow, error)
func (*CdWorkflowServiceImpl) TerminateWorkflow ¶
func (*CdWorkflowServiceImpl) UpdateWorkflow ¶
type ChartService ¶
type ChartService interface {
	Create(templateRequest TemplateRequest, ctx context.Context) (chart *TemplateRequest, err error)
	CreateChartFromEnvOverride(templateRequest TemplateRequest, ctx context.Context) (chart *TemplateRequest, err error)
	FindLatestChartForAppByAppId(appId int) (chartTemplate *TemplateRequest, err error)
	GetByAppIdAndChartRefId(appId int, chartRefId int) (chartTemplate *TemplateRequest, err error)
	GetAppOverrideForDefaultTemplate(chartRefId int) (map[string]json.RawMessage, error)
	UpdateAppOverride(templateRequest *TemplateRequest) (*TemplateRequest, error)
	IsReadyToTrigger(appId int, envId int, pipelineId int) (IsReady, error)
	ChartRefAutocomplete() ([]chartRef, error)
	ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefResponse, error)
	FindPreviousChartByAppId(appId int) (chartTemplate *TemplateRequest, err error)
	UpgradeForApp(appId int, chartRefId int, newAppOverride map[string]json.RawMessage, userId int32, ctx context.Context) (bool, error)
	AppMetricsEnableDisable(appMetricRequest AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
}
    type ChartServiceImpl ¶
type ChartServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewChartServiceImpl ¶
func NewChartServiceImpl(chartRepository chartConfig.ChartRepository, logger *zap.SugaredLogger, chartTemplateService util.ChartTemplateService, repoRepository chartConfig.ChartRepoRepository, pipelineGroupRepository pipelineConfig.AppRepository, refChartDir RefChartDir, defaultChart DefaultChart, mergeUtil util.MergeUtil, repositoryService repository.ServiceClient, chartRefRepository chartConfig.ChartRefRepository, envOverrideRepository chartConfig.EnvConfigOverrideRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, environmentRepository cluster.EnvironmentRepository, pipelineRepository pipelineConfig.PipelineRepository, appLevelMetricsRepository repository3.AppLevelMetricsRepository, client *http.Client, ) *ChartServiceImpl
func (ChartServiceImpl) AppMetricsEnableDisable ¶
func (impl ChartServiceImpl) AppMetricsEnableDisable(appMetricRequest AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
func (ChartServiceImpl) ChartRefAutocomplete ¶
func (impl ChartServiceImpl) ChartRefAutocomplete() ([]chartRef, error)
func (ChartServiceImpl) ChartRefAutocompleteForAppOrEnv ¶
func (impl ChartServiceImpl) ChartRefAutocompleteForAppOrEnv(appId int, envId int) (*chartRefResponse, error)
func (ChartServiceImpl) Create ¶
func (impl ChartServiceImpl) Create(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
func (ChartServiceImpl) CreateChartFromEnvOverride ¶
func (impl ChartServiceImpl) CreateChartFromEnvOverride(templateRequest TemplateRequest, ctx context.Context) (*TemplateRequest, error)
func (ChartServiceImpl) FindLatestChartForAppByAppId ¶
func (impl ChartServiceImpl) FindLatestChartForAppByAppId(appId int) (chartTemplate *TemplateRequest, err error)
func (ChartServiceImpl) FindPreviousChartByAppId ¶
func (impl ChartServiceImpl) FindPreviousChartByAppId(appId int) (chartTemplate *TemplateRequest, err error)
func (ChartServiceImpl) GetAppOverrideForDefaultTemplate ¶
func (impl ChartServiceImpl) GetAppOverrideForDefaultTemplate(chartRefId int) (map[string]json.RawMessage, error)
func (ChartServiceImpl) GetByAppIdAndChartRefId ¶
func (impl ChartServiceImpl) GetByAppIdAndChartRefId(appId int, chartRefId int) (chartTemplate *TemplateRequest, err error)
func (ChartServiceImpl) IsReadyToTrigger ¶
func (ChartServiceImpl) UpdateAppOverride ¶
func (impl ChartServiceImpl) UpdateAppOverride(templateRequest *TemplateRequest) (*TemplateRequest, error)
func (ChartServiceImpl) UpgradeForApp ¶
type ChartUpgradeRequest ¶
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"`
}
    type CiCdTriggerEvent ¶
type CiCdTriggerEvent struct {
	Type      string             `json:"type"`
	CiRequest *WorkflowRequest   `json:"ciRequest"`
	CdRequest *CdWorkflowRequest `json:"cdRequest"`
}
    type CiConfig ¶
type CiConfig struct {
	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" envDefault:"my-artifacts"`
	DefaultImage              string   `env:"DEFAULT_CI_IMAGE" envDefault:"686244538589.dkr.ecr.us-east-2.amazonaws.com/cirunner:47"`
	DefaultNamespace          string   `env:"DEFAULT_NAMESPACE" envDefault:"devtron-ci"`
	DefaultTimeout            int64    `env:"DEFAULT_TIMEOUT" envDefault:"3600"`
	Mode                      string   `env:"MODE" envDefault:"DEV"`
	DefaultBuildLogsBucket    string   `env:"DEFAULT_BUILD_LOGS_BUCKET" envDefault:"devtron-pro-ci-logs"`
	LimitCpu                  string   `env:"LIMIT_CI_CPU" envDefault:"0.5"`
	LimitMem                  string   `env:"LIMIT_CI_MEM" envDefault:"3G"`
	ReqCpu                    string   `env:"REQ_CI_CPU" envDefault:"0.5"`
	ReqMem                    string   `env:"REQ_CI_MEM" envDefault:"3G"`
	TaintKey                  string   `env:"CI_NODE_TAINTS_KEY" envDefault:""`
	TaintValue                string   `env:"CI_NODE_TAINTS_VALUE" envDefault:""`
	NodeLabelSelector         []string `env:"CI_NODE_LABEL_SELECTOR"`
	CacheLimit                int64    `env:"CACHE_LIMIT" envDefault:"5000000000"` // TODO: Add to default db config also
	DefaultBuildLogsKeyPrefix string   `env:"DEFAULT_BUILD_LOGS_KEY_PREFIX" envDefault:"arsenal-v1"`
	DefaultArtifactKeyPrefix  string   `env:"DEFAULT_ARTIFACT_KEY_LOCATION" envDefault:"arsenal-v1/ci-artifacts"`
	WorkflowServiceAccount    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   `` /* 504-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"`
	CloudProvider             string   `env:"BLOB_STORAGE_PROVIDER" envDefault:"S3"`
	AzureAccountName          string   `env:"AZURE_ACCOUNT_NAME"`
	AzureBlobContainerCiLog   string   `env:"AZURE_BLOB_CONTAINER_CI_LOG"`
	AzureBlobContainerCiCache string   `env:"AZURE_BLOB_CONTAINER_CI_CACHE"`
	MinioEndpoint             string   `env:"MINIO_ENDPOINT"`
	MinioAccessKey            string   `env:"MINIO_ACCESS_KEY"`
	MinioSecretKey            string   `env:"MINIO_SECRET_KEY"`
	AzureAccountKey string `env:"AZURE_ACCOUNT_KEY"`
	ClusterConfig   *rest.Config
	NodeLabel       map[string]string
}
    func GetCiConfig ¶
type CiHandler ¶
type CiHandler interface {
	HandleCIWebhook(gitCiTriggerRequest bean.GitCiTriggerRequest) (int, error)
	HandleCIManual(ciTriggerRequest bean.CiTriggerRequest) (int, error)
	HandleGitCiTrigger(ciGitTriggerRequest bean.CiGitWebhookTriggerRequest) error
	FetchMaterialsByPipelineId(pipelineId int) ([]CiPipelineMaterialResponse, error)
	FetchWorkflowDetails(appId int, pipelineId int, buildId int) (WorkflowResponse, 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, 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)
	RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err error)
	FetchMaterialInfoByArtifactId(ciArtifactId int) (*GitTriggerInfoResponse, error)
	WriteToCreateTestSuites(pipelineId int, buildId int, triggeredBy int)
}
    type CiHandlerImpl ¶
type CiHandlerImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}
    func NewCiHandlerImpl ¶
func NewCiHandlerImpl(Logger *zap.SugaredLogger, ciService CiService, ciPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, gitSensorClient gitSensor.GitSensorClient, ciWorkflowRepository pipelineConfig.CiWorkflowRepository, workflowService WorkflowService, ciLogService CiLogService, ciConfig *CiConfig, ciArtifactRepository repository.CiArtifactRepository, userService user.UserService, eventClient client.EventClient, eventFactory client.EventFactory, ciPipelineRepository pipelineConfig.CiPipelineRepository, appListingRepository repository.AppListingRepository) *CiHandlerImpl
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) DownloadCiWorkflowArtifacts ¶
func (*CiHandlerImpl) FetchCiStatusForTriggerView ¶
func (impl *CiHandlerImpl) FetchCiStatusForTriggerView(appId int) ([]*pipelineConfig.CiWorkflowStatus, error)
func (*CiHandlerImpl) FetchMaterialInfoByArtifactId ¶
func (impl *CiHandlerImpl) FetchMaterialInfoByArtifactId(ciArtifactId int) (*GitTriggerInfoResponse, error)
func (*CiHandlerImpl) FetchMaterialsByPipelineId ¶
func (impl *CiHandlerImpl) FetchMaterialsByPipelineId(pipelineId int) ([]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, 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) HandleGitCiTrigger ¶
func (impl *CiHandlerImpl) HandleGitCiTrigger(ciGitTriggerRequest bean.CiGitWebhookTriggerRequest) error
func (*CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId ¶
func (impl *CiHandlerImpl) RefreshMaterialByCiPipelineMaterialId(gitMaterialId int) (refreshRes *gitSensor.RefreshGitMaterialResponse, err 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 CiLogRequest ¶
type CiLogService ¶
type CiLogService interface {
	FetchRunningWorkflowLogs(ciLogRequest CiLogRequest, token string, host string, isExt bool) (io.ReadCloser, func() error, error)
	FetchLogs(ciLogRequest CiLogRequest) (*os.File, func() error, error)
}
    type CiLogServiceImpl ¶
type CiLogServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewCiLogServiceImpl ¶
func NewCiLogServiceImpl(logger *zap.SugaredLogger, ciService CiService, ciConfig *CiConfig) *CiLogServiceImpl
func (*CiLogServiceImpl) FetchLogs ¶
func (impl *CiLogServiceImpl) FetchLogs(ciLogRequest CiLogRequest) (*os.File, func() error, error)
func (*CiLogServiceImpl) FetchRunningWorkflowLogs ¶
func (impl *CiLogServiceImpl) FetchRunningWorkflowLogs(ciLogRequest CiLogRequest, token string, host string, isExt bool) (io.ReadCloser, func() error, error)
type CiPipelineMaterialResponse ¶
type CiPipelineMaterialResponse struct {
	Id              int                    `json:"id"`
	GitMaterialId   int                    `json:"gitMaterialId"`
	GitMaterialUrl  string                 `json:"gitMaterialUrl"`
	GitMaterialName string                 `json:"gitMaterialName"`
	Type            string                 `json:"type"`
	Value           string                 `json:"value"`
	Active          bool                   `json:"active"`
	History         []*gitSensor.GitCommit `json:"history,omitempty"`
	LastFetchTime   time.Time              `json:"lastFetchTime"`
	IsRepoError     bool                   `json:"isRepoError"`
	RepoErrorMsg    string                 `json:"repoErrorMsg"`
	IsBranchError   bool                   `json:"isBranchError"`
	BranchErrorMsg  string                 `json:"branchErrorMsg"`
	Url             string                 `json:"url"`
}
    type CiProjectDetails ¶
type CiProjectDetails struct {
	GitRepository string    `json:"gitRepository"`
	MaterialName  string    `json:"materialName"`
	CheckoutPath  string    `json:"checkoutPath"`
	CommitHash    string    `json:"commitHash"`
	GitTag        string    `json:"gitTag"`
	CommitTime    time.Time `json:"commitTime"`
	//Branch        string          `json:"branch"`
	Type        string                    `json:"type"`
	Message     string                    `json:"message"`
	Author      string                    `json:"author"`
	GitOptions  GitOptions                `json:"gitOptions"`
	SourceType  pipelineConfig.SourceType `json:"sourceType"`
	SourceValue string                    `json:"sourceValue"`
}
    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, ciConfig *CiConfig, eventClient client.EventClient, eventFactory client.EventFactory, mergeUtil *util.MergeUtil, ciPipelineRepository pipelineConfig.CiPipelineRepository) *CiServiceImpl
func (*CiServiceImpl) BuildPayload ¶
func (impl *CiServiceImpl) BuildPayload(trigger Trigger, pipeline *pipelineConfig.CiPipeline, workflowRequest *WorkflowRequest) *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 ConfigData ¶
type ConfigData struct {
	Name                  string           `json:"name"`
	Type                  string           `json:"type"`
	External              bool             `json:"external"`
	MountPath             string           `json:"mountPath,omitempty"`
	Data                  json.RawMessage  `json:"data"`
	DefaultData           json.RawMessage  `json:"defaultData,omitempty"`
	DefaultMountPath      string           `json:"defaultMountPath,omitempty"`
	Global                bool             `json:"global"`
	ExternalSecretType    string           `json:"externalType"`
	ExternalSecret        []ExternalSecret `json:"secretData"`
	DefaultExternalSecret []ExternalSecret `json:"defaultSecretData,omitempty"`
	RoleARN               string           `json:"roleARN"`
	SubPath               bool             `json:"subPath"`
	FilePermission        string           `json:"filePermission"`
}
    type ConfigDataRequest ¶
type ConfigDataRequest struct {
	Id            int           `json:"id"`
	AppId         int           `json:"appId"`
	EnvironmentId int           `json:"environmentId,omitempty"`
	ConfigData    []*ConfigData `json:"configData"`
	UserId        int32         `json:"-"`
}
    type ConfigMapRequest ¶
type ConfigMapRequest struct {
	Id            int             `json:"id"`
	AppId         int             `json:"app_id"`
	EnvironmentId int             `json:"environment_id"`
	PipelineId    int             `json:"pipeline_id"`
	ConfigMapData json.RawMessage `json:"config_map_data"`
	SecretData    json.RawMessage `json:"secret_data"`
	UserId        int32           `json:"-"`
}
    type ConfigMapService ¶
type ConfigMapService interface {
	CMGlobalAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
	CMGlobalFetch(appId int) (*ConfigDataRequest, error)
	CMEnvironmentAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
	CMEnvironmentFetch(appId int, envId int) (*ConfigDataRequest, error)
	CSGlobalAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
	CSGlobalFetch(appId int) (*ConfigDataRequest, error)
	CSEnvironmentAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
	CSEnvironmentFetch(appId int, envId int) (*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, userId int32) (*ConfigDataRequest, error)
	CSEnvironmentFetchForEdit(name string, id int, appId int, envId int, userId int32) (*ConfigDataRequest, error)
	ConfigSecretGlobalBulkPatch(bulkPatchRequest *BulkPatchRequest) (*BulkPatchRequest, error)
	ConfigSecretEnvironmentBulkPatch(bulkPatchRequest *BulkPatchRequest) (*BulkPatchRequest, error)
}
    type ConfigMapServiceImpl ¶
type ConfigMapServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewConfigMapServiceImpl ¶
func NewConfigMapServiceImpl(chartRepository chartConfig.ChartRepository, logger *zap.SugaredLogger, repoRepository chartConfig.ChartRepoRepository, mergeUtil util.MergeUtil, pipelineConfigRepository chartConfig.PipelineConfigRepository, configMapRepository chartConfig.ConfigMapRepository, environmentConfigRepository chartConfig.EnvConfigOverrideRepository, commonService commonService.CommonService, appRepository pipelineConfig.AppRepository) *ConfigMapServiceImpl
func (ConfigMapServiceImpl) CMEnvironmentAddUpdate ¶
func (impl ConfigMapServiceImpl) CMEnvironmentAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMEnvironmentDelete ¶
func (ConfigMapServiceImpl) CMEnvironmentDeleteByAppIdAndEnvId ¶
func (ConfigMapServiceImpl) CMEnvironmentFetch ¶
func (impl ConfigMapServiceImpl) CMEnvironmentFetch(appId int, envId int) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMGlobalAddUpdate ¶
func (impl ConfigMapServiceImpl) CMGlobalAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CMGlobalDelete ¶
func (ConfigMapServiceImpl) CMGlobalDeleteByAppId ¶
func (ConfigMapServiceImpl) CMGlobalFetch ¶
func (impl ConfigMapServiceImpl) CMGlobalFetch(appId int) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSEnvironmentAddUpdate ¶
func (impl ConfigMapServiceImpl) CSEnvironmentAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSEnvironmentDelete ¶
func (ConfigMapServiceImpl) CSEnvironmentDeleteByAppIdAndEnvId ¶
func (ConfigMapServiceImpl) CSEnvironmentFetch ¶
func (impl ConfigMapServiceImpl) CSEnvironmentFetch(appId int, envId int) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSEnvironmentFetchForEdit ¶
func (impl ConfigMapServiceImpl) CSEnvironmentFetchForEdit(name string, id int, appId int, envId int, userId int32) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSGlobalAddUpdate ¶
func (impl ConfigMapServiceImpl) CSGlobalAddUpdate(configMapRequest *ConfigDataRequest) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSGlobalDelete ¶
func (ConfigMapServiceImpl) CSGlobalDeleteByAppId ¶
func (ConfigMapServiceImpl) CSGlobalFetch ¶
func (impl ConfigMapServiceImpl) CSGlobalFetch(appId int) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) CSGlobalFetchForEdit ¶
func (impl ConfigMapServiceImpl) CSGlobalFetchForEdit(name string, id int, userId int32) (*ConfigDataRequest, error)
func (ConfigMapServiceImpl) ConfigSecretEnvironmentBulkPatch ¶
func (impl ConfigMapServiceImpl) ConfigSecretEnvironmentBulkPatch(bulkPatchRequest *BulkPatchRequest) (*BulkPatchRequest, error)
func (ConfigMapServiceImpl) ConfigSecretGlobalBulkPatch ¶
func (impl ConfigMapServiceImpl) ConfigSecretGlobalBulkPatch(bulkPatchRequest *BulkPatchRequest) (*BulkPatchRequest, error)
type ConfigsList ¶
type ConfigsList struct {
	ConfigData []*ConfigData `json:"maps"`
}
    type ContainerResources ¶
type ContainerResources struct {
	MinCpu        string `json:"minCpu"`
	MaxCpu        string `json:"maxCpu"`
	MinStorage    string `json:"minStorage"`
	MaxStorage    string `json:"maxStorage"`
	MinEphStorage string `json:"minEphStorage"`
	MaxEphStorage string `json:"maxEphStorage"`
	MinMem        string `json:"minMem"`
	MaxMem        string `json:"maxMem"`
}
    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 DbPipelineOrchestrator ¶
type DbPipelineOrchestrator 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) (pipelineId int, err error)
	UpdateCDPipeline(pipelineRequest *bean.CDPipelineConfigObject, userId int32, tx *pg.Tx) (err error)
	DeleteCiPipeline(pipeline *pipelineConfig.CiPipeline, userId int32, tx *pg.Tx) error
	DeleteCdPipeline(pipelineId int, tx *pg.Tx) error
	PatchMaterialValue(createRequest *bean.CiPipeline, userId int32) (*bean.CiPipeline, 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)
}
    type DbPipelineOrchestratorImpl ¶
type DbPipelineOrchestratorImpl struct {
	CiPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository
	GitSensorClient              gitSensor.GitSensorClient
	// contains filtered or unexported fields
}
    func NewDbPipelineOrchestrator ¶
func NewDbPipelineOrchestrator( pipelineGroupRepository pipelineConfig.AppRepository, logger *zap.SugaredLogger, materialRepository pipelineConfig.MaterialRepository, pipelineRepository pipelineConfig.PipelineRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, CiPipelineMaterialRepository pipelineConfig.CiPipelineMaterialRepository, GitSensorClient gitSensor.GitSensorClient, ciConfig *CiConfig, appWorkflowRepository appWorkflow.AppWorkflowRepository, envRepository cluster.EnvironmentRepository, attributesService attributes.AttributesService, appListingRepository repository.AppListingRepository, ) *DbPipelineOrchestratorImpl
func (DbPipelineOrchestratorImpl) CreateApp ¶
func (impl DbPipelineOrchestratorImpl) CreateApp(createRequest *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
func (DbPipelineOrchestratorImpl) CreateCDPipelines ¶
func (impl DbPipelineOrchestratorImpl) CreateCDPipelines(pipelineRequest *bean.CDPipelineConfigObject, appId int, userId int32, tx *pg.Tx) (pipelineId int, err error)
func (DbPipelineOrchestratorImpl) CreateCiConf ¶
func (impl DbPipelineOrchestratorImpl) CreateCiConf(createRequest *bean.CiConfigRequest, templateId int) (*bean.CiConfigRequest, error)
func (DbPipelineOrchestratorImpl) CreateMaterials ¶
func (impl DbPipelineOrchestratorImpl) CreateMaterials(createMaterialRequest *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
func (DbPipelineOrchestratorImpl) DeleteApp ¶
func (impl DbPipelineOrchestratorImpl) DeleteApp(appId int, userId int32) error
func (DbPipelineOrchestratorImpl) DeleteCdPipeline ¶
func (impl DbPipelineOrchestratorImpl) DeleteCdPipeline(pipelineId int, tx *pg.Tx) error
func (DbPipelineOrchestratorImpl) DeleteCiPipeline ¶
func (impl DbPipelineOrchestratorImpl) DeleteCiPipeline(pipeline *pipelineConfig.CiPipeline, userId int32, tx *pg.Tx) error
func (DbPipelineOrchestratorImpl) GetByEnvOverrideId ¶
func (impl DbPipelineOrchestratorImpl) GetByEnvOverrideId(envOverrideId int) (*bean.CdPipelines, error)
func (DbPipelineOrchestratorImpl) GetCdPipelinesForApp ¶
func (impl DbPipelineOrchestratorImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
func (DbPipelineOrchestratorImpl) GetCdPipelinesForAppAndEnv ¶
func (impl DbPipelineOrchestratorImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
func (DbPipelineOrchestratorImpl) PatchMaterialValue ¶
func (impl DbPipelineOrchestratorImpl) PatchMaterialValue(createRequest *bean.CiPipeline, userId int32) (*bean.CiPipeline, error)
func (DbPipelineOrchestratorImpl) PipelineExists ¶
func (impl DbPipelineOrchestratorImpl) PipelineExists(name string) (bool, error)
func (DbPipelineOrchestratorImpl) UpdateCDPipeline ¶
func (impl DbPipelineOrchestratorImpl) UpdateCDPipeline(pipelineRequest *bean.CDPipelineConfigObject, userId int32, tx *pg.Tx) (err error)
func (DbPipelineOrchestratorImpl) UpdateMaterial ¶
func (impl DbPipelineOrchestratorImpl) UpdateMaterial(updateMaterialDTO *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
type DefaultChart ¶
type DefaultChart string
type Deployment ¶
type Deployment struct {
	Strategy Strategy `json:"strategy"`
}
    type DeploymentType ¶
type DeploymentType struct {
	Deployment Deployment `json:"deployment"`
}
    type DockerArtifactStoreBean ¶
type DockerArtifactStoreBean struct {
	Id                 string                  `json:"id,omitempty" validate:"required"`
	PluginId           string                  `json:"pluginId,omitempty" validate:"required"`
	RegistryURL        string                  `json:"registryUrl,omitempty"`
	RegistryType       repository.RegistryType `json:"registryType,omitempty" validate:"required"`
	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"`
	Active             bool                    `json:"active"`
	User               int32                   `json:"-"`
}
    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)
	Delete(storeId string) (string, error)
}
    type DockerRegistryConfigImpl ¶
type DockerRegistryConfigImpl struct {
	// contains filtered or unexported fields
}
    func NewDockerRegistryConfigImpl ¶
func NewDockerRegistryConfigImpl(dockerArtifactStoreRepository repository.DockerArtifactStoreRepository, logger *zap.SugaredLogger) *DockerRegistryConfigImpl
func (DockerRegistryConfigImpl) Create ¶
func (impl DockerRegistryConfigImpl) Create(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
func (DockerRegistryConfigImpl) Delete ¶
func (impl DockerRegistryConfigImpl) Delete(storeId string) (string, error)
func (DockerRegistryConfigImpl) FetchAllDockerAccounts ¶
func (impl DockerRegistryConfigImpl) FetchAllDockerAccounts() ([]DockerArtifactStoreBean, error)
* this method used for getting all the docker account details
func (DockerRegistryConfigImpl) FetchOneDockerAccount ¶
func (impl DockerRegistryConfigImpl) FetchOneDockerAccount(storeId string) (*DockerArtifactStoreBean, error)
* this method used for getting all the docker account details
func (DockerRegistryConfigImpl) ListAllActive ¶
func (impl DockerRegistryConfigImpl) ListAllActive() ([]DockerArtifactStoreBean, error)
list all active artifact store
func (DockerRegistryConfigImpl) Update ¶
func (impl DockerRegistryConfigImpl) Update(bean *DockerArtifactStoreBean) (*DockerArtifactStoreBean, error)
type EcrConfig ¶
type EcrConfig struct {
	EcrPrefix string `env:"ECR_REPO_NAME_PREFIX" envDefault:"test/"`
}
    func GetEcrConfig ¶
type EnvironmentProperties ¶
type EnvironmentProperties struct {
	Id                int                `json:"id"`
	EnvOverrideValues json.RawMessage    `json:"envOverrideValues"`
	Status            models.ChartStatus `json:"status" validate:"number,required"` //default new, when its ready for deployment CHARTSTATUS_SUCCESS
	ManualReviewed    bool               `json:"manualReviewed" validate:"required"`
	Active            bool               `json:"active" validate:"required"`
	Namespace         string             `json:"namespace" validate:"name-component,required"`
	EnvironmentId     int                `json:"environmentId"`
	EnvironmentName   string             `json:"environmentName"`
	Latest            bool               `json:"latest"`
	UserId            int32              `json:"-"`
	AppMetrics        *bool              `json:"appMetrics"`
	ChartRefId        int                `json:"chartRefId,omitempty"  validate:"number"`
	IsOverride        bool               `sql:"isOverride"`
}
    type EnvironmentPropertiesResponse ¶
type EnvironmentPropertiesResponse struct {
	EnvironmentConfig EnvironmentProperties `json:"environmentConfig"`
	GlobalConfig      json.RawMessage       `json:"globalConfig"`
	AppMetrics        *bool                 `json:"appMetrics"`
	IsOverride        bool                  `sql:"is_override"`
	GlobalChartRefId  int                   `json:"globalChartRefId,omitempty"  validate:"number"`
	ChartRefId        int                   `json:"chartRefId,omitempty"  validate:"number"`
	Namespace         string                `json:"namespace" validate:"name-component"`
}
    type ExternalSecret ¶
type GitOptions ¶
type GitRegistryConfig ¶
type GitRegistryConfig interface {
	Create(request *GitRegistryRequest) (*GitRegistryRequest, error)
	GetAll() ([]GitRegistryRequest, error)
	FetchAllGitProviders() ([]GitRegistryRequest, error)
	FetchOneGitProvider(id string) (*GitRegistryRequest, error)
	Update(request *GitRegistryRequest) (*GitRegistryRequest, error)
}
    type GitRegistryConfigImpl ¶
type GitRegistryConfigImpl struct {
	GitSensorClient gitSensor.GitSensorClient
	// contains filtered or unexported fields
}
    func NewGitRegistryConfigImpl ¶
func NewGitRegistryConfigImpl(logger *zap.SugaredLogger, gitProviderRepo repository.GitProviderRepository, GitSensorClient gitSensor.GitSensorClient) *GitRegistryConfigImpl
func (GitRegistryConfigImpl) Create ¶
func (impl GitRegistryConfigImpl) Create(request *GitRegistryRequest) (*GitRegistryRequest, error)
func (GitRegistryConfigImpl) FetchAllGitProviders ¶
func (impl GitRegistryConfigImpl) FetchAllGitProviders() ([]GitRegistryRequest, error)
func (GitRegistryConfigImpl) FetchOneGitProvider ¶
func (impl GitRegistryConfigImpl) FetchOneGitProvider(providerId string) (*GitRegistryRequest, error)
func (GitRegistryConfigImpl) GetAll ¶
func (impl GitRegistryConfigImpl) GetAll() ([]GitRegistryRequest, error)
get all active git providers
func (GitRegistryConfigImpl) Update ¶
func (impl GitRegistryConfigImpl) Update(request *GitRegistryRequest) (*GitRegistryRequest, error)
func (GitRegistryConfigImpl) UpdateGitSensor ¶
func (impl GitRegistryConfigImpl) UpdateGitSensor(provider *repository.GitProvider) error
type GitRegistryRequest ¶
type GitRegistryRequest 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"`
	SshKey      string              `json:"sshKey,omitempty"`
	AccessToken string              `json:"accessToken,omitempty"`
	AuthMode    repository.AuthMode `json:"authMode,omitempty" validate:"required"`
	Active      bool                `json:"active"`
	UserId      int32               `json:"-"`
}
    type GitTriggerInfoResponse ¶
type GitTriggerInfoResponse struct {
	CiMaterials      []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"`
}
    type ImpactedObjectsResponse ¶ added in v0.2.17
type NameIncludesExcludes ¶ added in v0.2.17
type NameIncludesExcludes struct {
	Names []string `json:"names"`
}
    type PipelineBuilder ¶
type PipelineBuilder interface {
	CreateCiPipeline(createRequest *bean.CiConfigRequest) (*bean.PipelineCreateResponse, error)
	CreateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
	CreateMaterialsForApp(request *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
	UpdateMaterialsForApp(request *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
	DeleteApp(appId int, userId int32) error
	GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error)
	UpdateCiTemplate(updateRequest *bean.CiConfigRequest) (*bean.CiConfigRequest, error)
	PatchCiPipeline(request *bean.CiPatchRequest) (ciConfig *bean.CiConfigRequest, err error)
	CreateCdPipelines(cdPipelines *bean.CdPipelines, ctx context.Context) (*bean.CdPipelines, error)
	GetApp(appId int) (application *bean.CreateAppDTO, err error)
	PatchCdPipelines(cdPipelines *bean.CDPatchRequest, ctx context.Context) (*bean.CdPipelines, error)
	GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
	GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
	/*	CreateCdPipelines(cdPipelines bean.CdPipelines) (*bean.CdPipelines, error)*/
	GetArtifactsByCDPipeline(cdPipelineId int, stage bean2.CdWorkflowType) (bean.CiArtifactResponse, error)
	FetchArtifactForRollback(cdPipelineId int) (bean.CiArtifactResponse, error)
	FindAppsByTeamId(teamId int) ([]AppBean, error)
	GetAppListByTeamIds(teamIds []int) ([]*TeamAppBean, error)
	FindAppsByTeamName(teamName string) ([]AppBean, error)
	FindPipelineById(cdPipelineId int) (*pipelineConfig.Pipeline, error)
	GetAppList() ([]AppBean, error)
	GetCiPipelineMin(appId int) ([]*bean.CiPipelineMin, error)
	FetchCDPipelineStrategy(appId int) (PipelineStrategiesResponse, error)
	GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error)
	FetchConfigmapSecretsForCdStages(appId, envId, cdPipelineId int) (ConfigMapSecretsResponse, error)
	FindByIds(ids []*int) ([]*AppBean, error)
	GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error)
}
    type PipelineBuilderImpl ¶
type PipelineBuilderImpl struct {
	GitFactory    *util.GitFactory
	ArgoK8sClient argocdServer.ArgoK8sClient
	// contains filtered or unexported fields
}
    func NewPipelineBuilderImpl ¶
func NewPipelineBuilderImpl(logger *zap.SugaredLogger, dbPipelineOrchestrator DbPipelineOrchestrator, dockerArtifactStoreRepository repository.DockerArtifactStoreRepository, materialRepo pipelineConfig.MaterialRepository, pipelineGroupRepo pipelineConfig.AppRepository, pipelineRepository pipelineConfig.PipelineRepository, propertiesConfigService PropertiesConfigService, ciTemplateRepository pipelineConfig.CiTemplateRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, application application.ServiceClient, chartRepository chartConfig.ChartRepository, ciArtifactRepository repository.CiArtifactRepository, ecrConfig *EcrConfig, envConfigOverrideRepository chartConfig.EnvConfigOverrideRepository, environmentRepository cluster.EnvironmentRepository, pipelineConfigRepository chartConfig.PipelineConfigRepository, mergeUtil util.MergeUtil, appWorkflowRepository appWorkflow.AppWorkflowRepository, ciConfig *CiConfig, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, appService app.AppService, imageScanResultRepository security.ImageScanResultRepository, ArgoK8sClient argocdServer.ArgoK8sClient, GitFactory *util.GitFactory, attributesService attributes.AttributesService, ) *PipelineBuilderImpl
func (PipelineBuilderImpl) CreateApp ¶
func (impl PipelineBuilderImpl) CreateApp(request *bean.CreateAppDTO) (*bean.CreateAppDTO, error)
func (PipelineBuilderImpl) CreateCdPipelines ¶
func (impl PipelineBuilderImpl) CreateCdPipelines(cdPipelines *bean.CdPipelines, ctx context.Context) (*bean.CdPipelines, error)
func (PipelineBuilderImpl) CreateCiPipeline ¶
func (impl PipelineBuilderImpl) CreateCiPipeline(createRequest *bean.CiConfigRequest) (*bean.PipelineCreateResponse, error)
func (PipelineBuilderImpl) CreateMaterialsForApp ¶
func (impl PipelineBuilderImpl) CreateMaterialsForApp(request *bean.CreateMaterialDTO) (*bean.CreateMaterialDTO, error)
func (PipelineBuilderImpl) DeleteApp ¶
func (impl PipelineBuilderImpl) DeleteApp(appId int, userId int32) error
func (PipelineBuilderImpl) FetchArtifactForRollback ¶
func (impl PipelineBuilderImpl) FetchArtifactForRollback(cdPipelineId int) (bean.CiArtifactResponse, error)
func (PipelineBuilderImpl) FetchCDPipelineStrategy ¶
func (impl PipelineBuilderImpl) FetchCDPipelineStrategy(appId int) (PipelineStrategiesResponse, error)
func (PipelineBuilderImpl) FetchConfigmapSecretsForCdStages ¶
func (impl PipelineBuilderImpl) FetchConfigmapSecretsForCdStages(appId, envId, cdPipelineId int) (ConfigMapSecretsResponse, error)
func (PipelineBuilderImpl) FindAppsByTeamId ¶
func (impl PipelineBuilderImpl) FindAppsByTeamId(teamId int) ([]AppBean, error)
func (PipelineBuilderImpl) FindAppsByTeamName ¶
func (impl PipelineBuilderImpl) FindAppsByTeamName(teamName string) ([]AppBean, error)
func (PipelineBuilderImpl) FindByIds ¶
func (impl PipelineBuilderImpl) FindByIds(ids []*int) ([]*AppBean, error)
func (PipelineBuilderImpl) FindPipelineById ¶
func (impl PipelineBuilderImpl) FindPipelineById(cdPipelineId int) (*pipelineConfig.Pipeline, error)
func (PipelineBuilderImpl) GetApp ¶
func (impl PipelineBuilderImpl) GetApp(appId int) (application *bean.CreateAppDTO, err error)
func (PipelineBuilderImpl) GetAppList ¶
func (impl PipelineBuilderImpl) GetAppList() ([]AppBean, error)
func (PipelineBuilderImpl) GetAppListByTeamIds ¶
func (impl PipelineBuilderImpl) GetAppListByTeamIds(teamIds []int) ([]*TeamAppBean, error)
func (PipelineBuilderImpl) GetArtifactsByCDPipeline ¶
func (impl PipelineBuilderImpl) GetArtifactsByCDPipeline(cdPipelineId int, stage bean2.CdWorkflowType) (bean.CiArtifactResponse, error)
func (PipelineBuilderImpl) GetCdPipelineById ¶
func (impl PipelineBuilderImpl) GetCdPipelineById(pipelineId int) (cdPipeline *bean.CDPipelineConfigObject, err error)
func (PipelineBuilderImpl) GetCdPipelinesForApp ¶
func (impl PipelineBuilderImpl) GetCdPipelinesForApp(appId int) (cdPipelines *bean.CdPipelines, err error)
func (PipelineBuilderImpl) GetCdPipelinesForAppAndEnv ¶
func (impl PipelineBuilderImpl) GetCdPipelinesForAppAndEnv(appId int, envId int) (cdPipelines *bean.CdPipelines, err error)
func (PipelineBuilderImpl) GetCiPipeline ¶
func (impl PipelineBuilderImpl) GetCiPipeline(appId int) (ciConfig *bean.CiConfigRequest, err error)
func (PipelineBuilderImpl) GetCiPipelineById ¶
func (impl PipelineBuilderImpl) GetCiPipelineById(pipelineId int) (ciPipeline *bean.CiPipeline, err error)
func (PipelineBuilderImpl) GetCiPipelineMin ¶
func (impl PipelineBuilderImpl) GetCiPipelineMin(appId int) ([]*bean.CiPipelineMin, error)
func (PipelineBuilderImpl) PatchCdPipelines ¶
func (impl PipelineBuilderImpl) PatchCdPipelines(cdPipelines *bean.CDPatchRequest, ctx context.Context) (*bean.CdPipelines, error)
func (PipelineBuilderImpl) PatchCiPipeline ¶
func (impl PipelineBuilderImpl) PatchCiPipeline(request *bean.CiPatchRequest) (ciConfig *bean.CiConfigRequest, err error)
func (PipelineBuilderImpl) UpdateCiTemplate ¶
func (impl PipelineBuilderImpl) UpdateCiTemplate(updateRequest *bean.CiConfigRequest) (*bean.CiConfigRequest, error)
func (PipelineBuilderImpl) UpdateMaterialsForApp ¶
func (impl PipelineBuilderImpl) UpdateMaterialsForApp(request *bean.UpdateMaterialDTO) (*bean.UpdateMaterialDTO, error)
type PipelineConfigRequest ¶
type PipelineConfigRequest struct {
	Id                   int             `json:"id"  validate:"number"`
	AppId                int             `json:"appId,omitempty"  validate:"number,required"`
	EnvConfigOverrideId  int             `json:"envConfigOverrideId,omitempty"`
	PipelineConfigValues json.RawMessage `json:"pipelineConfigValues,omitempty" validate:"required"` //json format user value
	PipelineId           int             `json:"PipelineId,omitempty"`
	Latest               bool            `json:"latest"`
	Previous             bool            `json:"previous"`
	EnvId                int             `json:"envId,omitempty"`
	ManualReviewed       bool            `json:"manualReviewed" validate:"required"`
	UserId               int32           `json:"-"`
}
    type PipelineConfigRequestResponse ¶
type PipelineConfigRequestResponse struct {
	LatestPipelineConfigRequest   PipelineConfigRequest `json:"latestPipelineConfigRequest"`
	PreviousPipelineConfigRequest PipelineConfigRequest `json:"previousPipelineConfigRequest"`
}
    type PipelineStrategiesResponse ¶
type PipelineStrategiesResponse struct {
	PipelineStrategy []PipelineStrategy `json:"pipelineStrategy"`
}
    type PipelineStrategy ¶
type PipelineStrategy struct {
	DeploymentTemplate pipelineConfig.DeploymentTemplate `json:"deploymentTemplate,omitempty" validate:"oneof=BLUE-GREEN ROLLING"` //
	Config             json.RawMessage                   `json:"config"`
	Default            bool                              `json:"default"`
}
    type PropertiesConfigService ¶
type PropertiesConfigService interface {
	CreateEnvironmentProperties(appId int, propertiesRequest *EnvironmentProperties) (*EnvironmentProperties, error)
	UpdateEnvironmentProperties(appId int, propertiesRequest *EnvironmentProperties, userId int32) (*EnvironmentProperties, error)
	//create environment entry for each new environment
	CreateIfRequired(chart *chartConfig.Chart, environmentId int, userId int32, manualReviewed bool, chartStatus models.ChartStatus, isOverride bool, namespace string) (*chartConfig.EnvConfigOverride, error)
	GetEnvironmentProperties(appId, environmentId int, chartRefId int) (environmentPropertiesResponse *EnvironmentPropertiesResponse, err error)
	GetEnvironmentPropertiesById(environmentId int) ([]EnvironmentProperties, error)
	GetAppIdByChartEnvId(chartEnvId int) (*chartConfig.EnvConfigOverride, error)
	GetLatestEnvironmentProperties(appId, environmentId int) (*EnvironmentProperties, error)
	ResetEnvironmentProperties(id int) (bool, error)
	CreateEnvironmentPropertiesWithNamespace(appId int, propertiesRequest *EnvironmentProperties) (*EnvironmentProperties, error)
	EnvMetricsEnableDisable(appMetricRequest *AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, error)
}
    type PropertiesConfigServiceImpl ¶
type PropertiesConfigServiceImpl struct {
	// contains filtered or unexported fields
}
    func NewPropertiesConfigServiceImpl ¶
func NewPropertiesConfigServiceImpl(logger *zap.SugaredLogger, envConfigRepo chartConfig.EnvConfigOverrideRepository, chartRepo chartConfig.ChartRepository, mergeUtil util.MergeUtil, environmentRepository cluster.EnvironmentRepository, dbPipelineOrchestrator DbPipelineOrchestrator, application application.ServiceClient, envLevelAppMetricsRepository repository.EnvLevelAppMetricsRepository, appLevelMetricsRepository repository.AppLevelMetricsRepository, ) *PropertiesConfigServiceImpl
func (PropertiesConfigServiceImpl) CreateEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) CreateEnvironmentProperties(appId int, environmentProperties *EnvironmentProperties) (*EnvironmentProperties, error)
func (PropertiesConfigServiceImpl) CreateEnvironmentPropertiesWithNamespace ¶
func (impl PropertiesConfigServiceImpl) CreateEnvironmentPropertiesWithNamespace(appId int, environmentProperties *EnvironmentProperties) (*EnvironmentProperties, error)
func (PropertiesConfigServiceImpl) CreateIfRequired ¶
func (impl PropertiesConfigServiceImpl) CreateIfRequired(chart *chartConfig.Chart, environmentId int, userId int32, manualReviewed bool, chartStatus models.ChartStatus, isOverride bool, namespace string) (*chartConfig.EnvConfigOverride, error)
func (PropertiesConfigServiceImpl) EnvMetricsEnableDisable ¶
func (impl PropertiesConfigServiceImpl) EnvMetricsEnableDisable(appMetricRequest *AppMetricEnableDisableRequest) (*AppMetricEnableDisableRequest, 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 *EnvironmentPropertiesResponse, err error)
func (PropertiesConfigServiceImpl) GetEnvironmentPropertiesById ¶
func (impl PropertiesConfigServiceImpl) GetEnvironmentPropertiesById(envId int) ([]EnvironmentProperties, error)
func (PropertiesConfigServiceImpl) GetLatestEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) GetLatestEnvironmentProperties(appId, environmentId int) (environmentProperties *EnvironmentProperties, err error)
func (PropertiesConfigServiceImpl) ResetEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) ResetEnvironmentProperties(id int) (bool, error)
func (PropertiesConfigServiceImpl) UpdateEnvironmentProperties ¶
func (impl PropertiesConfigServiceImpl) UpdateEnvironmentProperties(appId int, propertiesRequest *EnvironmentProperties, userId int32) (*EnvironmentProperties, error)
type RefChartDir ¶
type RefChartDir string
type RequestType ¶
type RequestType string
const START RequestType = "START"
    const STOP RequestType = "STOP"
    type RolloutPause ¶
type RolloutPause struct {
	// Duration the amount of time to wait before moving to the next step.
	// +optional
	Duration *int32 `json:"duration,omitempty"`
}
    type SecretsList ¶
type SecretsList struct {
	ConfigData []*ConfigData `json:"secrets"`
}
    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 TeamAppBean ¶
type TemplateRequest ¶
type TemplateRequest struct {
	Id                      int             `json:"id"  validate:"number"`
	AppId                   int             `json:"appId,omitempty"  validate:"number,required"`
	RefChartTemplate        string          `json:"refChartTemplate,omitempty"`
	RefChartTemplateVersion string          `json:"refChartTemplateVersion,omitempty"`
	ChartRepositoryId       int             `json:"chartRepositoryId,omitempty"`
	ValuesOverride          json.RawMessage `json:"valuesOverride,omitempty" validate:"required"` //json format user value
	DefaultAppOverride      json.RawMessage `json:"defaultAppOverride,omitempty"`                 //override values available
	ChartRefId              int             `json:"chartRefId,omitempty"  validate:"number"`
	Latest                  bool            `json:"latest"`
	IsAppMetricsEnabled     bool            `json:"isAppMetricsEnabled"`
	UserId                  int32           `json:"-"`
}
    type Trigger ¶
type Trigger struct {
	PipelineId      int
	CommitHashes    map[int]bean.GitCommit
	CiMaterials     []*pipelineConfig.CiPipelineMaterial
	TriggeredBy     int32
	InvalidateCache bool
}
    type WebhookService ¶
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, 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) SaveCiArtifactWebhook ¶
func (impl WebhookServiceImpl) SaveCiArtifactWebhook(ciPipelineId int, request *CiArtifactWebhookRequest) (id int, err error)
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
	HandlePreStageSuccessEvent(cdStageCompleteEvent CdStageCompleteEvent) error
	HandleDeploymentSuccessEvent(gitHash string) error
	Subscribe() error
	TriggerPostStage(cdWf *pipelineConfig.CdWorkflow, cdPipeline *pipelineConfig.Pipeline, triggeredBy int32) error
	TriggerDeployment(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, applyAuth bool, async 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)
}
    type WorkflowDagExecutorImpl ¶
type WorkflowDagExecutorImpl struct {
	// contains filtered or unexported fields
}
    func NewWorkflowDagExecutorImpl ¶
func NewWorkflowDagExecutorImpl(Logger *zap.SugaredLogger, pipelineRepository pipelineConfig.PipelineRepository, cdWorkflowRepository pipelineConfig.CdWorkflowRepository, pubsubClient *pubsub.PubSubClient, appService app.AppService, cdWorkflowService CdWorkflowService, cdConfig *CdConfig, ciArtifactRepository repository.CiArtifactRepository, ciPipelineRepository pipelineConfig.CiPipelineRepository, materialRepository pipelineConfig.MaterialRepository, pipelineOverrideRepository chartConfig.PipelineOverrideRepository, user user.UserService, groupRepository repository.DeploymentGroupRepository, envRepository cluster.EnvironmentRepository, enforcer rbac.Enforcer, enforcerUtil rbac.EnforcerUtil, tokenCache *user.TokenCache, acdAuthConfig *user.ACDAuthConfig, eventFactory client.EventFactory, eventClient client.EventClient, cvePolicyRepository security.CvePolicyRepository, scanResultRepository security.ImageScanResultRepository) *WorkflowDagExecutorImpl
func (*WorkflowDagExecutorImpl) HandleCiSuccessEvent ¶
func (impl *WorkflowDagExecutorImpl) HandleCiSuccessEvent(artifact *repository.CiArtifact, applyAuth bool, async bool, triggeredBy int32) error
func (*WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent ¶
func (impl *WorkflowDagExecutorImpl) HandleDeploymentSuccessEvent(gitHash string) error
func (*WorkflowDagExecutorImpl) HandlePreStageSuccessEvent ¶
func (impl *WorkflowDagExecutorImpl) HandlePreStageSuccessEvent(cdStageCompleteEvent CdStageCompleteEvent) error
func (*WorkflowDagExecutorImpl) ManualCdTrigger ¶
func (impl *WorkflowDagExecutorImpl) ManualCdTrigger(overrideRequest *bean.ValuesOverrideRequest, ctx context.Context) (int, error)
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) TriggerDeployment ¶
func (impl *WorkflowDagExecutorImpl) TriggerDeployment(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, applyAuth bool, async bool, triggeredBy int32) error
Only used for auto trigger
func (*WorkflowDagExecutorImpl) TriggerPostStage ¶
func (impl *WorkflowDagExecutorImpl) TriggerPostStage(cdWf *pipelineConfig.CdWorkflow, cpipeline *pipelineConfig.Pipeline, triggeredBy int32) error
func (*WorkflowDagExecutorImpl) TriggerPreStage ¶
func (impl *WorkflowDagExecutorImpl) TriggerPreStage(cdWf *pipelineConfig.CdWorkflow, artifact *repository.CiArtifact, pipeline *pipelineConfig.Pipeline, triggeredBy int32, applyAuth bool) error
type WorkflowRequest ¶
type WorkflowRequest struct {
	WorkflowNamePrefix       string             `json:"workflowNamePrefix"`
	PipelineName             string             `json:"pipelineName"`
	PipelineId               int                `json:"pipelineId"`
	DockerImageTag           string             `json:"dockerImageTag"`
	DockerRegistryType       string             `json:"dockerRegistryType"`
	DockerRegistryURL        string             `json:"dockerRegistryURL"`
	DockerBuildArgs          string             `json:"dockerBuildArgs"`
	DockerRepository         string             `json:"dockerRepository"`
	DockerFileLocation       string             `json:"dockerfileLocation"`
	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         []CiProjectDetails `json:"ciProjectDetails"`
	ContainerResources       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 []*bean.CiScript   `json:"beforeDockerBuildScripts"`
	AfterDockerBuildScripts  []*bean.CiScript   `json:"afterDockerBuildScripts"`
	CiArtifactLocation       string             `json:"ciArtifactLocation"`
	InvalidateCache          bool               `json:"invalidateCache"`
	ScanEnabled              bool               `json:"scanEnabled"`
	CloudProvider            string             `json:"cloudProvider"`
	AzureBlobConfig          *AzureBlobConfig   `json:"azureBlobConfig"`
	MinioEndpoint            string             `json:"minioEndpoint"`
}
    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"`
	GitTriggers      map[int]pipelineConfig.GitCommit `json:"gitTriggers"`
	CiMaterials      []CiPipelineMaterialResponse     `json:"ciMaterials"`
	TriggeredBy      int32                            `json:"triggeredBy"`
	Artifact         string                           `json:"artifact"`
	TriggeredByEmail string                           `json:"triggeredByEmail"`
	Stage            string                           `json:"stage"`
	ArtifactId       int                              `json:"artifactId"`
}
    type WorkflowService ¶
type WorkflowService interface {
	SubmitWorkflow(workflowRequest *WorkflowRequest) (*v1alpha1.Workflow, error)
	DeleteWorkflow(wfName string, namespace string) error
	GetWorkflow(name string, namespace string) (*v1alpha1.Workflow, error)
	ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error)
	UpdateWorkflow(wf *v1alpha1.Workflow) (*v1alpha1.Workflow, error)
	TerminateWorkflow(name string, namespace string) error
}
    type WorkflowServiceImpl ¶
type WorkflowServiceImpl struct {
	Logger *zap.SugaredLogger
	// contains filtered or unexported fields
}
    func NewWorkflowServiceImpl ¶
func NewWorkflowServiceImpl(Logger *zap.SugaredLogger, ciConfig *CiConfig) *WorkflowServiceImpl
func (*WorkflowServiceImpl) DeleteWorkflow ¶
func (impl *WorkflowServiceImpl) DeleteWorkflow(wfName string, namespace string) error
func (*WorkflowServiceImpl) GetWorkflow ¶
func (*WorkflowServiceImpl) ListAllWorkflows ¶
func (impl *WorkflowServiceImpl) ListAllWorkflows(namespace string) (*v1alpha1.WorkflowList, error)
func (*WorkflowServiceImpl) SubmitWorkflow ¶
func (impl *WorkflowServiceImpl) SubmitWorkflow(workflowRequest *WorkflowRequest) (*v1alpha1.Workflow, error)
func (*WorkflowServiceImpl) TerminateWorkflow ¶
func (impl *WorkflowServiceImpl) TerminateWorkflow(name string, namespace string) error
func (*WorkflowServiceImpl) UpdateWorkflow ¶
type WorkflowStatus ¶
type WorkflowStatus struct {
	WorkflowName, Status, PodStatus, Message, LogLocation string
}
    
       Source Files
      ¶
      Source Files
      ¶
    
- BulkUpdateService.go
- CdConfig.go
- CdHandler.go
- CdWorkflowService.go
- ChartService.go
- CiConfig.go
- CiHandler.go
- CiLogService.go
- CiService.go
- ConfigMapService.go
- DbConfigService.go
- DbMigrationService.go
- DbPipelineOrchestrator.go
- DockerRegistryConfig.go
- GitRegistryConfig.go
- PipelineBuilder.go
- PropertiesConfig.go
- WebhookService.go
- WorkflowDagExecutor.go
- WorkflowService.go
 Click to show internal directories. 
   Click to hide internal directories.