history

package
v0.7.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 26 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AllDeploymentConfigurationDetail added in v0.6.2

type AllDeploymentConfigurationDetail struct {
	DeploymentTemplateConfig *HistoryDetailDto                 `json:"deploymentTemplate"`
	ConfigMapConfig          []*ComponentLevelHistoryDetailDto `json:"configMap"`
	SecretConfig             []*ComponentLevelHistoryDetailDto `json:"secret"`
	StrategyConfig           *HistoryDetailDto                 `json:"pipelineStrategy"`
	WfrId                    int                               `json:"wfrId"`
}

type CiPipelineHistoryService added in v0.6.8

type CiPipelineHistoryService interface {
	SaveHistory(pipeline *pipelineConfig.CiPipeline, CiPipelineMaterial []*pipelineConfig.CiPipelineMaterial, ciTemplateBean *bean.CiTemplateBean, Trigger string) error
}

type CiPipelineHistoryServiceImpl added in v0.6.8

type CiPipelineHistoryServiceImpl struct {
	CiPipelineHistoryRepository repository.CiPipelineHistoryRepository
	// contains filtered or unexported fields
}

func NewCiPipelineHistoryServiceImpl added in v0.6.8

func NewCiPipelineHistoryServiceImpl(CiPipelineHistoryRepository repository.CiPipelineHistoryRepository,
	logger *zap.SugaredLogger, ciPipelineRepository pipelineConfig.CiPipelineRepository) *CiPipelineHistoryServiceImpl

func (*CiPipelineHistoryServiceImpl) SaveHistory added in v0.6.8

func (impl *CiPipelineHistoryServiceImpl) SaveHistory(pipeline *pipelineConfig.CiPipeline, CiPipelineMaterial []*pipelineConfig.CiPipelineMaterial, CiTemplateBean *bean.CiTemplateBean, Trigger string) error

type CiTemplateHistoryService added in v0.6.8

type CiTemplateHistoryService interface {
	SaveHistory(material *bean.CiTemplateBean, trigger string) error
}

type CiTemplateHistoryServiceImpl added in v0.6.8

type CiTemplateHistoryServiceImpl struct {
	CiTemplateHistoryRepository repository.CiTemplateHistoryRepository
	// contains filtered or unexported fields
}

func NewCiTemplateHistoryServiceImpl added in v0.6.8

func NewCiTemplateHistoryServiceImpl(CiTemplateHistoryRepository repository.CiTemplateHistoryRepository,
	logger *zap.SugaredLogger) *CiTemplateHistoryServiceImpl

func (CiTemplateHistoryServiceImpl) SaveHistory added in v0.6.8

func (impl CiTemplateHistoryServiceImpl) SaveHistory(ciTemplateBean *bean.CiTemplateBean, trigger string) error

type ComponentLevelHistoryDetailDto added in v0.6.2

type ComponentLevelHistoryDetailDto struct {
	ComponentName string            `json:"componentName"`
	HistoryConfig *HistoryDetailDto `json:"config"`
}

type ConfigMapAndSecretHistoryDto

type ConfigMapAndSecretHistoryDto struct {
	Id         int                `json:"id"`
	PipelineId int                `json:"pipelineId"`
	AppId      int                `json:"appId"`
	DataType   string             `json:"dataType,omitempty"`
	ConfigData []*bean.ConfigData `json:"configData,omitempty"`
	Deployed   bool               `json:"deployed"`
	DeployedOn time.Time          `json:"deployedOn"`
	DeployedBy int32              `json:"deployedBy"`
	EmailId    string             `json:"emailId"`
}

type ConfigMapHistoryService

