taskplugin

package
v1.9.9 Latest Latest
Warning

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

Go to latest
Published: Oct 24, 2023 License: Apache-2.0 Imports: 78 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ExtensionTaskTimeout = 60 * 60 * 1 // 60 minutes
	ZadigEvent           = "X-Zadig-Event"
	EventName            = "Workflow"
)
View Source
const (
	PredatorPlugin = "predator-plugin"
	JenkinsPlugin  = "jenkins-plugin"
	PackagerPlugin = "packager-plugin"

	DindServer              = "dind"
	KoderoverAgentNamespace = "koderover-agent"
)
View Source
const (
	ScanningTaskTimeout = 60 * 60 // 60 minutes
	ScanningTypeSonar   = "sonarQube"
	ScanningTypeOther   = "other"
)
View Source
const (
	// ArtifactDeployTaskV2Timeout ...
	ArtifactDeployTaskV2Timeout = 60 * 60 * 1 // 60 minutes
)
View Source
const (
	// ArtifactPackageBuildImageTaskTimeout ...
	ArtifactPackageBuildImageTaskTimeout = 60 * 5 // 5 minutes
)
View Source
const (
	BuildTaskV2Timeout = 60 * 60 * 3 // 180 minutes
)
View Source
const (
	// BuildTaskV3Timeout ...
	BuildTaskV3Timeout = 60 * 60 * 1 // 60 minutes
)
View Source
const (
	// Distribute2S3TaskTimeout ...
	Distribute2S3TaskTimeout = 60 * 10 // 10 minutes
)
View Source
const (
	// DockerBuildTimeout ...
	DockerBuildTimeout = 60 * 60 // 60 minutes
)
View Source
const (
	// JenkinsBuildTimeout ...
	JenkinsBuildTimeout = 60 * 60 * 3 // 60 minutes
)
View Source
const (
	// JiraTimeout ...
	JiraTimeout = 60 * 5 // 5 minutes
)
View Source
const (
	// RelealseImageTaskTimeout ...
	RelealseImageTaskTimeout = 60 * 5 // 5 minutes
)
View Source
const (
	SecurityTaskTimeout = 60 * 3 // 3 minutes
)
View Source
const (
	TestingV2TaskTimeout = 60 * 60 // 60 minutes
)
View Source
const (
	// TriggerTaskTimeout ...
	TriggerTaskTimeout = 60 * 60 * 1 // 60 minutes
)

Variables

This section is empty.

Functions

func CreateEnvsFromRepoInfo added in v1.9.9

func CreateEnvsFromRepoInfo(repos []*task.Repository) []*task.KeyVal

func GetBestDockerHost

func GetBestDockerHost(hostList []string, pipelineType, namespace string, log *zap.SugaredLogger) (string, error)

选择最合适的dockerhost

func GetK8sClients added in v1.9.9

func GetK8sClients(hubServerAddr, clusterID string) (crClient.Client, kubernetes.Interface, *rest.Config, crClient.Reader, error)
func GetLink(p *task.Task, baseURI string, taskType config.PipelineType) string

func GetProductInfo added in v1.9.9

func GetProductInfo(ctx context.Context, args *EnvArgs) (*types.Product, error)

func IToi

func IToi(before interface{}, after interface{}) error

func Min

func Min(x, y int) int

func PrepareDefaultWorkflowTaskEnvs added in v1.9.9

func PrepareDefaultWorkflowTaskEnvs(t *task.Task) []*task.KeyVal

System level default environment variables (every workflow type will have it)

func ToArtifactPackageTask added in v1.8.0

func ToArtifactPackageTask(sb map[string]interface{}) (*task.ArtifactPackageTaskArgs, error)

func ToArtifactTask

func ToArtifactTask(sb map[string]interface{}) (*task.ArtifactPackage, error)

func ToBuildTask

func ToBuildTask(sb map[string]interface{}) (*task.Build, error)

func ToDeployTask

func ToDeployTask(sb map[string]interface{}) (*task.Deploy, error)

func ToDistributeToS3Task

func ToDistributeToS3Task(sb map[string]interface{}) (*task.DistributeToS3, error)

func ToDockerBuildTask

func ToDockerBuildTask(sb map[string]interface{}) (*task.DockerBuild, error)

func ToExtensionTask added in v1.9.9

func ToExtensionTask(sb map[string]interface{}) (*task.Extension, error)

func ToJenkinsBuildTask

func ToJenkinsBuildTask(sb map[string]interface{}) (*task.JenkinsBuild, error)

func ToJiraTask

func ToJiraTask(sb map[string]interface{}) (*task.Jira, error)

func ToReleaseImageTask

func ToReleaseImageTask(sb map[string]interface{}) (*task.ReleaseImage, error)

func ToScanningTask added in v1.9.9

func ToScanningTask(sb map[string]interface{}) (*task.Scanning, error)

func ToSecurityTask

func ToSecurityTask(sb map[string]interface{}) (*task.Security, error)

func ToTestingTask

func ToTestingTask(sb map[string]interface{}) (*task.Testing, error)

