service

package
v1.5.0 Latest Latest
Warning

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

Go to latest
Published: Sep 29, 2021 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"`
}

Context ...

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