type ConfigMapHistoryService interface {
	CreateHistoryFromAppLevelConfig(appLevelConfig *chartConfig.ConfigMapAppModel, configType repository.ConfigType) error
	CreateHistoryFromEnvLevelConfig(envLevelConfig *chartConfig.ConfigMapEnvModel, configType repository.ConfigType) error
	CreateCMCSHistoryForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, deployedOn time.Time, deployedBy int32) (int, int, error)
	MergeAppLevelAndEnvLevelConfigs(appLevelConfig *chartConfig.ConfigMapAppModel, envLevelConfig *chartConfig.ConfigMapEnvModel, configType repository.ConfigType, configMapSecretNames []string) (string, error)
	GetDeploymentDetailsForDeployedCMCSHistory(pipelineId int, configType repository.ConfigType) ([]*ConfigMapAndSecretHistoryDto, error)

	GetHistoryForDeployedCMCSById(ctx context.Context, id, pipelineId int, configType repository.ConfigType, componentName string, userHasAdminAccess bool) (*HistoryDetailDto, error)
	GetDeployedHistoryByPipelineIdAndWfrId(pipelineId, wfrId int, configType repository.ConfigType) (history *repository.ConfigmapAndSecretHistory, exists bool, cmCsNames []string, err error)
	GetDeployedHistoryList(pipelineId, baseConfigId int, configType repository.ConfigType, componentName string) ([]*DeployedHistoryComponentMetadataDto, error)

	CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (cmId int, csId int, exists bool, err error)
	GetDeployedHistoryDetailForCMCSByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int, configType repository.ConfigType, userHasAdminAccess bool) ([]*ComponentLevelHistoryDetailDto, error)
	ConvertConfigDataToComponentLevelDto(config *bean.ConfigData, configType repository.ConfigType, userHasAdminAccess bool) (*ComponentLevelHistoryDetailDto, error)
}

type ConfigMapHistoryServiceImpl

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

func NewConfigMapHistoryServiceImpl

func NewConfigMapHistoryServiceImpl(logger *zap.SugaredLogger,
	configMapHistoryRepository repository.ConfigMapHistoryRepository,
	pipelineRepository pipelineConfig.PipelineRepository,
	configMapRepository chartConfig.ConfigMapRepository,
	userService user.UserService,
	scopedVariableManager variables.ScopedVariableCMCSManager,
) *ConfigMapHistoryServiceImpl

func (ConfigMapHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime added in v0.7.1

func (impl ConfigMapHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (cmId int, csId int, exists bool, err error)

func (ConfigMapHistoryServiceImpl) ConvertConfigDataToComponentLevelDto added in v0.6.2

func (impl ConfigMapHistoryServiceImpl) ConvertConfigDataToComponentLevelDto(config *bean.ConfigData, configType repository.ConfigType, userHasAdminAccess bool) (*ComponentLevelHistoryDetailDto, error)

func (ConfigMapHistoryServiceImpl) CreateCMCSHistoryForDeploymentTrigger

func (impl ConfigMapHistoryServiceImpl) CreateCMCSHistoryForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, deployedOn time.Time, deployedBy int32) (int, int, error)

func (ConfigMapHistoryServiceImpl) CreateHistoryFromAppLevelConfig

func (impl ConfigMapHistoryServiceImpl) CreateHistoryFromAppLevelConfig(appLevelConfig *chartConfig.ConfigMapAppModel, configType repository.ConfigType) error

func (ConfigMapHistoryServiceImpl) CreateHistoryFromEnvLevelConfig

func (impl ConfigMapHistoryServiceImpl) CreateHistoryFromEnvLevelConfig(envLevelConfig *chartConfig.ConfigMapEnvModel, configType repository.ConfigType) error

func (ConfigMapHistoryServiceImpl) GetDeployedHistoryByPipelineIdAndWfrId added in v0.4.4

func (impl ConfigMapHistoryServiceImpl) GetDeployedHistoryByPipelineIdAndWfrId(pipelineId, wfrId int, configType repository.ConfigType) (history *repository.ConfigmapAndSecretHistory, exists bool, cmCsNames []string, err error)

func (ConfigMapHistoryServiceImpl) GetDeployedHistoryDetailForCMCSByPipelineIdAndWfrId added in v0.6.2

func (impl ConfigMapHistoryServiceImpl) GetDeployedHistoryDetailForCMCSByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int, configType repository.ConfigType, userHasAdminAccess bool) ([]*ComponentLevelHistoryDetailDto, error)