func ToTriggerTask added in v1.8.0

func ToTriggerTask(sb map[string]interface{}) (*task.Trigger, error)

func UIType added in v1.9.9

func UIType(pipelineType config.PipelineType) string

UIType is a legacy logic copied from other part of the system

Types

type ArtifactDeployTaskPlugin added in v1.6.0

type ArtifactDeployTaskPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.Build
	Log     *zap.SugaredLogger
	Timeout <-chan time.Time
	// contains filtered or unexported fields
}

BuildTaskPlugin is Plugin, name should be compatible with task type

func (*ArtifactDeployTaskPlugin) Complete added in v1.6.0

func (p *ArtifactDeployTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*ArtifactDeployTaskPlugin) GetTask added in v1.6.0

func (p *ArtifactDeployTaskPlugin) GetTask() interface{}

GetTask ...

func (*ArtifactDeployTaskPlugin) Init added in v1.6.0

func (p *ArtifactDeployTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*ArtifactDeployTaskPlugin) IsTaskDone added in v1.6.0

func (p *ArtifactDeployTaskPlugin) IsTaskDone() bool

IsTaskDone ...

func (*ArtifactDeployTaskPlugin) IsTaskEnabled added in v1.6.0

func (p *ArtifactDeployTaskPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*ArtifactDeployTaskPlugin) IsTaskFailed added in v1.6.0

func (p *ArtifactDeployTaskPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*ArtifactDeployTaskPlugin) ResetError added in v1.6.0

func (p *ArtifactDeployTaskPlugin) ResetError()

ResetError ...

func (*ArtifactDeployTaskPlugin) Run added in v1.6.0

func (p *ArtifactDeployTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)

func (*ArtifactDeployTaskPlugin) SetAckFunc added in v1.6.0

func (p *ArtifactDeployTaskPlugin) SetAckFunc(ack func())

func (*ArtifactDeployTaskPlugin) SetBuildStatusCompleted added in v1.6.0

func (p *ArtifactDeployTaskPlugin) SetBuildStatusCompleted(status config.Status)

func (*ArtifactDeployTaskPlugin) SetEndTime added in v1.6.0

func (p *ArtifactDeployTaskPlugin) SetEndTime()

SetEndTime ...

func (*ArtifactDeployTaskPlugin) SetStartTime added in v1.6.0

func (p *ArtifactDeployTaskPlugin) SetStartTime()

SetStartTime ...

func (*ArtifactDeployTaskPlugin) SetStatus added in v1.6.0

func (p *ArtifactDeployTaskPlugin) SetStatus(status config.Status)

SetStatus ...

func (*ArtifactDeployTaskPlugin) SetTask added in v1.6.0

func (p *ArtifactDeployTaskPlugin) SetTask(t map[string]interface{}) error

SetTask ...

func (*ArtifactDeployTaskPlugin) Status added in v1.6.0

Status ...

func (*ArtifactDeployTaskPlugin) TaskTimeout added in v1.6.0

func (p *ArtifactDeployTaskPlugin) TaskTimeout() int

TaskTimeout ...

func (*ArtifactDeployTaskPlugin) Type added in v1.6.0

func (*ArtifactDeployTaskPlugin) Wait added in v1.6.0

Wait ...

type ArtifactPackageTaskPlugin added in v1.8.0

type ArtifactPackageTaskPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.ArtifactPackage
	AckFunc func()
	Log     *zap.SugaredLogger

	RealTimeProgress string
	// contains filtered or unexported fields
}

func (*ArtifactPackageTaskPlugin) Complete added in v1.8.0

func (p *ArtifactPackageTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*ArtifactPackageTaskPlugin) GetTask added in v1.8.0

func (p *ArtifactPackageTaskPlugin) GetTask() interface{}

GetTask ...

func (*ArtifactPackageTaskPlugin) Init added in v1.8.0

func (p *ArtifactPackageTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*ArtifactPackageTaskPlugin) IsTaskDone added in v1.8.0

func (p *ArtifactPackageTaskPlugin) IsTaskDone() bool

IsTaskDone ...

func (*ArtifactPackageTaskPlugin) IsTaskEnabled added in v1.8.0

func (p *ArtifactPackageTaskPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*ArtifactPackageTaskPlugin) IsTaskFailed added in v1.8.0

func (p *ArtifactPackageTaskPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*ArtifactPackageTaskPlugin) ResetError added in v1.8.0

func (p *ArtifactPackageTaskPlugin) ResetError()

ResetError ...

func (*ArtifactPackageTaskPlugin) Run added in v1.8.0

func (p *ArtifactPackageTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)

func (*ArtifactPackageTaskPlugin) SetAckFunc added in v1.8.0

func (p *ArtifactPackageTaskPlugin) SetAckFunc(f func())

func (*ArtifactPackageTaskPlugin) SetEndTime added in v1.8.0

func (p *ArtifactPackageTaskPlugin) SetEndTime()

SetEndTime ...

func (*ArtifactPackageTaskPlugin) SetProgress added in v1.8.0

