Documentation
¶
Index ¶
Constants ¶
View Source
const ( SUCCESS = "SUCCESS" FAILURE = "FAILURE" ABORT = "ABORT" MANUAL = "MANUAL" )
this is for the field `result` in table.cicd_pipelines and table.cicd_tasks
View Source
const ( IN_PROGRESS = "IN_PROGRESS" DONE = "DONE" )
this is for the field `status` in table.cicd_pipelines and table.cicd_tasks
View Source
const ( TEST = "TEST" LINT = "LINT" BUILD = "BUILD" DEPLOYMENT = "DEPLOYMENT" )
View Source
const ( PRODUCTION = "PRODUCTION" STAGING = "STAGING" TESTING = "TESTING" )
Variables ¶
This section is empty.
Functions ¶
func GetResult ¶
func GetResult(rule *ResultRule, input interface{}) string
GetResult compare the input with rule for return the enmu value of result
func GetStatus ¶
func GetStatus(rule *StatusRule, input interface{}) string
GetStatus compare the input with rule for return the enmu value of status
Types ¶
type CICDPipeline ¶
type CICDPipeline struct {
domainlayer.DomainEntity
Name string `gorm:"type:varchar(255)"`
Result string `gorm:"type:varchar(100)"`
Status string `gorm:"type:varchar(100)"`
Type string `gorm:"type:varchar(100);comment: to indicate this is CI or CD"`
DurationSec uint64
Environment string `gorm:"type:varchar(255)"`
CreatedDate time.Time
FinishedDate *time.Time
CicdScopeId string `gorm:"index;type:varchar(255)"`
}
func (CICDPipeline) TableName ¶
func (CICDPipeline) TableName() string
type CICDTask ¶
type CICDTask struct {
domainlayer.DomainEntity
Name string `gorm:"type:varchar(255)"`
PipelineId string `gorm:"index;type:varchar(255)"`
Result string `gorm:"type:varchar(100)"`
Status string `gorm:"type:varchar(100)"`
Type string `gorm:"type:varchar(100);comment: to indicate this is CI or CD"`
Environment string `gorm:"type:varchar(255)"`
DurationSec uint64
StartedDate time.Time
FinishedDate *time.Time
CicdScopeId string `gorm:"index;type:varchar(255)"`
}
type CiCDPipelineCommit ¶
type CiCDPipelineCommit struct {
common.NoPKModel
PipelineId string `gorm:"primaryKey;type:varchar(255)"`
CommitSha string `gorm:"primaryKey;type:varchar(255)"`
Branch string `gorm:"type:varchar(255)"`
RepoId string `gorm:"index;type:varchar(255)"`
RepoUrl string
}
func (CiCDPipelineCommit) TableName ¶
func (CiCDPipelineCommit) TableName() string
type CicdDeploymentCommit ¶
type CicdDeploymentCommit struct {
domainlayer.DomainEntity
CicdScopeId string `gorm:"index;type:varchar(255)"`
CicdDeploymentId string `gorm:"type:varchar(255)"` // if it is converted from a cicd_pipeline_commit
Name string `gorm:"type:varchar(255)"`
Result string `gorm:"type:varchar(100)"`
Status string `gorm:"type:varchar(100)"`
Environment string `gorm:"type:varchar(255)"`
CreatedDate time.Time
StartedDate *time.Time
FinishedDate *time.Time
DurationSec *uint64
CommitSha string `gorm:"primaryKey;type:varchar(255)"`
RefName string `gorm:"type:varchar(255)"` // to delete?
RepoId string `gorm:"type:varchar(255)"`
RepoUrl string `gorm:"index;not null"`
PrevSuccessDeploymentCommitId string `gorm:"type:varchar(255)"`
}
func (CicdDeploymentCommit) TableName ¶
func (CicdDeploymentCommit) TableName() string
type CicdScope ¶
type CicdScope struct {
domainlayer.DomainEntity
Name string `gorm:"type:varchar(255)"`
Description string
Url string `gorm:"type:varchar(255)"`
CreatedDate *time.Time
UpdatedDate *time.Time
}
func NewCicdScope ¶
type ResultRule ¶
Click to show internal directories.
Click to hide internal directories.