devops

package
v0.13.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SUCCESS     = "SUCCESS"
	FAILURE     = "FAILURE"
	ABORT       = "ABORT"
	IN_PROGRESS = "IN_PROGRESS"
	DONE        = "DONE"
)

Variables

This section is empty.

Functions

func GetResult added in v0.13.0

func GetResult(rule *ResultRule, input interface{}) string

GetResult compare the input with rule for return the enmu value of result

func GetStatus added in v0.13.0

func GetStatus(rule *StatusRule, input interface{}) string

GetStatus compare the input with rule for return the enmu value of status

Types

type Build

type Build struct {
	domainlayer.DomainEntity
	JobId       string `gorm:"index"`
	Name        string `gorm:"type:varchar(255)"`
	CommitSha   string `gorm:"type:varchar(40)"`
	DurationSec uint64
	Status      string `gorm:"type:varchar(100)"`
	StartedDate time.Time
}

func (Build) TableName added in v0.12.0

func (Build) TableName() string

type CICDPipeline added in v0.13.0

type CICDPipeline struct {
	domainlayer.DomainEntity
	Name         string `gorm:"type:varchar(255)"`
	CommitSha    string `gorm:"type:varchar(255);index"`
	Branch       string `gorm:"type:varchar(255);index"`
	Repo         string `gorm:"type:varchar(255);index"`
	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
	CreatedDate  time.Time
	FinishedDate *time.Time
}

func (CICDPipeline) TableName added in v0.13.0

func (CICDPipeline) TableName() string

type CICDTask added in v0.13.0

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"`
	DurationSec  uint64
	StartedDate  time.Time
	FinishedDate *time.Time
}

func (CICDTask) TableName added in v0.13.0

func (CICDTask) TableName() string

type CiCDPipelineRepo added in v0.13.0

type CiCDPipelineRepo struct {
	domainlayer.DomainEntity
	CommitSha string `gorm:"primaryKey;type:varchar(255)"`
	Branch    string `gorm:"type:varchar(255)"`
	RepoUrl   string `gorm:"type:varchar(255)"`
}

func (CiCDPipelineRepo) TableName added in v0.13.0

func (CiCDPipelineRepo) TableName() string

type Job

type Job struct {
	Name string `gorm:"type:varchar(255)"`
	Type string `gorm:"type:varchar(255)"`
	domainlayer.DomainEntity
}

func (Job) TableName added in v0.12.0

func (Job) TableName() string

type ResultRule added in v0.13.0

type ResultRule struct {
	Success []string
	Failed  []string
	Abort   []string
	Default string
}

type StatusRule added in v0.13.0

type StatusRule struct {
	InProgress []string
	Done       []string
	Default    string
}

Jump to

Keyboard shortcuts

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