Documentation ¶
Index ¶
- Variables
- type BuildResult
- type BuildStatus
- type BuildStatusData
- type Builder
- func (b *Builder) AddToBuildQueue(opts BuilderOptions) (BuildResult, error)
- func (b *Builder) Close() error
- func (b *Builder) GetBuildStatus(imageName string) (BuildStatusData, error)
- func (b *Builder) SetBuildStatus(imageName string, data BuildStatusData) error
- func (b *Builder) Start()
- func (b *Builder) UpdateBuildStatus(imageName string, data BuildStatusData) error
- type BuilderOptions
- type CatchLogsHook
- type GitOptions
- type ImageOptions
- type Kaniko
- type KanikoInterface
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrBuildNotFound = errors.New("build not found")
Functions ¶
This section is empty.
Types ¶
type BuildResult ¶
type BuildStatus ¶
type BuildStatus int
const ( StatusPending BuildStatus = iota + 1 StatusBuilding StatusSucceeded StatusFailed )
func (BuildStatus) String ¶
func (status BuildStatus) String() string
type BuildStatusData ¶
type BuildStatusData struct { Status BuildStatus `json:"status"` StatusString string `json:"status_string"` ErrorMsg string `json:"error"` StartTime time.Time `json:"start_time"` EndTime time.Time `json:"end_time"` Logs string `json:"logs"` }
func (BuildStatusData) MarshalBinary ¶
func (d BuildStatusData) MarshalBinary() ([]byte, error)
func (*BuildStatusData) UnmarshalBinary ¶
func (d *BuildStatusData) UnmarshalBinary(data []byte) error
type Builder ¶
type Builder struct { Queue *redisqueue.Queue // contains filtered or unexported fields }
func (*Builder) AddToBuildQueue ¶
func (b *Builder) AddToBuildQueue(opts BuilderOptions) (BuildResult, error)
func (*Builder) GetBuildStatus ¶
func (b *Builder) GetBuildStatus(imageName string) (BuildStatusData, error)
func (*Builder) SetBuildStatus ¶
func (b *Builder) SetBuildStatus(imageName string, data BuildStatusData) error
func (*Builder) Start ¶
func (b *Builder) Start()
Start starts the builder worker where it dequeues the build requests from the queue and builds the images using Kaniko and pushes them to the registry
func (*Builder) UpdateBuildStatus ¶
func (b *Builder) UpdateBuildStatus(imageName string, data BuildStatusData) error
type BuilderOptions ¶
type BuilderOptions struct { DockerfilePath string `json:"dockerfile_path"` Git GitOptions `json:"git_options"` CustomPlatform string `json:"custom_platform"` Image ImageOptions `json:"image"` BuildArgs []string `json:"build_args"` }
func (BuilderOptions) MarshalBinary ¶
func (b BuilderOptions) MarshalBinary() ([]byte, error)
func (*BuilderOptions) UnmarshalBinary ¶
func (b *BuilderOptions) UnmarshalBinary(data []byte) error
type CatchLogsHook ¶
func NewCatchLogsHook ¶
func NewCatchLogsHook() *CatchLogsHook
func (*CatchLogsHook) Fire ¶
func (h *CatchLogsHook) Fire(entry *logrus.Entry) error
Fire is triggered when a log event is fired
func (*CatchLogsHook) Levels ¶
func (h *CatchLogsHook) Levels() []logrus.Level
func (*CatchLogsHook) StreamNewLogs ¶
func (h *CatchLogsHook) StreamNewLogs() (chan string, func())
StreamNewLogs continuously streams new logs since the last read position
type GitOptions ¶
type ImageOptions ¶
type Kaniko ¶
type Kaniko struct{}
func (*Kaniko) GetBuildContext ¶
func (k *Kaniko) GetBuildContext(srcContext string, opts buildcontext.BuildOptions) (buildcontext.BuildContext, error)
type KanikoInterface ¶
type KanikoInterface interface { GetBuildContext(srcContext string, opts buildcontext.BuildOptions) (buildcontext.BuildContext, error) DoBuild(opts *config.KanikoOptions) (v1.Image, error) DoPush(image v1.Image, opts *config.KanikoOptions) error }
Click to show internal directories.
Click to hide internal directories.