func (p *ArtifactPackageTaskPlugin) SetProgress(progress string)

func (*ArtifactPackageTaskPlugin) SetStartTime added in v1.8.0

func (p *ArtifactPackageTaskPlugin) SetStartTime()

SetStartTime ...

func (*ArtifactPackageTaskPlugin) SetStatus added in v1.8.0

func (p *ArtifactPackageTaskPlugin) SetStatus(status config.Status)

SetStatus ...

func (*ArtifactPackageTaskPlugin) SetTask added in v1.8.0

func (p *ArtifactPackageTaskPlugin) SetTask(t map[string]interface{}) error

SetTask ...

func (*ArtifactPackageTaskPlugin) Status added in v1.8.0

Status ...

func (*ArtifactPackageTaskPlugin) TaskTimeout added in v1.8.0

func (p *ArtifactPackageTaskPlugin) TaskTimeout() int

TaskTimeout ...

func (*ArtifactPackageTaskPlugin) Type added in v1.8.0

Type ...

func (*ArtifactPackageTaskPlugin) Wait added in v1.8.0

Wait ...

type BuildTaskPlugin

type BuildTaskPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.Build
	Log     *zap.SugaredLogger
	Timeout <-chan time.Time
	// 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)

func (*BuildTaskPlugin) GetTask

func (p *BuildTaskPlugin) GetTask() interface{}

func (*BuildTaskPlugin) Init

func (p *BuildTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

func (*BuildTaskPlugin) IsTaskDone

func (p *BuildTaskPlugin) IsTaskDone() bool

func (*BuildTaskPlugin) IsTaskEnabled

func (p *BuildTaskPlugin) IsTaskEnabled() bool

func (*BuildTaskPlugin) IsTaskFailed

func (p *BuildTaskPlugin) IsTaskFailed() bool

func (*BuildTaskPlugin) ResetError

func (p *BuildTaskPlugin) ResetError()

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) SetEndTime

func (p *BuildTaskPlugin) SetEndTime()

func (*BuildTaskPlugin) SetStartTime

func (p *BuildTaskPlugin) SetStartTime()

func (*BuildTaskPlugin) SetStatus

func (p *BuildTaskPlugin) SetStatus(status config.Status)

func (*BuildTaskPlugin) SetTask

func (p *BuildTaskPlugin) SetTask(t map[string]interface{}) error

func (*BuildTaskPlugin) Status

func (p *BuildTaskPlugin) Status() config.Status

func (*BuildTaskPlugin) TaskTimeout

func (p *BuildTaskPlugin) TaskTimeout() int

TODO: Using time implicitly is easy to generate bugs. We need use `time.Duration` instead.

func (*BuildTaskPlugin) Type

func (p *BuildTaskPlugin) Type() config.TaskType

func (*BuildTaskPlugin) Wait

func (p *BuildTaskPlugin) Wait(ctx context.Context)

type BuildTaskV3Plugin added in v1.8.0

type BuildTaskV3Plugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.Build
	Log     *zap.SugaredLogger
	Timeout <-chan time.Time
	// contains filtered or unexported fields
}

Note: Deprecated. BuildTaskV3Plugin is Plugin, name should be compatible with task type

func (*BuildTaskV3Plugin) Complete added in v1.8.0

func (p *BuildTaskV3Plugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*BuildTaskV3Plugin) GetTask added in v1.8.0

func (p *BuildTaskV3Plugin) GetTask() interface{}

GetTask ...

func (*BuildTaskV3Plugin) Init added in v1.8.0

func (p *BuildTaskV3Plugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*BuildTaskV3Plugin) IsTaskDone added in v1.8.0

func (p *BuildTaskV3Plugin) IsTaskDone() bool

IsTaskDone ...

func (*BuildTaskV3Plugin) IsTaskEnabled added in v1.8.0

func (p *BuildTaskV3Plugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*BuildTaskV3Plugin) IsTaskFailed added in v1.8.0

func (p *BuildTaskV3Plugin) IsTaskFailed() bool

IsTaskFailed ...

func (*BuildTaskV3Plugin) ResetError added in v1.8.0

func (p *BuildTaskV3Plugin) ResetError()

ResetError ...

func (*BuildTaskV3Plugin) Run added in v1.8.0

func (p *BuildTaskV3Plugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)

func (*BuildTaskV3Plugin) SetAckFunc added in v1.8.0

func (p *BuildTaskV3Plugin) SetAckFunc(ack func())

func (*BuildTaskV3Plugin) SetBuildStatusCompleted added in v1.8.0

func (p *BuildTaskV3Plugin) SetBuildStatusCompleted(status config.Status)

func (*BuildTaskV3Plugin) SetEndTime added in v1.8.0

func (p *BuildTaskV3Plugin) SetEndTime()

SetEndTime ...

func (*BuildTaskV3Plugin) SetStartTime added in v1.8.0

func (p *BuildTaskV3Plugin) SetStartTime()

SetStartTime ...

func (*BuildTaskV3Plugin) SetStatus added in v1.8.0

