Documentation ¶
Index ¶
- Constants
- Variables
- type CodeBuilderPlugin
- type CodeBuilderPluginResult
- type DeployK8sPlugin
- type ExecShellParams
- type ExecShellPlugin
- type Executor
- type ExecutorFactory
- type ExecutorParams
- type ImageBuilds
- type Logger
- type PipelineResource
- type ReleaserPlugin
- type ReleaserPluginResult
- type UpgradeAppPlugin
Constants ¶
View Source
const ( CodeBuildTypeNone = "none" CodeBuildTypeFile = "file" CodeBuildTypeScript = "script" )
View Source
const ( ResourceTypeImage = "image" ResourceTypeHost = "host" )
View Source
const PipelineRunAddReleaseVersionUri = "/api/v1/spacelet/pipeline/add_release"
Variables ¶
View Source
var WorkloadKinds = []string{"Deployment", "StatefulSet", "DaemonSet", "Job", "Pod", "CronJob"}
Functions ¶
This section is empty.
Types ¶
type CodeBuilderPlugin ¶
type CodeBuilderPlugin struct{}
CodeBuilderPlugin 流水线代码构建执行器
func (CodeBuilderPlugin) Executor ¶
func (b CodeBuilderPlugin) Executor(params *ExecutorParams) (Executor, error)
type CodeBuilderPluginResult ¶
type CodeBuilderPluginResult struct { ImageUrl string `json:"images"` ImageRegistry string `json:"image_registry"` ImageRegistryId int `json:"image_registry_id"` }
CodeBuilderPluginResult 代码构建执行结果
type DeployK8sPlugin ¶
type DeployK8sPlugin struct { *model.Models KubeClient *cluster.KubeClient }
func (DeployK8sPlugin) Executor ¶
func (p DeployK8sPlugin) Executor(params *ExecutorParams) (Executor, error)
type ExecShellParams ¶
type ExecShellPlugin ¶
type ExecShellPlugin struct{}
func (ExecShellPlugin) Executor ¶
func (b ExecShellPlugin) Executor(params *ExecutorParams) (Executor, error)
type Executor ¶
type Executor interface { // Execute 任务插件执行处理 Execute() (interface{}, error) // Cancel 取消执行 Cancel() error }
Executor 流水线任务插件执行处理器
type ExecutorFactory ¶
type ExecutorFactory interface { // Executor 创建任务插件执行器 Executor(params *ExecutorParams) (Executor, error) }
ExecutorFactory 流水线任务插件执行器工厂,不同流水线任务插件产生不同的流水线执行器
type ExecutorParams ¶
type ExecutorParams struct { JobId uint PluginKey string RootDir string Params map[string]interface{} Logger Logger }
ExecutorParams 任务插件执行参数
func NewExecutorParams ¶
func NewExecutorParams(jobId uint, pluginKey, rootDir string, params map[string]interface{}, logger Logger) *ExecutorParams
type ImageBuilds ¶
type Logger ¶
type Logger interface { io.Writer // Log 日志追加写入 Log(format string, a ...interface{}) // Reset 日志覆盖重写 Reset(format string, a ...interface{}) Close() error }
Logger 任务插件执行时调用的日志存储接口 当前存在两个日志存储 1. 在pipeline controller执行任务日志存储到db中 2. 在spacelet执行任务日志存储到文件中
type PipelineResource ¶
type ReleaserPlugin ¶
type ReleaserPlugin struct {
// contains filtered or unexported fields
}
func NewReleasePlugin ¶
func NewReleasePlugin(client *httpclient.HttpClient) *ReleaserPlugin
func (ReleaserPlugin) Executor ¶
func (b ReleaserPlugin) Executor(params *ExecutorParams) (Executor, error)
type ReleaserPluginResult ¶
type UpgradeAppPlugin ¶
type UpgradeAppPlugin struct { *model.Models KubeClient *cluster.KubeClient }
func (UpgradeAppPlugin) Executor ¶
func (p UpgradeAppPlugin) Executor(params *ExecutorParams) (Executor, error)
Click to show internal directories.
Click to hide internal directories.