func (ConfigMapHistoryServiceImpl) GetDeployedHistoryList added in v0.4.4

func (impl ConfigMapHistoryServiceImpl) GetDeployedHistoryList(pipelineId, baseConfigId int, configType repository.ConfigType, componentName string) ([]*DeployedHistoryComponentMetadataDto, error)

func (ConfigMapHistoryServiceImpl) GetDeploymentDetailsForDeployedCMCSHistory

func (impl ConfigMapHistoryServiceImpl) GetDeploymentDetailsForDeployedCMCSHistory(pipelineId int, configType repository.ConfigType) ([]*ConfigMapAndSecretHistoryDto, error)

func (ConfigMapHistoryServiceImpl) GetHistoryForDeployedCMCSById

func (impl ConfigMapHistoryServiceImpl) GetHistoryForDeployedCMCSById(ctx context.Context, id, pipelineId int, configType repository.ConfigType, componentName string, userHasAdminAccess bool) (*HistoryDetailDto, error)

func (ConfigMapHistoryServiceImpl) MergeAppLevelAndEnvLevelConfigs

func (impl ConfigMapHistoryServiceImpl) MergeAppLevelAndEnvLevelConfigs(appLevelConfig *chartConfig.ConfigMapAppModel, envLevelConfig *chartConfig.ConfigMapEnvModel, configType repository.ConfigType, configMapSecretNames []string) (string, error)

type DeployedConfigurationHistoryService added in v0.4.4

type DeployedConfigurationHistoryService interface {
	//TODO: rethink if the below method right at this place
	CreateHistoriesForDeploymentTrigger(ctx context.Context, pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, envOverride *chartConfig.EnvConfigOverride, deployedOn time.Time, deployedBy int32) error

	GetDeployedConfigurationByWfrId(ctx context.Context, pipelineId, wfrId int) ([]*DeploymentConfigurationDto, error)
	GetDeployedHistoryComponentList(pipelineId, baseConfigId int, historyComponent, historyComponentName string) ([]*DeployedHistoryComponentMetadataDto, error)
	GetDeployedHistoryComponentDetail(ctx context.Context, pipelineId, id int, historyComponent, historyComponentName string, userHasAdminAccess bool) (*HistoryDetailDto, error)
	GetAllDeployedConfigurationByPipelineIdAndLatestWfrId(ctx context.Context, pipelineId int, userHasAdminAccess bool) (*AllDeploymentConfigurationDetail, error)
	GetAllDeployedConfigurationByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int, userHasAdminAccess bool) (*AllDeploymentConfigurationDetail, error)
	GetLatestDeployedArtifactByPipelineId(pipelineId int) (*repository2.CiArtifact, error)
}

type DeployedConfigurationHistoryServiceImpl added in v0.4.4

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

func NewDeployedConfigurationHistoryServiceImpl added in v0.4.4

func NewDeployedConfigurationHistoryServiceImpl(logger *zap.SugaredLogger,
	userService user.UserService, deploymentTemplateHistoryService DeploymentTemplateHistoryService,
	strategyHistoryService PipelineStrategyHistoryService, configMapHistoryService ConfigMapHistoryService,
	cdWorkflowRepository pipelineConfig.CdWorkflowRepository,
	scopedVariableManager variables.ScopedVariableCMCSManager) *DeployedConfigurationHistoryServiceImpl

func (*DeployedConfigurationHistoryServiceImpl) CreateHistoriesForDeploymentTrigger added in v0.6.29

func (impl *DeployedConfigurationHistoryServiceImpl) CreateHistoriesForDeploymentTrigger(ctx context.Context, pipeline *pipelineConfig.Pipeline, strategy *chartConfig.PipelineStrategy, envOverride *chartConfig.EnvConfigOverride, deployedOn time.Time, deployedBy int32) error

