plugins

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2023 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

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

This section is empty.

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 ExecShellParams

type ExecShellParams struct {
	JobId uint `json:"job_id"`

	Resource PipelineResource       `json:"resource"`
	Port     string                 `json:"port"`
	Shell    string                 `json:"shell"`
	Script   string                 `json:"script"`
	Env      map[string]interface{} `json:"env"`
}

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 Pipeline task plug-in executor factory, different pipeline task plug-ins generate different pipeline executors

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 ImageBuilds struct {
	Dockerfile string `json:"dockerfile"`
	Image      string `json:"image"`
}

type Logger

type Logger interface {
	io.Writer

	// Log 日志追加写入
	Log(format string, a ...interface{})

	// Reset 日志覆盖重写
	Reset(format string, a ...interface{})

	Close() error
}

Logger The log storage interface called when the Logger task plug-in is executed Currently there are two log stores 1. The task log executed in the pipeline controller is stored in the db. 2. Store the task log executed in the pipeflow to a file

type PipelineResource

type PipelineResource struct {
	Type   string        `json:"type"`
	Value  string        `json:"value"`
	Secret *types.Secret `json:"secret"`
}

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 ReleaserPluginResult struct {
	Version string `json:"version"`
	Images  string `json:"images"`
}

Jump to

Keyboard shortcuts

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