Documentation
¶
Index ¶
- type Action
- type ApiBuildResponse
- type AssignedLabels
- type Branch
- type Cause
- type ChangeSet
- type JenkinsApiParams
- type JenkinsBuild
- type JenkinsBuildCommit
- type JenkinsConn
- type JenkinsConnection
- type JenkinsJob
- type JenkinsJobDag
- type JenkinsScopeConfig
- type JenkinsStage
- type Job
- type LastBuiltRevision
- type OverallLoad
- type PrimaryView
- type Project
- type Revision
- type Stage
- type UnlabeledLoad
- type Views
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct {
Class string `json:"_class,omitempty"`
LastBuiltRevision *LastBuiltRevision `json:"lastBuiltRevision,omitempty"`
MercurialRevisionNumber string `json:"mercurialRevisionNumber"`
RemoteUrls []string `json:"remoteUrls"`
Causes []Cause `json:"causes"`
}
type ApiBuildResponse ¶
type ApiBuildResponse struct {
Class string `json:"_class"`
Number int64 `json:"number"`
Result string `json:"result"`
Building bool `json:"building"`
Actions []Action `json:"actions"`
Duration float64 `json:"duration"`
Timestamp int64 `json:"timestamp"`
DisplayName string `json:"fullDisplayName"`
EstimatedDuration float64 `json:"estimatedDuration"`
ChangeSet ChangeSet `json:"changeSet"`
}
type AssignedLabels ¶
type AssignedLabels struct {
Name string `json:"name"`
}
type JenkinsApiParams ¶
type JenkinsBuild ¶
type JenkinsBuild struct {
common.NoPKModel
// collected fields
ConnectionId uint64 `gorm:"primaryKey"`
JobName string `gorm:"index;type:varchar(255)"`
JobPath string `gorm:"index;type:varchar(255)"`
Duration float64 // build time
FullName string `gorm:"primaryKey;type:varchar(255)"` // "path/job name#7"
EstimatedDuration float64 // EstimatedDuration
Number int64 `gorm:"index"`
Result string // Result
Timestamp int64 // start time
StartTime time.Time // convered by timestamp
Type string `gorm:"index;type:varchar(255)"`
Class string `gorm:"index;type:varchar(255)" `
TriggeredBy string `gorm:"type:varchar(255)"`
Building bool
HasStages bool
}
JenkinsBuild db entity for jenkins build
func (JenkinsBuild) TableName ¶
func (JenkinsBuild) TableName() string
type JenkinsBuildCommit ¶
type JenkinsBuildCommit struct {
ConnectionId uint64 `gorm:"primaryKey"`
BuildName string `gorm:"primaryKey;type:varchar(255)"`
CommitSha string `gorm:"primaryKey;type:varchar(255)"`
Branch string `gorm:"type:varchar(255)"`
RepoUrl string `gorm:"type:varchar(255)"`
common.NoPKModel
}
func (JenkinsBuildCommit) TableName ¶
func (JenkinsBuildCommit) TableName() string
type JenkinsConn ¶
type JenkinsConn struct {
helper.RestConnection `mapstructure:",squash"`
helper.BasicAuth `mapstructure:",squash"`
}
JenkinsConn holds the essential information to connect to the Jenkins API
func (JenkinsConn) Sanitize ¶
func (connection JenkinsConn) Sanitize() JenkinsConn
type JenkinsConnection ¶
type JenkinsConnection struct {
helper.BaseConnection `mapstructure:",squash"`
JenkinsConn `mapstructure:",squash"`
}
JenkinsConnection holds JenkinsConn plus ID/Name for database storage
func (*JenkinsConnection) MergeFromRequest ¶
func (connection *JenkinsConnection) MergeFromRequest(target *JenkinsConnection, body map[string]interface{}) error
func (JenkinsConnection) Sanitize ¶
func (connection JenkinsConnection) Sanitize() JenkinsConnection
func (JenkinsConnection) TableName ¶
func (JenkinsConnection) TableName() string
type JenkinsJob ¶
type JenkinsJob struct {
common.Scope `mapstructure:",squash"`
FullName string `gorm:"primaryKey;type:varchar(255)" mapstructure:"fullName" validate:"required" json:"fullName"` // "path1/path2/job name"
Name string `gorm:"index;type:varchar(255)" mapstructure:"name" json:"name"` // scope name now is same to `jobFullName`
Path string `gorm:"index;type:varchar(511)" mapstructure:"-,omitempty" json:"-"` // "job/path1/job/path2"
Class string `gorm:"type:varchar(255)" mapstructure:"class,omitempty" json:"class"`
Color string `gorm:"type:varchar(255)" mapstructure:"color,omitempty" json:"color"`
Base string `gorm:"type:varchar(255)" mapstructure:"base,omitempty" json:"base"`
Url string `mapstructure:"url,omitempty" json:"url"`
Description string `mapstructure:"description,omitempty" json:"description"`
PrimaryView string `gorm:"type:varchar(255)" mapstructure:"primaryView,omitempty" json:"primaryView"`
}
JenkinsJob db entity for jenkins job
func (JenkinsJob) ScopeFullName ¶
func (j JenkinsJob) ScopeFullName() string
func (JenkinsJob) ScopeId ¶
func (j JenkinsJob) ScopeId() string
func (JenkinsJob) ScopeName ¶
func (j JenkinsJob) ScopeName() string
func (JenkinsJob) ScopeParams ¶
func (j JenkinsJob) ScopeParams() interface{}
func (JenkinsJob) TableName ¶
func (JenkinsJob) TableName() string
type JenkinsJobDag ¶
type JenkinsJobDag struct {
ConnetionId uint64 `gorm:"primaryKey"`
UpstreamJob string `gorm:"primaryKey;type:varchar(255)"`
DownstreamJob string `gorm:"primaryKey;type:varchar(255)"`
common.NoPKModel
}
func (JenkinsJobDag) TableName ¶
func (JenkinsJobDag) TableName() string
type JenkinsScopeConfig ¶
type JenkinsScopeConfig struct {
common.ScopeConfig `mapstructure:",squash" json:",inline" gorm:"embedded"`
DeploymentPattern string `gorm:"type:varchar(255)" mapstructure:"deploymentPattern,omitempty" json:"deploymentPattern"`
ProductionPattern string `gorm:"type:varchar(255)" mapstructure:"productionPattern,omitempty" json:"productionPattern"`
}
func (*JenkinsScopeConfig) SetConnectionId ¶
func (t *JenkinsScopeConfig) SetConnectionId(c *JenkinsScopeConfig, connectionId uint64)
func (JenkinsScopeConfig) TableName ¶
func (t JenkinsScopeConfig) TableName() string
type JenkinsStage ¶
type JenkinsStage struct {
common.NoPKModel
ConnectionId uint64 `gorm:"primaryKey"`
ID string `json:"id" gorm:"primaryKey;type:varchar(255)"`
Name string `json:"name" gorm:"type:varchar(255)"`
ExecNode string `json:"execNode" gorm:"type:varchar(255)"`
Status string `json:"status" gorm:"type:varchar(255)"`
StartTimeMillis int64 `json:"startTimeMillis"`
DurationMillis int `json:"durationMillis"`
PauseDurationMillis int `json:"pauseDurationMillis"`
Type string `gorm:"index;type:varchar(255)"`
BuildName string `gorm:"primaryKey;type:varchar(255)"`
}
func (JenkinsStage) TableName ¶
func (JenkinsStage) TableName() string
type Job ¶
type Job struct {
FullName string `gorm:"primaryKey;type:varchar(255)"`
Path string `gorm:"primaryKey;type:varchar(511)"`
Name string `json:"name"`
Color string `json:"color"`
Class string `json:"_class"`
Base string `json:"base"`
URL string `json:"url"`
Description string `json:"description"`
UpstreamProjects []Project `json:"upstreamProjects"`
Jobs *[]Job `json:"jobs" gorm:"-"`
*PrimaryView `json:"primaryView"`
}
func (Job) ToJenkinsJob ¶
func (j Job) ToJenkinsJob() *JenkinsJob
type LastBuiltRevision ¶
type OverallLoad ¶
type OverallLoad struct {
}
type PrimaryView ¶
type Stage ¶
type Stage struct {
Links struct {
Self struct {
Href string `json:"href"`
} `json:"self"`
} `json:"_links"`
ID string `json:"id"`
Name string `json:"name"`
ExecNode string `json:"execNode"`
Status string `json:"status"`
StartTimeMillis int64 `json:"startTimeMillis"`
DurationMillis int `json:"durationMillis"`
PauseDurationMillis int `json:"pauseDurationMillis"`
}
type UnlabeledLoad ¶
type UnlabeledLoad struct {
Class string `json:"_class"`
}
Source Files
¶
Click to show internal directories.
Click to hide internal directories.