func (p *BuildTaskV3Plugin) SetStatus(status config.Status)

SetStatus ...

func (*BuildTaskV3Plugin) SetTask added in v1.8.0

func (p *BuildTaskV3Plugin) SetTask(t map[string]interface{}) error

SetTask ...

func (*BuildTaskV3Plugin) Status added in v1.8.0

func (p *BuildTaskV3Plugin) Status() config.Status

Status ...

func (*BuildTaskV3Plugin) TaskTimeout added in v1.8.0

func (p *BuildTaskV3Plugin) TaskTimeout() int

TaskTimeout ...

func (*BuildTaskV3Plugin) Type added in v1.8.0

func (p *BuildTaskV3Plugin) Type() config.TaskType

func (*BuildTaskV3Plugin) Wait added in v1.8.0

func (p *BuildTaskV3Plugin) Wait(ctx context.Context)

Wait ...

type CreateK8SEnvServiceVersionRequest added in v1.9.9

type CreateK8SEnvServiceVersionRequest struct {
	ServiceName     string `json:"service_name"`
	ServiceRevision int64  `json:"service_revision"`
	ContainerName   string `json:"container_name"`
	Image           string `json:"image"`
}

type DeployTaskPlugin

type DeployTaskPlugin struct {
	Name    config.TaskType
	JobName string

	ClientSet kubernetes.Interface

	Task         *task.Deploy
	Log          *zap.SugaredLogger
	ReplaceImage string
	// contains filtered or unexported fields
}

DeployTaskPlugin Plugin name should be compatible with task type

func (*DeployTaskPlugin) Complete

func (p *DeployTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

func (*DeployTaskPlugin) GetTask

func (p *DeployTaskPlugin) GetTask() interface{}

GetTask ...

func (*DeployTaskPlugin) Init

func (p *DeployTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*DeployTaskPlugin) IsTaskDone

func (p *DeployTaskPlugin) IsTaskDone() bool

IsTaskDone ...

func (*DeployTaskPlugin) IsTaskEnabled

func (p *DeployTaskPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*DeployTaskPlugin) IsTaskFailed

func (p *DeployTaskPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*DeployTaskPlugin) ResetError

func (p *DeployTaskPlugin) ResetError()

ResetError ...

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) SetEndTime

func (p *DeployTaskPlugin) SetEndTime()

SetEndTime ...

func (*DeployTaskPlugin) SetStartTime

func (p *DeployTaskPlugin) SetStartTime()

SetStartTime ...

func (*DeployTaskPlugin) SetStatus

func (p *DeployTaskPlugin) SetStatus(status config.Status)

SetStatus ...

func (*DeployTaskPlugin) SetTask

func (p *DeployTaskPlugin) SetTask(t map[string]interface{}) error

func (*DeployTaskPlugin) Status

func (p *DeployTaskPlugin) Status() config.Status

Status ...

func (*DeployTaskPlugin) TaskTimeout

func (p *DeployTaskPlugin) TaskTimeout() int

TaskTimeout ...

func (*DeployTaskPlugin) Type

func (p *DeployTaskPlugin) Type() config.TaskType

Type ...

func (*DeployTaskPlugin) Wait

func (p *DeployTaskPlugin) Wait(ctx context.Context)

Wait ...

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

Status ...

func (*Distribute2S3TaskPlugin) TaskTimeout

func (p *Distribute2S3TaskPlugin) TaskTimeout() int

TaskTimeout ...

func (*Distribute2S3TaskPlugin) Type

Type ...

func (*Distribute2S3TaskPlugin) Wait

Wait ...

type DockerBuildPlugin

type DockerBuildPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.DockerBuild
	Log     *zap.SugaredLogger
	Timeout <-chan time.Time
	// 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) GetTask

func (p *DockerBuildPlugin) GetTask() interface{}

GetTask ...

func (*DockerBuildPlugin) Init

func (p *DockerBuildPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*DockerBuildPlugin) IsTaskDone

func (p *DockerBuildPlugin) IsTaskDone() bool

IsTaskDone ...

func (*DockerBuildPlugin) IsTaskEnabled

func (p *DockerBuildPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*DockerBuildPlugin) IsTaskFailed

func (p *DockerBuildPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*DockerBuildPlugin) ResetError

func (p *DockerBuildPlugin) ResetError()

ResetError ...

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) SetEndTime

func (p *DockerBuildPlugin) SetEndTime()

SetEndTime ...

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) Status

func (p *DockerBuildPlugin) Status() config.Status

Status ...

func (*DockerBuildPlugin) TaskTimeout

func (p *DockerBuildPlugin) TaskTimeout() int

TaskTimeout ...

func (*DockerBuildPlugin) Type

func (p *DockerBuildPlugin) Type() config.TaskType

Type ...

func (*DockerBuildPlugin) Wait

func (p *DockerBuildPlugin) Wait(ctx context.Context)

Wait ...

type EnvArgs

type EnvArgs struct {
	EnvName     string `json:"env_name"`
	ProductName string `json:"product_name"`
}

