Documentation ¶
Index ¶
- Constants
- func GetBestDockerHost(hostList []string, pipelineType, namespace string, log *zap.SugaredLogger) (string, error)
- func IToi(before interface{}, after interface{}) error
- func Min(x, y int) int
- func ToArtifactTask(sb map[string]interface{}) (*task.Artifact, error)
- func ToBuildTask(sb map[string]interface{}) (*task.Build, error)
- func ToDeployTask(sb map[string]interface{}) (*task.Deploy, error)
- func ToDistributeToS3Task(sb map[string]interface{}) (*task.DistributeToS3, error)
- func ToDockerBuildTask(sb map[string]interface{}) (*task.DockerBuild, error)
- func ToJenkinsBuildTask(sb map[string]interface{}) (*task.JenkinsBuild, error)
- func ToJiraTask(sb map[string]interface{}) (*task.Jira, error)
- func ToReleaseImageTask(sb map[string]interface{}) (*task.ReleaseImage, error)
- func ToSecurityTask(sb map[string]interface{}) (*task.Security, error)
- func ToTestingTask(sb map[string]interface{}) (*task.Testing, error)
- type BuildTaskPlugin
- func (p *BuildTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *BuildTaskPlugin) GetTask() interface{}
- func (p *BuildTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *BuildTaskPlugin) IsTaskDone() bool
- func (p *BuildTaskPlugin) IsTaskEnabled() bool
- func (p *BuildTaskPlugin) IsTaskFailed() bool
- func (p *BuildTaskPlugin) ResetError()
- func (p *BuildTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *BuildTaskPlugin) SetAckFunc(ack func())
- func (p *BuildTaskPlugin) SetBuildStatusCompleted(status config.Status)
- func (p *BuildTaskPlugin) SetEndTime()
- func (p *BuildTaskPlugin) SetStartTime()
- func (p *BuildTaskPlugin) SetStatus(status config.Status)
- func (p *BuildTaskPlugin) SetTask(t map[string]interface{}) error
- func (p *BuildTaskPlugin) Status() config.Status
- func (p *BuildTaskPlugin) TaskTimeout() int
- func (p *BuildTaskPlugin) Type() config.TaskType
- func (p *BuildTaskPlugin) Wait(ctx context.Context)
- type DeployTaskPlugin
- func (p *DeployTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *DeployTaskPlugin) GetTask() interface{}
- func (p *DeployTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *DeployTaskPlugin) IsTaskDone() bool
- func (p *DeployTaskPlugin) IsTaskEnabled() bool
- func (p *DeployTaskPlugin) IsTaskFailed() bool
- func (p *DeployTaskPlugin) ResetError()
- func (p *DeployTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, _ *task.PipelineCtx, _ string)
- func (p *DeployTaskPlugin) SetAckFunc(func())
- func (p *DeployTaskPlugin) SetEndTime()
- func (p *DeployTaskPlugin) SetStartTime()
- func (p *DeployTaskPlugin) SetStatus(status config.Status)
- func (p *DeployTaskPlugin) SetTask(t map[string]interface{}) error
- func (p *DeployTaskPlugin) Status() config.Status
- func (p *DeployTaskPlugin) TaskTimeout() int
- func (p *DeployTaskPlugin) Type() config.TaskType
- func (p *DeployTaskPlugin) Wait(ctx context.Context)
- type Distribute2S3TaskPlugin
- func (p *Distribute2S3TaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *Distribute2S3TaskPlugin) GetTask() interface{}
- func (p *Distribute2S3TaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *Distribute2S3TaskPlugin) IsTaskDone() bool
- func (p *Distribute2S3TaskPlugin) IsTaskEnabled() bool
- func (p *Distribute2S3TaskPlugin) IsTaskFailed() bool
- func (p *Distribute2S3TaskPlugin) ResetError()
- func (p *Distribute2S3TaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *Distribute2S3TaskPlugin) SetAckFunc(func())
- func (p *Distribute2S3TaskPlugin) SetEndTime()
- func (p *Distribute2S3TaskPlugin) SetStartTime()
- func (p *Distribute2S3TaskPlugin) SetStatus(status config.Status)
- func (p *Distribute2S3TaskPlugin) SetTask(t map[string]interface{}) error
- func (p *Distribute2S3TaskPlugin) Status() config.Status
- func (p *Distribute2S3TaskPlugin) TaskTimeout() int
- func (p *Distribute2S3TaskPlugin) Type() config.TaskType
- func (p *Distribute2S3TaskPlugin) Wait(ctx context.Context)
- type DockerBuildPlugin
- func (p *DockerBuildPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *DockerBuildPlugin) GetTask() interface{}
- func (p *DockerBuildPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *DockerBuildPlugin) IsTaskDone() bool
- func (p *DockerBuildPlugin) IsTaskEnabled() bool
- func (p *DockerBuildPlugin) IsTaskFailed() bool
- func (p *DockerBuildPlugin) ResetError()
- func (p *DockerBuildPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *DockerBuildPlugin) SetAckFunc(func())
- func (p *DockerBuildPlugin) SetEndTime()
- func (p *DockerBuildPlugin) SetStartTime()
- func (p *DockerBuildPlugin) SetStatus(status config.Status)
- func (p *DockerBuildPlugin) SetTask(t map[string]interface{}) error
- func (p *DockerBuildPlugin) Status() config.Status
- func (p *DockerBuildPlugin) TaskTimeout() int
- func (p *DockerBuildPlugin) Type() config.TaskType
- func (p *DockerBuildPlugin) Wait(ctx context.Context)
- type EnvArgs
- type Initiator
- type JenkinsBuildPlugin
- func (j *JenkinsBuildPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (j *JenkinsBuildPlugin) GetTask() interface{}
- func (j *JenkinsBuildPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (j *JenkinsBuildPlugin) IsTaskDone() bool
- func (j *JenkinsBuildPlugin) IsTaskEnabled() bool
- func (j *JenkinsBuildPlugin) IsTaskFailed() bool
- func (j *JenkinsBuildPlugin) ResetError()
- func (j *JenkinsBuildPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (j *JenkinsBuildPlugin) SetAckFunc(ack func())
- func (j *JenkinsBuildPlugin) SetEndTime()
- func (j *JenkinsBuildPlugin) SetStartTime()
- func (j *JenkinsBuildPlugin) SetStatus(status config.Status)
- func (j *JenkinsBuildPlugin) SetTask(t map[string]interface{}) error
- func (j *JenkinsBuildPlugin) Status() config.Status
- func (j *JenkinsBuildPlugin) TaskTimeout() int
- func (j *JenkinsBuildPlugin) Type() config.TaskType
- func (j *JenkinsBuildPlugin) Wait(ctx context.Context)
- type JiraPlugin
- func (p *JiraPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *JiraPlugin) GetTask() interface{}
- func (p *JiraPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *JiraPlugin) IsTaskDone() bool
- func (p *JiraPlugin) IsTaskEnabled() bool
- func (p *JiraPlugin) IsTaskFailed() bool
- func (p *JiraPlugin) ResetError()
- func (p *JiraPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *JiraPlugin) SetAckFunc(func())
- func (p *JiraPlugin) SetEndTime()
- func (p *JiraPlugin) SetStartTime()
- func (p *JiraPlugin) SetStatus(status config.Status)
- func (p *JiraPlugin) SetTask(t map[string]interface{}) error
- func (p *JiraPlugin) Status() config.Status
- func (p *JiraPlugin) TaskTimeout() int
- func (p *JiraPlugin) Type() config.TaskType
- func (p *JiraPlugin) Wait(ctx context.Context)
- type JobCtxBuilder
- type JobLabel
- type Preview
- type ReleaseImagePlugin
- func (p *ReleaseImagePlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *ReleaseImagePlugin) GetTask() interface{}
- func (p *ReleaseImagePlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *ReleaseImagePlugin) IsTaskDone() bool
- func (p *ReleaseImagePlugin) IsTaskEnabled() bool
- func (p *ReleaseImagePlugin) IsTaskFailed() bool
- func (p *ReleaseImagePlugin) ResetError()
- func (p *ReleaseImagePlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *ReleaseImagePlugin) SetAckFunc(func())
- func (p *ReleaseImagePlugin) SetEndTime()
- func (p *ReleaseImagePlugin) SetStartTime()
- func (p *ReleaseImagePlugin) SetStatus(status config.Status)
- func (p *ReleaseImagePlugin) SetTask(t map[string]interface{}) error
- func (p *ReleaseImagePlugin) Status() config.Status
- func (p *ReleaseImagePlugin) TaskTimeout() int
- func (p *ReleaseImagePlugin) Type() config.TaskType
- func (p *ReleaseImagePlugin) Wait(ctx context.Context)
- type SecurityPlugin
- func (p *SecurityPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *SecurityPlugin) GetTask() interface{}
- func (p *SecurityPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *SecurityPlugin) IsTaskDone() bool
- func (p *SecurityPlugin) IsTaskEnabled() bool
- func (p *SecurityPlugin) IsTaskFailed() bool
- func (p *SecurityPlugin) ResetError()
- func (p *SecurityPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *SecurityPlugin) SetAckFunc(func())
- func (p *SecurityPlugin) SetEndTime()
- func (p *SecurityPlugin) SetStartTime()
- func (p *SecurityPlugin) SetStatus(status config.Status)
- func (p *SecurityPlugin) SetTask(t map[string]interface{}) error
- func (p *SecurityPlugin) Status() config.Status
- func (p *SecurityPlugin) TaskTimeout() int
- func (p *SecurityPlugin) Type() config.TaskType
- func (p *SecurityPlugin) Wait(ctx context.Context)
- type SelectorBuilder
- type TaskPlugin
- func InitializeBuildTaskPlugin(taskType config.TaskType) TaskPlugin
- func InitializeDeployTaskPlugin(taskType config.TaskType) TaskPlugin
- func InitializeDistribute2S3TaskPlugin(taskType config.TaskType) TaskPlugin
- func InitializeDockerBuildTaskPlugin(taskType config.TaskType) TaskPlugin
- func InitializeJenkinsBuildPlugin(taskType config.TaskType) TaskPlugin
- func InitializeJiraTaskPlugin(taskType config.TaskType) TaskPlugin
- func InitializeReleaseImagePlugin(taskType config.TaskType) TaskPlugin
- func InitializeSecurityPlugin(taskType config.TaskType) TaskPlugin
- func InitializeTestTaskPlugin(taskType config.TaskType) TaskPlugin
- type TestPlugin
- func (p *TestPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
- func (p *TestPlugin) GetTask() interface{}
- func (p *TestPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
- func (p *TestPlugin) IsTaskDone() bool
- func (p *TestPlugin) IsTaskEnabled() bool
- func (p *TestPlugin) IsTaskFailed() bool
- func (p *TestPlugin) ResetError()
- func (p *TestPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, ...)
- func (p *TestPlugin) SetAckFunc(func())
- func (p *TestPlugin) SetEndTime()
- func (p *TestPlugin) SetStartTime()
- func (p *TestPlugin) SetStatus(status config.Status)
- func (p *TestPlugin) SetTask(t map[string]interface{}) error
- func (p *TestPlugin) Status() config.Status
- func (p *TestPlugin) TaskTimeout() int
- func (p *TestPlugin) Type() config.TaskType
- func (p *TestPlugin) Wait(ctx context.Context)
Constants ¶
const ( // ProductLabel ... ProductLabel = "s-product" // GroupLabel ... GroupLabel = "s-group" // ServiceLabel ... ServiceLabel = "s-service" // ConfigBackupLabel ... ConfigBackupLabel = "config-backup" // NamespaceLabel EnvNameLabel = "s-env" // EnvName ... UpdateBy = "update-by" UpdateByID = "update-by-id" UpdateTime = "update-time" )
const ( PredatorPlugin = "predator-plugin" JenkinsPlugin = "jenkins-plugin" )
const ( // BuildTaskV2Timeout ... BuildTaskV2Timeout = 60 * 60 * 3 // 60 minutes )
const ( // DeployTimeout ... DeployTimeout = 60 * 10 // 10 minutes )
const ( // Distribute2S3TaskTimeout ... Distribute2S3TaskTimeout = 60 * 10 // 10 minutes )
const ( // DockerBuildTimeout ... DockerBuildTimeout = 60 * 60 // 60 minutes )
const ( // JenkinsBuildTimeout ... JenkinsBuildTimeout = 60 * 60 * 3 // 60 minutes )
const ( // JiraTimeout ... JiraTimeout = 60 * 5 // 5 minutes )
const ( // RelealseImageTaskTimeout ... RelealseImageTaskTimeout = 60 * 5 // 5 minutes )
const (
SecurityTaskTimeout = 60 * 3 // 3 minutes
)
const ( // TestingV2TaskTimeout ... TestingV2TaskTimeout = 60 * 60 // 60 minutes )
Variables ¶
This section is empty.
Functions ¶
func GetBestDockerHost ¶
func GetBestDockerHost(hostList []string, pipelineType, namespace string, log *zap.SugaredLogger) (string, error)
选择最合适的dockerhost
func ToDistributeToS3Task ¶
func ToDistributeToS3Task(sb map[string]interface{}) (*task.DistributeToS3, error)
func ToDockerBuildTask ¶
func ToDockerBuildTask(sb map[string]interface{}) (*task.DockerBuild, error)
func ToJenkinsBuildTask ¶
func ToJenkinsBuildTask(sb map[string]interface{}) (*task.JenkinsBuild, error)
func ToReleaseImageTask ¶
func ToReleaseImageTask(sb map[string]interface{}) (*task.ReleaseImage, error)
Types ¶
type BuildTaskPlugin ¶
type BuildTaskPlugin struct { Name config.TaskType KubeNamespace string JobName string FileName string Task *task.Build Log *zap.SugaredLogger // contains filtered or unexported fields }
BuildTaskPlugin is Plugin, name should be compatible with task type
func (*BuildTaskPlugin) Complete ¶
func (p *BuildTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
Complete ...
func (*BuildTaskPlugin) Init ¶
func (p *BuildTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*BuildTaskPlugin) IsTaskEnabled ¶
func (p *BuildTaskPlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*BuildTaskPlugin) IsTaskFailed ¶
func (p *BuildTaskPlugin) IsTaskFailed() bool
IsTaskFailed ...
func (*BuildTaskPlugin) Run ¶
func (p *BuildTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
TODO: Binded Archive File logic
func (*BuildTaskPlugin) SetAckFunc ¶
func (p *BuildTaskPlugin) SetAckFunc(ack func())
func (*BuildTaskPlugin) SetBuildStatusCompleted ¶
func (p *BuildTaskPlugin) SetBuildStatusCompleted(status config.Status)
func (*BuildTaskPlugin) SetStatus ¶
func (p *BuildTaskPlugin) SetStatus(status config.Status)
SetStatus ...
func (*BuildTaskPlugin) SetTask ¶
func (p *BuildTaskPlugin) SetTask(t map[string]interface{}) error
SetTask ...
func (*BuildTaskPlugin) Type ¶
func (p *BuildTaskPlugin) Type() config.TaskType
type DeployTaskPlugin ¶
type DeployTaskPlugin struct { Name config.TaskType JobName string Task *task.Deploy Log *zap.SugaredLogger ReplaceImage string // contains filtered or unexported fields }
DeployTaskPlugin Plugin name should be compatible with task type
func (*DeployTaskPlugin) Init ¶
func (p *DeployTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*DeployTaskPlugin) IsTaskEnabled ¶
func (p *DeployTaskPlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*DeployTaskPlugin) IsTaskFailed ¶
func (p *DeployTaskPlugin) IsTaskFailed() bool
IsTaskFailed ...
func (*DeployTaskPlugin) Run ¶
func (p *DeployTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, _ *task.PipelineCtx, _ string)
func (*DeployTaskPlugin) SetAckFunc ¶
func (p *DeployTaskPlugin) SetAckFunc(func())
func (*DeployTaskPlugin) SetStatus ¶
func (p *DeployTaskPlugin) SetStatus(status config.Status)
SetStatus ...
func (*DeployTaskPlugin) SetTask ¶
func (p *DeployTaskPlugin) SetTask(t map[string]interface{}) error
type Distribute2S3TaskPlugin ¶
type Distribute2S3TaskPlugin struct { Name config.TaskType Task *task.DistributeToS3 Log *zap.SugaredLogger }
Distribute2S3TaskPlugin Plugin name should be compatible with task type
func (*Distribute2S3TaskPlugin) Complete ¶
func (p *Distribute2S3TaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
Complete ...
func (*Distribute2S3TaskPlugin) GetTask ¶
func (p *Distribute2S3TaskPlugin) GetTask() interface{}
GetTask ...
func (*Distribute2S3TaskPlugin) Init ¶
func (p *Distribute2S3TaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*Distribute2S3TaskPlugin) IsTaskDone ¶
func (p *Distribute2S3TaskPlugin) IsTaskDone() bool
IsTaskDone ...
func (*Distribute2S3TaskPlugin) IsTaskEnabled ¶
func (p *Distribute2S3TaskPlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*Distribute2S3TaskPlugin) IsTaskFailed ¶
func (p *Distribute2S3TaskPlugin) IsTaskFailed() bool
IsTaskFailed ...
func (*Distribute2S3TaskPlugin) ResetError ¶
func (p *Distribute2S3TaskPlugin) ResetError()
ResetError ...
func (*Distribute2S3TaskPlugin) Run ¶
func (p *Distribute2S3TaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
Run ...
func (*Distribute2S3TaskPlugin) SetAckFunc ¶
func (p *Distribute2S3TaskPlugin) SetAckFunc(func())
func (*Distribute2S3TaskPlugin) SetEndTime ¶
func (p *Distribute2S3TaskPlugin) SetEndTime()
SetEndTime ...
func (*Distribute2S3TaskPlugin) SetStartTime ¶
func (p *Distribute2S3TaskPlugin) SetStartTime()
SetStartTime ...
func (*Distribute2S3TaskPlugin) SetStatus ¶
func (p *Distribute2S3TaskPlugin) SetStatus(status config.Status)
SetStatus ...
func (*Distribute2S3TaskPlugin) SetTask ¶
func (p *Distribute2S3TaskPlugin) SetTask(t map[string]interface{}) error
SetTask ...
func (*Distribute2S3TaskPlugin) Status ¶
func (p *Distribute2S3TaskPlugin) Status() config.Status
Status ...
func (*Distribute2S3TaskPlugin) TaskTimeout ¶
func (p *Distribute2S3TaskPlugin) TaskTimeout() int
TaskTimeout ...
func (*Distribute2S3TaskPlugin) Type ¶
func (p *Distribute2S3TaskPlugin) Type() config.TaskType
Type ...
func (*Distribute2S3TaskPlugin) Wait ¶
func (p *Distribute2S3TaskPlugin) Wait(ctx context.Context)
Wait ...
type DockerBuildPlugin ¶
type DockerBuildPlugin struct { Name config.TaskType KubeNamespace string JobName string FileName string Task *task.DockerBuild Log *zap.SugaredLogger // contains filtered or unexported fields }
DockerBuildPlugin Plugin name should be compatible with task type
func (*DockerBuildPlugin) Complete ¶
func (p *DockerBuildPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
Complete ...
func (*DockerBuildPlugin) Init ¶
func (p *DockerBuildPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*DockerBuildPlugin) IsTaskEnabled ¶
func (p *DockerBuildPlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*DockerBuildPlugin) IsTaskFailed ¶
func (p *DockerBuildPlugin) IsTaskFailed() bool
IsTaskFailed ...
func (*DockerBuildPlugin) Run ¶
func (p *DockerBuildPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
func (*DockerBuildPlugin) SetAckFunc ¶
func (p *DockerBuildPlugin) SetAckFunc(func())
func (*DockerBuildPlugin) SetStartTime ¶
func (p *DockerBuildPlugin) SetStartTime()
SetStartTime ...
func (*DockerBuildPlugin) SetStatus ¶
func (p *DockerBuildPlugin) SetStatus(status config.Status)
SetStatus ...
func (*DockerBuildPlugin) SetTask ¶
func (p *DockerBuildPlugin) SetTask(t map[string]interface{}) error
SetTask ...
func (*DockerBuildPlugin) TaskTimeout ¶
func (p *DockerBuildPlugin) TaskTimeout() int
TaskTimeout ...
type Initiator ¶ added in v1.3.0
type Initiator func(taskType config.TaskType) TaskPlugin
Initiator function for init plugins
type JenkinsBuildPlugin ¶
type JenkinsBuildPlugin struct { Name config.TaskType KubeNamespace string JobName string FileName string Task *task.JenkinsBuild Log *zap.SugaredLogger // contains filtered or unexported fields }
JenkinsBuildPlugin is Plugin, name should be compatible with task type
func (*JenkinsBuildPlugin) Init ¶
func (j *JenkinsBuildPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*JenkinsBuildPlugin) IsTaskDone ¶
func (j *JenkinsBuildPlugin) IsTaskDone() bool
func (*JenkinsBuildPlugin) IsTaskEnabled ¶
func (j *JenkinsBuildPlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*JenkinsBuildPlugin) IsTaskFailed ¶
func (j *JenkinsBuildPlugin) IsTaskFailed() bool
func (*JenkinsBuildPlugin) Run ¶
func (j *JenkinsBuildPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
func (*JenkinsBuildPlugin) SetAckFunc ¶
func (j *JenkinsBuildPlugin) SetAckFunc(ack func())
func (*JenkinsBuildPlugin) SetStartTime ¶
func (j *JenkinsBuildPlugin) SetStartTime()
SetStartTime ...
func (*JenkinsBuildPlugin) SetStatus ¶
func (j *JenkinsBuildPlugin) SetStatus(status config.Status)
func (*JenkinsBuildPlugin) SetTask ¶
func (j *JenkinsBuildPlugin) SetTask(t map[string]interface{}) error
func (*JenkinsBuildPlugin) Status ¶
func (j *JenkinsBuildPlugin) Status() config.Status
func (*JenkinsBuildPlugin) TaskTimeout ¶
func (j *JenkinsBuildPlugin) TaskTimeout() int
TaskTimeout ...
func (*JenkinsBuildPlugin) Type ¶
func (j *JenkinsBuildPlugin) Type() config.TaskType
type JiraPlugin ¶
JiraPlugin name should be compatible with task type
func (*JiraPlugin) Init ¶
func (p *JiraPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*JiraPlugin) Run ¶
func (p *JiraPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
func (*JiraPlugin) SetAckFunc ¶
func (p *JiraPlugin) SetAckFunc(func())
func (*JiraPlugin) SetTask ¶
func (p *JiraPlugin) SetTask(t map[string]interface{}) error
SetTask ...
type JobCtxBuilder ¶
type JobCtxBuilder struct { JobName string ArchiveFile string TestReportFile string PipelineCtx *task.PipelineCtx JobCtx task.JobCtx Installs []*task.Install }
JobCtxBuilder ...
func (*JobCtxBuilder) BuildReaperContext ¶
func (b *JobCtxBuilder) BuildReaperContext(pipelineTask *task.Task, serviceName string) *types.Context
BuildReaperContext builds a yaml
type JobLabel ¶
type JobLabel struct { PipelineName string TaskID int64 TaskType string ServiceName string PipelineType string }
JobLabel is to describe labels that specify job identity
type ReleaseImagePlugin ¶
type ReleaseImagePlugin struct { Name config.TaskType KubeNamespace string JobName string FileName string Task *task.ReleaseImage Log *zap.SugaredLogger // contains filtered or unexported fields }
ReleaseImagePlugin Plugin name should be compatible with task type
func (*ReleaseImagePlugin) Complete ¶
func (p *ReleaseImagePlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)
Complete ...
func (*ReleaseImagePlugin) Init ¶
func (p *ReleaseImagePlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*ReleaseImagePlugin) IsTaskDone ¶
func (p *ReleaseImagePlugin) IsTaskDone() bool
IsTaskDone ...
func (*ReleaseImagePlugin) IsTaskEnabled ¶
func (p *ReleaseImagePlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*ReleaseImagePlugin) IsTaskFailed ¶
func (p *ReleaseImagePlugin) IsTaskFailed() bool
IsTaskFailed ...
func (*ReleaseImagePlugin) Run ¶
func (p *ReleaseImagePlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
Run ...
func (*ReleaseImagePlugin) SetAckFunc ¶
func (p *ReleaseImagePlugin) SetAckFunc(func())
func (*ReleaseImagePlugin) SetStartTime ¶
func (p *ReleaseImagePlugin) SetStartTime()
SetStartTime ...
func (*ReleaseImagePlugin) SetStatus ¶
func (p *ReleaseImagePlugin) SetStatus(status config.Status)
SetStatus ...
func (*ReleaseImagePlugin) SetTask ¶
func (p *ReleaseImagePlugin) SetTask(t map[string]interface{}) error
SetTask ...
func (*ReleaseImagePlugin) TaskTimeout ¶
func (p *ReleaseImagePlugin) TaskTimeout() int
TaskTimeout ...
type SecurityPlugin ¶
type SecurityPlugin struct { Name config.TaskType KubeNamespace string JobName string FileName string Task *task.Security Log *zap.SugaredLogger // contains filtered or unexported fields }
SecurityPlugin Plugin name should be compatible with task type
func (*SecurityPlugin) Init ¶
func (p *SecurityPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*SecurityPlugin) IsTaskEnabled ¶
func (p *SecurityPlugin) IsTaskEnabled() bool
IsTaskEnabled ...
func (*SecurityPlugin) Run ¶
func (p *SecurityPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
Run ...
func (*SecurityPlugin) SetAckFunc ¶
func (p *SecurityPlugin) SetAckFunc(func())
func (*SecurityPlugin) SetStatus ¶
func (p *SecurityPlugin) SetStatus(status config.Status)
SetStatus ...
func (*SecurityPlugin) SetTask ¶
func (p *SecurityPlugin) SetTask(t map[string]interface{}) error
SetTask ...
func (*SecurityPlugin) Status ¶
func (p *SecurityPlugin) Status() config.Status
func (*SecurityPlugin) Wait ¶
func (p *SecurityPlugin) Wait(ctx context.Context)
type SelectorBuilder ¶
type TaskPlugin ¶
type TaskPlugin interface { Init(jobname, filename string, xl *zap.SugaredLogger) // Type ... Type() config.TaskType // Status ... Status() config.Status // Run ... Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string) // Wait ... Wait(ctx context.Context) // Complete ... Complete(ctx context.Context, pipelineTask *task.Task, serviceName string) SetTask(map[string]interface{}) error GetTask() interface{} // TaskTimeout ... TaskTimeout() int // IsTaskDone ... IsTaskDone() bool // IsTaskFailed ... IsTaskFailed() bool // IsTaskEnabled ... IsTaskEnabled() bool // SetStatus ... SetStatus(status config.Status) // SetStartTime ... SetStartTime() // SetEndTime ... SetEndTime() // ResetError ... ResetError() // SetAckFunc ... SetAckFunc(func()) }
TaskPlugin ...
A Specific Task Plugin is to run one specified task.
func InitializeBuildTaskPlugin ¶
func InitializeBuildTaskPlugin(taskType config.TaskType) TaskPlugin
InitializeBuildTaskPlugin to initialize build task plugin, and return reference
func InitializeDeployTaskPlugin ¶
func InitializeDeployTaskPlugin(taskType config.TaskType) TaskPlugin
InitializeDeployTaskPlugin to initiate deploy task plugin and return ref
func InitializeDistribute2S3TaskPlugin ¶
func InitializeDistribute2S3TaskPlugin(taskType config.TaskType) TaskPlugin
InitializeDistribute2S3TaskPlugin ...
func InitializeDockerBuildTaskPlugin ¶
func InitializeDockerBuildTaskPlugin(taskType config.TaskType) TaskPlugin
InitializeDockerBuildTaskPlugin init docker build plugin
func InitializeJenkinsBuildPlugin ¶
func InitializeJenkinsBuildPlugin(taskType config.TaskType) TaskPlugin
InitializeJenkinsBuildPlugin to initialize jenkins build, and return reference
func InitializeJiraTaskPlugin ¶
func InitializeJiraTaskPlugin(taskType config.TaskType) TaskPlugin
InitializeJiraTaskPlugin to init plugin
func InitializeReleaseImagePlugin ¶
func InitializeReleaseImagePlugin(taskType config.TaskType) TaskPlugin
InitializeReleaseImagePlugin ...
func InitializeSecurityPlugin ¶
func InitializeSecurityPlugin(taskType config.TaskType) TaskPlugin
InitializeSecurityPlugin ...
func InitializeTestTaskPlugin ¶
func InitializeTestTaskPlugin(taskType config.TaskType) TaskPlugin
InitializeTestTaskPlugin ...
type TestPlugin ¶
type TestPlugin struct { Name config.TaskType KubeNamespace string JobName string FileName string Task *task.Testing Log *zap.SugaredLogger // contains filtered or unexported fields }
TestPlugin name should be compatible with task type
func (*TestPlugin) GetTask ¶
func (p *TestPlugin) GetTask() interface{}
func (*TestPlugin) Init ¶
func (p *TestPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)
Init ...
func (*TestPlugin) IsTaskDone ¶
func (p *TestPlugin) IsTaskDone() bool
func (*TestPlugin) Run ¶
func (p *TestPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)
func (*TestPlugin) SetAckFunc ¶
func (p *TestPlugin) SetAckFunc(func())
func (*TestPlugin) SetTask ¶
func (p *TestPlugin) SetTask(t map[string]interface{}) error