service

package
v1.13.0 Latest Latest
Warning

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

Go to latest
Published: Jul 8, 2022 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Context

type Context struct {
	JobType        string            `yaml:"job_type"`
	DockerRegistry *DockerRegistry   `yaml:"docker_registry"`
	DockerBuildCtx *DockerBuildCtx   `yaml:"build_ctx"`
	OnSetup        string            `yaml:"setup,omitempty"`
	ReleaseImages  []RepoImage       `yaml:"release_images"`
	DistributeList []*DistributeInfo `yaml:"distribute_info"`
}

Context ...

type DistributeInfo added in v1.9.9

type DistributeInfo struct {
	Image               string `yaml:"image"`
	ReleaseName         string `yaml:"release_name"`
	DistributeStartTime int64  `yaml:"distribute_start_time"`
	DistributeEndTime   int64  `yaml:"distribute_end_time"`
	DistributeStatus    string `yaml:"distribute_status"`
	DeployEnabled       bool   `yaml:"deploy_enabled"`
	DeployEnv           string `yaml:"deploy_env"`
	DeployNamespace     string `yaml:"deploy_namespace"`
	DeployStartTime     int64  `yaml:"deploy_start_time"`
	DeployEndTime       int64  `yaml:"deploy_end_time"`
	DeployStatus        string `yaml:"deploy_status"`
	RepoID              string `yaml:"repo_id"`
	RepoAK              string `yaml:"repo_ak"`
	RepoSK              string `yaml:"repo_sk"`
}

DistributeInfo will be convert into yaml, adding yaml

type DockerBuildCtx

type DockerBuildCtx struct {
	WorkDir         string `yaml:"work_dir"`
	DockerFile      string `yaml:"docker_file"`
	ImageName       string `yaml:"image_name"`
	BuildArgs       string `yaml:"build_args"`
	ImageReleaseTag string `yaml:"image_release_tag,omitempty"`
}

DockerBuildCtx ... Docker build参数 WorkDir: docker build执行路径 DockerFile: dockerfile名称, 默认为Dockerfile ImageBuild: build image镜像全称, e.g. xxx.com/release-candidates/image:tag

func (*DockerBuildCtx) GetDockerFile

func (buildCtx *DockerBuildCtx) GetDockerFile() string

GetDockerFile ...

type DockerRegistry

type DockerRegistry struct {
	Host      string `yaml:"host"`
	UserName  string `yaml:"username"`
	Password  string `yaml:"password"`
	Namespace string `yaml:"namespace"`
}

DockerRegistry registry host/user/password

type Predator

type Predator struct {
	Ctx *Context
}

Predator ...

func NewPredator

func NewPredator() (*Predator, error)

func (*Predator) AfterExec

func (p *Predator) AfterExec() error

AfterExec ...

func (*Predator) BeforeExec

func (p *Predator) BeforeExec() error

BeforeExec ...

func (*Predator) Exec

func (p *Predator) Exec() error

Exec ...

type RepoImage

type RepoImage struct {
	//RepoID    string `json:"repo_id"   bson:"repo_id"`
	Name      string `yaml:"name"`
	Username  string `yaml:"username"`
	Password  string `yaml:"password"`
	Host      string `yaml:"host"`
	Namespace string `yaml:"namespace"`
}

Jump to

Keyboard shortcuts

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