type ExtensionTaskPlugin added in v1.9.9

type ExtensionTaskPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task *task.Extension
	Log  *zap.SugaredLogger
	// contains filtered or unexported fields
}

ExtensionTaskPlugin is Plugin, name should be compatible with task type

func (*ExtensionTaskPlugin) Complete added in v1.9.9

func (p *ExtensionTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*ExtensionTaskPlugin) GetTask added in v1.9.9

func (p *ExtensionTaskPlugin) GetTask() interface{}

GetTask ...

func (*ExtensionTaskPlugin) Init added in v1.9.9

func (p *ExtensionTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*ExtensionTaskPlugin) IsTaskDone added in v1.9.9

func (p *ExtensionTaskPlugin) IsTaskDone() bool

IsTaskDone ...

func (*ExtensionTaskPlugin) IsTaskEnabled added in v1.9.9

func (p *ExtensionTaskPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*ExtensionTaskPlugin) IsTaskFailed added in v1.9.9

func (p *ExtensionTaskPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*ExtensionTaskPlugin) ResetError added in v1.9.9

func (p *ExtensionTaskPlugin) ResetError()

ResetError ...

func (*ExtensionTaskPlugin) Run added in v1.9.9

func (p *ExtensionTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)

func (*ExtensionTaskPlugin) SetAckFunc added in v1.9.9

func (p *ExtensionTaskPlugin) SetAckFunc(ack func())

func (*ExtensionTaskPlugin) SetEndTime added in v1.9.9

func (p *ExtensionTaskPlugin) SetEndTime()

SetEndTime ...

func (*ExtensionTaskPlugin) SetExtensionStatusCompleted added in v1.9.9

func (p *ExtensionTaskPlugin) SetExtensionStatusCompleted(status config.Status)

func (*ExtensionTaskPlugin) SetStartTime added in v1.9.9

func (p *ExtensionTaskPlugin) SetStartTime()

SetStartTime ...

func (*ExtensionTaskPlugin) SetStatus added in v1.9.9

func (p *ExtensionTaskPlugin) SetStatus(status config.Status)

SetStatus ...

func (*ExtensionTaskPlugin) SetTask added in v1.9.9

func (p *ExtensionTaskPlugin) SetTask(t map[string]interface{}) error

SetTask ...

func (*ExtensionTaskPlugin) Status added in v1.9.9

func (p *ExtensionTaskPlugin) Status() config.Status

Status ...

func (*ExtensionTaskPlugin) TaskTimeout added in v1.9.9

func (p *ExtensionTaskPlugin) TaskTimeout() int

TaskTimeout ...

func (*ExtensionTaskPlugin) Type added in v1.9.9

func (*ExtensionTaskPlugin) Wait added in v1.9.9

func (p *ExtensionTaskPlugin) Wait(ctx context.Context)

Wait ...

type HelmDeployTaskPlugin added in v1.9.9

type HelmDeployTaskPlugin struct {
	Name    config.TaskType
	JobName string

	Task         *task.Deploy
	Log          *zap.SugaredLogger
	ReplaceImage string

	ContentPlugins []*HelmDeployTaskPlugin
	// contains filtered or unexported fields
}

HelmDeployTaskPlugin Plugin name should be compatible with task type

func InitializeHelmDeployTaskPlugin added in v1.9.9

func InitializeHelmDeployTaskPlugin(taskType config.TaskType) *HelmDeployTaskPlugin

InitializeHelmDeployTaskPlugin initiates a plugin to deploy helm charts and return ref

func (*HelmDeployTaskPlugin) Complete added in v1.9.9

func (p *HelmDeployTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

func (*HelmDeployTaskPlugin) GetTask added in v1.9.9

func (p *HelmDeployTaskPlugin) GetTask() interface{}

GetTask ...

func (*HelmDeployTaskPlugin) Init added in v1.9.9

func (p *HelmDeployTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

func (*HelmDeployTaskPlugin) IsTaskDone added in v1.9.9

func (p *HelmDeployTaskPlugin) IsTaskDone() bool

IsTaskDone ...

func (*HelmDeployTaskPlugin) IsTaskEnabled added in v1.9.9

func (p *HelmDeployTaskPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*HelmDeployTaskPlugin) IsTaskFailed added in v1.9.9

func (p *HelmDeployTaskPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*HelmDeployTaskPlugin) ResetError added in v1.9.9

func (p *HelmDeployTaskPlugin) ResetError()

ResetError ...

func (*HelmDeployTaskPlugin) Run added in v1.9.9

func (p *HelmDeployTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, _ *task.PipelineCtx, _ string)

func (*HelmDeployTaskPlugin) SetAckFunc added in v1.9.9

func (p *HelmDeployTaskPlugin) SetAckFunc(func())

func (*HelmDeployTaskPlugin) SetEndTime added in v1.9.9

func (p *HelmDeployTaskPlugin) SetEndTime()

SetEndTime ...

func (*HelmDeployTaskPlugin) SetStartTime added in v1.9.9

func (p *HelmDeployTaskPlugin) SetStartTime()

SetStartTime ...

func (*HelmDeployTaskPlugin) SetStatus added in v1.9.9

func (p *HelmDeployTaskPlugin) SetStatus(status config.Status)

func (*HelmDeployTaskPlugin) SetTask added in v1.9.9

func (p *HelmDeployTaskPlugin) SetTask(t map[string]interface{}) error

func (*HelmDeployTaskPlugin) Status added in v1.9.9

func (p *HelmDeployTaskPlugin) Status() config.Status

func (*HelmDeployTaskPlugin) TaskTimeout added in v1.9.9

func (p *HelmDeployTaskPlugin) TaskTimeout() int

func (*HelmDeployTaskPlugin) Type added in v1.9.9

func (*HelmDeployTaskPlugin) Wait added in v1.9.9

func (p *HelmDeployTaskPlugin) Wait(ctx context.Context)

Wait ...

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
	Timeout  <-chan time.Time
	// contains filtered or unexported fields
}

JenkinsBuildPlugin is Plugin, name should be compatible with task type

func (*JenkinsBuildPlugin) Complete

func (j *JenkinsBuildPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

func (*JenkinsBuildPlugin) GetTask

func (j *JenkinsBuildPlugin) GetTask() interface{}

GetTask ...

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) ResetError

func (j *JenkinsBuildPlugin) ResetError()

ResetError ...

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) SetEndTime