func (*DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndLatestWfrId added in v0.6.2

func (impl *DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndLatestWfrId(ctx context.Context, pipelineId int, userHasAdminAccess bool) (*AllDeploymentConfigurationDetail, error)

func (*DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndWfrId added in v0.6.2

func (impl *DeployedConfigurationHistoryServiceImpl) GetAllDeployedConfigurationByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int, userHasAdminAccess bool) (*AllDeploymentConfigurationDetail, error)

func (*DeployedConfigurationHistoryServiceImpl) GetDeployedConfigurationByWfrId added in v0.4.4

func (impl *DeployedConfigurationHistoryServiceImpl) GetDeployedConfigurationByWfrId(ctx context.Context, pipelineId, wfrId int) ([]*DeploymentConfigurationDto, error)

func (*DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentDetail added in v0.4.4

func (impl *DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentDetail(ctx context.Context, pipelineId, id int, historyComponent, historyComponentName string, userHasAdminAccess bool) (*HistoryDetailDto, error)

func (*DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentList added in v0.4.4

func (impl *DeployedConfigurationHistoryServiceImpl) GetDeployedHistoryComponentList(pipelineId, baseConfigId int, historyComponent, historyComponentName string) ([]*DeployedHistoryComponentMetadataDto, error)

func (*DeployedConfigurationHistoryServiceImpl) GetLatestDeployedArtifactByPipelineId added in v0.6.26

func (impl *DeployedConfigurationHistoryServiceImpl) GetLatestDeployedArtifactByPipelineId(pipelineId int) (*repository2.CiArtifact, error)

type DeployedHistoryComponentMetadataDto added in v0.4.4

type DeployedHistoryComponentMetadataDto struct {
	Id               int       `json:"id"`
	DeployedOn       time.Time `json:"deployedOn"`
	DeployedBy       string    `json:"deployedBy"` //emailId of user
	DeploymentStatus string    `json:"deploymentStatus"`
}

type DeploymentConfigurationDto added in v0.4.4

type DeploymentConfigurationDto struct {
	Id                  int              `json:"id,omitempty"`
	Name                HistoryComponent `json:"name"`
	ChildComponentNames []string         `json:"childList,omitempty"`
}

type DeploymentTemplateHistoryDto

type DeploymentTemplateHistoryDto struct {
	Id                      int       `json:"id"`
	PipelineId              int       `json:"pipelineId"`
	AppId                   int       `json:"appId"`
	ImageDescriptorTemplate string    `json:"imageDescriptorTemplate,omitempty"`
	Template                string    `json:"template,omitempty"`
	TemplateName            string    `json:"templateName,omitempty"`
	TemplateVersion         string    `json:"templateVersion,omitempty"`
	IsAppMetricsEnabled     bool      `json:"isAppMetricsEnabled"`
	TargetEnvironment       int       `json:"targetEnvironment,omitempty"`
	Deployed                bool      `json:"deployed"`
	DeployedOn              time.Time `json:"deployedOn"`
	DeployedBy              int32     `json:"deployedBy"`
	EmailId                 string    `json:"emailId"`
	DeploymentStatus        string    `json:"deploymentStatus,omitempty"`
	WfrId                   int       `json:"wfrId,omitempty"`
	WorkflowType            string    `json:"workflowType,omitempty"`
}

type DeploymentTemplateHistoryService

type DeploymentTemplateHistoryService interface {
	CreateDeploymentTemplateHistoryFromGlobalTemplate(chart *chartRepoRepository.Chart, tx *pg.Tx, IsAppMetricsEnabled bool) error
	CreateDeploymentTemplateHistoryFromEnvOverrideTemplate(envOverride *chartConfig.EnvConfigOverride, tx *pg.Tx, IsAppMetricsEnabled bool, pipelineId int) error
	CreateDeploymentTemplateHistoryForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, envOverride *chartConfig.EnvConfigOverride, renderedImageTemplate string, deployedOn time.Time, deployedBy int32) (*repository.DeploymentTemplateHistory, error)
	GetDeploymentDetailsForDeployedTemplateHistory(pipelineId, offset, limit int) ([]*DeploymentTemplateHistoryDto, error)

	GetHistoryForDeployedTemplateById(ctx context.Context, id int, pipelineId int) (*HistoryDetailDto, error)
	CheckIfHistoryExistsForPipelineIdAndWfrId(pipelineId, wfrId int) (historyId int, exists bool, err error)
	CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (deploymentTemplateHistoryId int, exists bool, err error)
	GetDeployedHistoryList(pipelineId, baseConfigId int) ([]*DeployedHistoryComponentMetadataDto, error)

	// used for rollback
	GetDeployedHistoryByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (*HistoryDetailDto, error)
}

type DeploymentTemplateHistoryServiceImpl

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

func NewDeploymentTemplateHistoryServiceImpl

func NewDeploymentTemplateHistoryServiceImpl(logger *zap.SugaredLogger, deploymentTemplateHistoryRepository repository.DeploymentTemplateHistoryRepository,
	pipelineRepository pipelineConfig.PipelineRepository, chartRepository chartRepoRepository.ChartRepository,
	userService user.UserService, cdWorkflowRepository pipelineConfig.CdWorkflowRepository,
	scopedVariableManager variables.ScopedVariableManager, deployedAppMetricsService deployedAppMetrics.DeployedAppMetricsService,
	chartRefService chartRef.ChartRefService) *DeploymentTemplateHistoryServiceImpl

func (DeploymentTemplateHistoryServiceImpl) CheckIfHistoryExistsForPipelineIdAndWfrId added in v0.4.4

func (impl DeploymentTemplateHistoryServiceImpl) CheckIfHistoryExistsForPipelineIdAndWfrId(pipelineId, wfrId int) (historyId int, exists bool, err error)

func (DeploymentTemplateHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime added in v0.7.1

func (impl DeploymentTemplateHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (deploymentTemplateHistoryId int, exists bool, err error)

func (DeploymentTemplateHistoryServiceImpl) CreateDeploymentTemplateHistoryForDeploymentTrigger

func (impl DeploymentTemplateHistoryServiceImpl) CreateDeploymentTemplateHistoryForDeploymentTrigger(pipeline *pipelineConfig.Pipeline, envOverride *chartConfig.EnvConfigOverride, renderedImageTemplate string, deployedOn time.Time, deployedBy int32) (*repository.DeploymentTemplateHistory, error)

func (DeploymentTemplateHistoryServiceImpl) CreateDeploymentTemplateHistoryFromEnvOverrideTemplate

func (impl DeploymentTemplateHistoryServiceImpl) CreateDeploymentTemplateHistoryFromEnvOverrideTemplate(envOverride *chartConfig.EnvConfigOverride, tx *pg.Tx, IsAppMetricsEnabled bool, pipelineId int) (err error)

func (DeploymentTemplateHistoryServiceImpl) CreateDeploymentTemplateHistoryFromGlobalTemplate

func (impl DeploymentTemplateHistoryServiceImpl) CreateDeploymentTemplateHistoryFromGlobalTemplate(chart *chartRepoRepository.Chart, tx *pg.Tx, IsAppMetricsEnabled bool) (err error)

func (DeploymentTemplateHistoryServiceImpl) GetDeployedHistoryByPipelineIdAndWfrId added in v0.6.2

func (impl DeploymentTemplateHistoryServiceImpl) GetDeployedHistoryByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (*HistoryDetailDto, error)

func (DeploymentTemplateHistoryServiceImpl) GetDeployedHistoryList added in v0.4.4

func (impl DeploymentTemplateHistoryServiceImpl) GetDeployedHistoryList(pipelineId, baseConfigId int) ([]*DeployedHistoryComponentMetadataDto, error)

func (DeploymentTemplateHistoryServiceImpl) GetDeploymentDetailsForDeployedTemplateHistory

func (impl DeploymentTemplateHistoryServiceImpl) GetDeploymentDetailsForDeployedTemplateHistory(pipelineId, offset, limit int) ([]*DeploymentTemplateHistoryDto, error)

func (DeploymentTemplateHistoryServiceImpl) GetHistoryForDeployedTemplateById added in v0.4.4

func (impl DeploymentTemplateHistoryServiceImpl) GetHistoryForDeployedTemplateById(ctx context.Context, id int, pipelineId int) (*HistoryDetailDto, error)

type GitMaterialHistoryService added in v0.6.8

type GitMaterialHistoryService interface {
	CreateMaterialHistory(tx *pg.Tx, inputMaterial *pipelineConfig.GitMaterial) error
	CreateDeleteMaterialHistory(materials []*pipelineConfig.GitMaterial) error
	MarkMaterialDeletedAndCreateHistory(tx *pg.Tx, material *pipelineConfig.GitMaterial) error
}

type GitMaterialHistoryServiceImpl added in v0.6.8

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

func NewGitMaterialHistoryServiceImpl added in v0.6.8

func NewGitMaterialHistoryServiceImpl(gitMaterialHistoryRepository repository.GitMaterialHistoryRepository,
	logger *zap.SugaredLogger) *GitMaterialHistoryServiceImpl

func (GitMaterialHistoryServiceImpl) CreateDeleteMaterialHistory added in v0.6.8

func (impl GitMaterialHistoryServiceImpl) CreateDeleteMaterialHistory(materials []*pipelineConfig.GitMaterial) error

func (GitMaterialHistoryServiceImpl) CreateMaterialHistory added in v0.6.8

func (impl GitMaterialHistoryServiceImpl) CreateMaterialHistory(tx *pg.Tx, inputMaterial *pipelineConfig.GitMaterial) error

func (GitMaterialHistoryServiceImpl) MarkMaterialDeletedAndCreateHistory added in v0.6.8

func (impl GitMaterialHistoryServiceImpl) MarkMaterialDeletedAndCreateHistory(tx *pg.Tx, material *pipelineConfig.GitMaterial) error

type HistoryComponent added in v0.4.4

type HistoryComponent string
const (
	DEPLOYMENT_TEMPLATE_TYPE_HISTORY_COMPONENT HistoryComponent = "DEPLOYMENT_TEMPLATE"
	CONFIGMAP_TYPE_HISTORY_COMPONENT           HistoryComponent = "CONFIGMAP"
	SECRET_TYPE_HISTORY_COMPONENT              HistoryComponent = "SECRET"
	PIPELINE_STRATEGY_TYPE_HISTORY_COMPONENT   HistoryComponent = "PIPELINE_STRATEGY"
)

type HistoryDetailConfig added in v0.4.4

type HistoryDetailConfig struct {
	DisplayName      string            `json:"displayName"`
	Value            string            `json:"value"`
	VariableSnapshot map[string]string `json:"variableSnapshot"`
	ResolvedValue    string            `json:"resolvedValue"`
}

type HistoryDetailDto added in v0.4.4

type HistoryDetailDto struct {
	//for deployment template
	TemplateName        string `json:"templateName,omitempty"`
	TemplateVersion     string `json:"templateVersion,omitempty"`
	IsAppMetricsEnabled *bool  `json:"isAppMetricsEnabled,omitempty"`
	//for pipeline strategy
	PipelineTriggerType pipelineConfig.TriggerType `json:"pipelineTriggerType,omitempty"`
	Strategy            string                     `json:"strategy,omitempty"`
	//for configmap and secret
	Type               string               `json:"type,omitempty"`
	External           *bool                `json:"external,omitempty"`
	MountPath          string               `json:"mountPath,omitempty"`
	ExternalSecretType string               `json:"externalType,omitempty"`
	RoleARN            string               `json:"roleARN,omitempty"`
	SubPath            *bool                `json:"subPath,omitempty"`
	FilePermission     string               `json:"filePermission,omitempty"`
	CodeEditorValue    *HistoryDetailConfig `json:"codeEditorValue"`
	SecretViewAccess   bool                 `json:"secretViewAccess"` // this is being used to check whether a user can see obscured secret values or not.
}

type PipelineStrategyHistoryDto

type PipelineStrategyHistoryDto struct {
	Id         int       `json:"id"`
	PipelineId int       `json:"pipelineId"`
	Strategy   string    `json:"strategy,omitempty"`
	Config     string    `json:"config,omitempty"`
	Default    bool      `json:"default,omitempty"`
	Deployed   bool      `json:"deployed"`
	DeployedOn time.Time `json:"deployedOn"`
	DeployedBy int32     `json:"deployedBy"`
	EmailId    string    `json:"emailId"`
}

type PipelineStrategyHistoryService

type PipelineStrategyHistoryService interface {
	CreatePipelineStrategyHistory(pipelineStrategy *chartConfig.PipelineStrategy, pipelineTriggerType pipelineConfig.TriggerType, tx *pg.Tx) (historyModel *repository.PipelineStrategyHistory, err error)
	CreateStrategyHistoryForDeploymentTrigger(strategy *chartConfig.PipelineStrategy, deployedOn time.Time, deployedBy int32, pipelineTriggerType pipelineConfig.TriggerType) error
	GetDeploymentDetailsForDeployedStrategyHistory(pipelineId int) ([]*PipelineStrategyHistoryDto, error)

	GetHistoryForDeployedStrategyById(id, pipelineId int) (*HistoryDetailDto, error)
	CheckIfHistoryExistsForPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (historyId int, exists bool, err error)
	CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (exists bool, err error)
	GetDeployedHistoryList(pipelineId, baseConfigId int) ([]*DeployedHistoryComponentMetadataDto, error)
	GetLatestDeployedHistoryByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (*HistoryDetailDto, error)
}

type PipelineStrategyHistoryServiceImpl

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

func NewPipelineStrategyHistoryServiceImpl

func NewPipelineStrategyHistoryServiceImpl(logger *zap.SugaredLogger,
	pipelineStrategyHistoryRepository repository.PipelineStrategyHistoryRepository,
	userService user.UserService) *PipelineStrategyHistoryServiceImpl

func (PipelineStrategyHistoryServiceImpl) CheckIfHistoryExistsForPipelineIdAndWfrId added in v0.4.4

func (impl PipelineStrategyHistoryServiceImpl) CheckIfHistoryExistsForPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (historyId int, exists bool, err error)

func (PipelineStrategyHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime added in v0.7.1

func (impl PipelineStrategyHistoryServiceImpl) CheckIfTriggerHistoryExistsForPipelineIdOnTime(pipelineId int, deployedOn time.Time) (exists bool, err error)

func (PipelineStrategyHistoryServiceImpl) CreatePipelineStrategyHistory

func (impl PipelineStrategyHistoryServiceImpl) CreatePipelineStrategyHistory(pipelineStrategy *chartConfig.PipelineStrategy, pipelineTriggerType pipelineConfig.TriggerType, tx *pg.Tx) (historyModel *repository.PipelineStrategyHistory, err error)

func (PipelineStrategyHistoryServiceImpl) CreateStrategyHistoryForDeploymentTrigger

func (impl PipelineStrategyHistoryServiceImpl) CreateStrategyHistoryForDeploymentTrigger(pipelineStrategy *chartConfig.PipelineStrategy, deployedOn time.Time, deployedBy int32, pipelineTriggerType pipelineConfig.TriggerType) error

func (PipelineStrategyHistoryServiceImpl) GetDeployedHistoryList added in v0.4.4

func (impl PipelineStrategyHistoryServiceImpl) GetDeployedHistoryList(pipelineId, baseConfigId int) ([]*DeployedHistoryComponentMetadataDto, error)

func (PipelineStrategyHistoryServiceImpl) GetDeploymentDetailsForDeployedStrategyHistory

func (impl PipelineStrategyHistoryServiceImpl) GetDeploymentDetailsForDeployedStrategyHistory(pipelineId int) ([]*PipelineStrategyHistoryDto, error)

func (PipelineStrategyHistoryServiceImpl) GetHistoryForDeployedStrategyById

func (impl PipelineStrategyHistoryServiceImpl) GetHistoryForDeployedStrategyById(id, pipelineId int) (*HistoryDetailDto, error)

func (PipelineStrategyHistoryServiceImpl) GetLatestDeployedHistoryByPipelineIdAndWfrId added in v0.6.2

func (impl PipelineStrategyHistoryServiceImpl) GetLatestDeployedHistoryByPipelineIdAndWfrId(ctx context.Context, pipelineId, wfrId int) (*HistoryDetailDto, error)

type PrePostCdScriptHistoryDto

type PrePostCdScriptHistoryDto struct {
	Id                   int                              `json:"id"`
	PipelineId           int                              `json:"pipelineId"`
	Script               string                           `json:"script"`
	Stage                string                           `json:"stage"`
	ConfigMapSecretNames PrePostStageConfigMapSecretNames `json:"configmapSecretNames"`
	ConfigMapData        []*bean.ConfigData               `json:"configmapData"`
	SecretData           []*bean.ConfigData               `json:"secretData"`
	TriggerType          string                           `json:"triggerType"`
	ExecInEnv            bool                             `json:"execInEnv"`
	Deployed             bool                             `json:"deployed"`
	DeployedOn           time.Time                        `json:"deployedOn"`
	DeployedBy           int32                            `json:"deployedBy"`
}

type PrePostCdScriptHistoryService

type PrePostCdScriptHistoryService interface {
	CreatePrePostCdScriptHistory(pipeline *pipelineConfig.Pipeline, tx *pg.Tx, stage repository.CdStageType, deployed bool, deployedBy int32, deployedOn time.Time) error
	GetHistoryForDeployedPrePostCdScript(pipelineId int, stage repository.CdStageType) ([]*PrePostCdScriptHistoryDto, error)
}

type PrePostCdScriptHistoryServiceImpl

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

func NewPrePostCdScriptHistoryServiceImpl

func NewPrePostCdScriptHistoryServiceImpl(logger *zap.SugaredLogger, prePostCdScriptHistoryRepository repository.PrePostCdScriptHistoryRepository,
	configMapRepository chartConfig.ConfigMapRepository, configMapHistoryService ConfigMapHistoryService) *PrePostCdScriptHistoryServiceImpl

func (PrePostCdScriptHistoryServiceImpl) CreatePrePostCdScriptHistory

func (impl PrePostCdScriptHistoryServiceImpl) CreatePrePostCdScriptHistory(pipeline *pipelineConfig.Pipeline, tx *pg.Tx, stage repository.CdStageType, deployed bool, deployedBy int32, deployedOn time.Time) (err error)

func (PrePostCdScriptHistoryServiceImpl) GetConfigMapSecretData

func (impl PrePostCdScriptHistoryServiceImpl) GetConfigMapSecretData(pipeline *pipelineConfig.Pipeline, stage repository.CdStageType) (configMapData, secretData string, err error)

func (PrePostCdScriptHistoryServiceImpl) GetHistoryForDeployedPrePostCdScript

func (impl PrePostCdScriptHistoryServiceImpl) GetHistoryForDeployedPrePostCdScript(pipelineId int, stage repository.CdStageType) ([]*PrePostCdScriptHistoryDto, error)

type PrePostCiScriptHistoryService

type PrePostCiScriptHistoryService interface {
	CreatePrePostCiScriptHistory(ciPipelineScript *pipelineConfig.CiPipelineScript, tx *pg.Tx, built bool, builtBy int32, builtOn time.Time) (historyModel *repository.PrePostCiScriptHistory, err error)
}

type PrePostCiScriptHistoryServiceImpl

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

func NewPrePostCiScriptHistoryServiceImpl

func NewPrePostCiScriptHistoryServiceImpl(logger *zap.SugaredLogger, prePostCiScriptHistoryRepository repository.PrePostCiScriptHistoryRepository) *PrePostCiScriptHistoryServiceImpl

func (PrePostCiScriptHistoryServiceImpl) CreatePrePostCiScriptHistory

func (impl PrePostCiScriptHistoryServiceImpl) CreatePrePostCiScriptHistory(ciPipelineScript *pipelineConfig.CiPipelineScript, tx *pg.Tx, built bool, builtBy int32, builtOn time.Time) (historyModel *repository.PrePostCiScriptHistory, err error)

type PrePostStageConfigMapSecretNames

type PrePostStageConfigMapSecretNames struct {
	ConfigMaps []string `json:"configMaps"`
	Secrets    []string `json:"secrets"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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