func (j *JenkinsBuildPlugin) SetEndTime()

SetEndTime ...

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 (*JenkinsBuildPlugin) Wait

func (j *JenkinsBuildPlugin) Wait(ctx context.Context)

Wait ...

type JiraPlugin

type JiraPlugin struct {
	Name config.TaskType
	Task *task.Jira
	Log  *zap.SugaredLogger
}

JiraPlugin name should be compatible with task type

func (*JiraPlugin) Complete

func (p *JiraPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*JiraPlugin) GetTask

func (p *JiraPlugin) GetTask() interface{}

GetTask ...

func (*JiraPlugin) Init

func (p *JiraPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*JiraPlugin) IsTaskDone

func (p *JiraPlugin) IsTaskDone() bool

IsTaskDone ...

func (*JiraPlugin) IsTaskEnabled

func (p *JiraPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*JiraPlugin) IsTaskFailed

func (p *JiraPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*JiraPlugin) ResetError

func (p *JiraPlugin) ResetError()

ResetError ...

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) SetEndTime

func (p *JiraPlugin) SetEndTime()

SetEndTime ...

func (*JiraPlugin) SetStartTime

func (p *JiraPlugin) SetStartTime()

SetStartTime ...

func (*JiraPlugin) SetStatus

func (p *JiraPlugin) SetStatus(status config.Status)

SetStatus ...

func (*JiraPlugin) SetTask

func (p *JiraPlugin) SetTask(t map[string]interface{}) error

SetTask ...

func (*JiraPlugin) Status

func (p *JiraPlugin) Status() config.Status

Status ...

func (*JiraPlugin) TaskTimeout

func (p *JiraPlugin) TaskTimeout() int

TaskTimeout ...

func (*JiraPlugin) Type

func (p *JiraPlugin) Type() config.TaskType

Type ...

func (*JiraPlugin) Wait

func (p *JiraPlugin) Wait(ctx context.Context)

Wait ...

type JobCtxBuilder

type JobCtxBuilder struct {
	JobName        string
	ArchiveFile    string
	TestReportFile string
	PipelineCtx    *task.PipelineCtx
	JobCtx         task.JobCtx
	Installs       []*task.Install
}

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 Preview

type Preview struct {
	TaskType config.TaskType `json:"type"`
	Enabled  bool            `json:"enabled"`
}

func ToPreview

func ToPreview(sb map[string]interface{}) (*Preview, error)

type ReleaseImagePlugin

type ReleaseImagePlugin struct {
	Name          config.TaskType
	HubServerAddr string
	KubeNamespace string
	JobName       string
	FileName      string

	Task *task.ReleaseImage
	Log  *zap.SugaredLogger

	StorageURI string
	Timeout    <-chan time.Time
	// 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) GetTask

func (p *ReleaseImagePlugin) GetTask() interface{}

GetTask ...

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) ResetError

func (p *ReleaseImagePlugin) ResetError()

ResetError ...

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) SetEndTime

func (p *ReleaseImagePlugin) SetEndTime()

SetEndTime ...

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) Status

func (p *ReleaseImagePlugin) Status() config.Status

Status ...

func (*ReleaseImagePlugin) TaskTimeout

func (p *ReleaseImagePlugin) TaskTimeout() int

TaskTimeout ...

func (*ReleaseImagePlugin) Type

Type ...

func (*ReleaseImagePlugin) Wait

func (p *ReleaseImagePlugin) Wait(ctx context.Context)

Wait ...

type ResourceComponentSet added in v1.7.0

type ResourceComponentSet interface {
	GetName() string
	GetAnnotations() map[string]string
	GetContainers() []*resource.ContainerImage
	GetKind() string
}

type ScanPlugin added in v1.9.9

type ScanPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.Scanning
	Log     *zap.SugaredLogger
	Timeout <-chan time.Time
	// contains filtered or unexported fields
}

func (*ScanPlugin) Complete added in v1.9.9

func (p *ScanPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

func (*ScanPlugin) GetTask added in v1.9.9

func (p *ScanPlugin) GetTask() interface{}

func (*ScanPlugin) Init added in v1.9.9

func (p *ScanPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

func (*ScanPlugin) IsTaskDone added in v1.9.9

func (p *ScanPlugin) IsTaskDone() bool

func (*ScanPlugin) IsTaskEnabled added in v1.9.9

func (p *ScanPlugin) IsTaskEnabled() bool

scan job is a standalone job so it is always enabled

func (*ScanPlugin) IsTaskFailed added in v1.9.9

func (p *ScanPlugin) IsTaskFailed() bool

func (*ScanPlugin) ResetError added in v1.9.9

func (p *ScanPlugin) ResetError()

func (*ScanPlugin) Run added in v1.9.9

func (p *ScanPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)

func (*ScanPlugin) SetAckFunc added in v1.9.9

func (p *ScanPlugin) SetAckFunc(func())

func (*ScanPlugin) SetEndTime added in v1.9.9

func (p *ScanPlugin) SetEndTime()

func (*ScanPlugin) SetStartTime added in v1.9.9

func (p *ScanPlugin) SetStartTime()

func (*ScanPlugin) SetStatus added in v1.9.9

func (p *ScanPlugin) SetStatus(status config.Status)

func (*ScanPlugin) SetTask added in v1.9.9

func (p *ScanPlugin) SetTask(t map[string]interface{}) error

func (*ScanPlugin) Status added in v1.9.9

func (p *ScanPlugin) Status() config.Status

func (*ScanPlugin) TaskTimeout added in v1.9.9

func (p *ScanPlugin) TaskTimeout() int

func (*ScanPlugin) Type added in v1.9.9

func (p *ScanPlugin) Type() config.TaskType

func (*ScanPlugin) Wait added in v1.9.9

func (p *ScanPlugin) Wait(ctx context.Context)

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) Complete

func (p *SecurityPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*SecurityPlugin) GetTask

func (p *SecurityPlugin) GetTask() interface{}

GetTask ...

func (*SecurityPlugin) Init

func (p *SecurityPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*SecurityPlugin) IsTaskDone

func (p *SecurityPlugin) IsTaskDone() bool

IsTaskDone ...

func (*SecurityPlugin) IsTaskEnabled

func (p *SecurityPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*SecurityPlugin) IsTaskFailed

func (p *SecurityPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*SecurityPlugin) ResetError

func (p *SecurityPlugin) ResetError()

ResetError ...

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) SetEndTime

func (p *SecurityPlugin) SetEndTime()

SetEndTime ...

func (*SecurityPlugin) SetStartTime

func (p *SecurityPlugin) SetStartTime()

SetStartTime ...

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) TaskTimeout

func (p *SecurityPlugin) TaskTimeout() int

TaskTimeout ...

func (*SecurityPlugin) Type

func (p *SecurityPlugin) Type() config.TaskType

Type ...

func (*SecurityPlugin) Wait

func (p *SecurityPlugin) Wait(ctx context.Context)

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 InitializeArtifactPackagePlugin added in v1.8.0

func InitializeArtifactPackagePlugin(taskType config.TaskType) TaskPlugin

InitializeArtifactPackagePlugin to ini

func InitializeArtifactTaskPlugin added in v1.6.0

func InitializeArtifactTaskPlugin(taskType config.TaskType) TaskPlugin

InitializeArtifactTaskPlugin to initialize build task plugin, and return reference

func InitializeBuildTaskPlugin

func InitializeBuildTaskPlugin(taskType config.TaskType) TaskPlugin

InitializeBuildTaskPlugin to initialize build task plugin, and return reference

func InitializeBuildTaskV3Plugin added in v1.8.0

func InitializeBuildTaskV3Plugin(taskType config.TaskType) TaskPlugin

InitializeBuildTaskV3Plugin 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

Note: Deprecated. InitializeDockerBuildTaskPlugin init docker build plugin

func InitializeExtensionTaskPlugin added in v1.9.9

func InitializeExtensionTaskPlugin(taskType config.TaskType) TaskPlugin

InitializeExtensionTaskPlugin to initialize build task plugin, and return reference

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 InitializeScanningTaskPlugin added in v1.9.9

func InitializeScanningTaskPlugin(taskType config.TaskType) TaskPlugin

func InitializeSecurityPlugin

func InitializeSecurityPlugin(taskType config.TaskType) TaskPlugin

InitializeSecurityPlugin ...

func InitializeTestTaskPlugin

func InitializeTestTaskPlugin(taskType config.TaskType) TaskPlugin

func InitializeTriggerTaskPlugin added in v1.8.0

func InitializeTriggerTaskPlugin(taskType config.TaskType) TaskPlugin

InitializeTriggerTaskPlugin to initialize build task plugin, and return reference

type TestPlugin

type TestPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task    *task.Testing
	Log     *zap.SugaredLogger
	Timeout <-chan time.Time
	// contains filtered or unexported fields
}

TestPlugin name should be compatible with task type

func (*TestPlugin) Complete

func (p *TestPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

func (*TestPlugin) GetTask

func (p *TestPlugin) GetTask() interface{}

func (*TestPlugin) Init

func (p *TestPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

func (*TestPlugin) IsTaskDone

func (p *TestPlugin) IsTaskDone() bool

func (*TestPlugin) IsTaskEnabled

func (p *TestPlugin) IsTaskEnabled() bool

func (*TestPlugin) IsTaskFailed

func (p *TestPlugin) IsTaskFailed() bool

func (*TestPlugin) ResetError

func (p *TestPlugin) ResetError()

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) SetEndTime

func (p *TestPlugin) SetEndTime()

func (*TestPlugin) SetStartTime

func (p *TestPlugin) SetStartTime()

func (*TestPlugin) SetStatus

func (p *TestPlugin) SetStatus(status config.Status)

func (*TestPlugin) SetTask

func (p *TestPlugin) SetTask(t map[string]interface{}) error

func (*TestPlugin) Status

func (p *TestPlugin) Status() config.Status

func (*TestPlugin) TaskTimeout

func (p *TestPlugin) TaskTimeout() int

func (*TestPlugin) Type

func (p *TestPlugin) Type() config.TaskType

func (*TestPlugin) Wait

func (p *TestPlugin) Wait(ctx context.Context)

type TriggerTaskPlugin added in v1.8.0

type TriggerTaskPlugin struct {
	Name          config.TaskType
	KubeNamespace string
	JobName       string
	FileName      string

	Task *task.Trigger
	Log  *zap.SugaredLogger
	// contains filtered or unexported fields
}

TriggerTaskPlugin is Plugin, name should be compatible with task type

func (*TriggerTaskPlugin) Complete added in v1.8.0

func (p *TriggerTaskPlugin) Complete(ctx context.Context, pipelineTask *task.Task, serviceName string)

Complete ...

func (*TriggerTaskPlugin) GetTask added in v1.8.0

func (p *TriggerTaskPlugin) GetTask() interface{}

GetTask ...

func (*TriggerTaskPlugin) Init added in v1.8.0

func (p *TriggerTaskPlugin) Init(jobname, filename string, xl *zap.SugaredLogger)

Init ...

func (*TriggerTaskPlugin) IsTaskDone added in v1.8.0

func (p *TriggerTaskPlugin) IsTaskDone() bool

IsTaskDone ...

func (*TriggerTaskPlugin) IsTaskEnabled added in v1.8.0

func (p *TriggerTaskPlugin) IsTaskEnabled() bool

IsTaskEnabled ...

func (*TriggerTaskPlugin) IsTaskFailed added in v1.8.0

func (p *TriggerTaskPlugin) IsTaskFailed() bool

IsTaskFailed ...

func (*TriggerTaskPlugin) ResetError added in v1.8.0

func (p *TriggerTaskPlugin) ResetError()

ResetError ...

func (*TriggerTaskPlugin) Run added in v1.8.0

func (p *TriggerTaskPlugin) Run(ctx context.Context, pipelineTask *task.Task, pipelineCtx *task.PipelineCtx, serviceName string)

func (*TriggerTaskPlugin) SetAckFunc added in v1.8.0

func (p *TriggerTaskPlugin) SetAckFunc(ack func())

func (*TriggerTaskPlugin) SetEndTime added in v1.8.0

func (p *TriggerTaskPlugin) SetEndTime()

SetEndTime ...

func (*TriggerTaskPlugin) SetStartTime added in v1.8.0

func (p *TriggerTaskPlugin) SetStartTime()

SetStartTime ...

func (*TriggerTaskPlugin) SetStatus added in v1.8.0

func (p *TriggerTaskPlugin) SetStatus(status config.Status)

SetStatus ...

func (*TriggerTaskPlugin) SetTask added in v1.8.0

func (p *TriggerTaskPlugin) SetTask(t map[string]interface{}) error

SetTask ...

func (*TriggerTaskPlugin) SetTriggerStatusCompleted added in v1.8.0

func (p *TriggerTaskPlugin) SetTriggerStatusCompleted(status config.Status)

func (*TriggerTaskPlugin) Status added in v1.8.0

func (p *TriggerTaskPlugin) Status() config.Status

Status ...

func (*TriggerTaskPlugin) TaskTimeout added in v1.8.0

func (p *TriggerTaskPlugin) TaskTimeout() int

TaskTimeout ...

func (*TriggerTaskPlugin) Type added in v1.8.0

func (p *TriggerTaskPlugin) Type() config.TaskType

func (*TriggerTaskPlugin) Wait added in v1.8.0

func (p *TriggerTaskPlugin) Wait(ctx context.Context)

Wait ...

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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