image

package
v0.13.1 Latest Latest
Warning

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

Go to latest
Published: Jan 19, 2020 License: Apache-2.0 Imports: 21 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetCanonicalTag

func GetCanonicalTag(ctx *context.ExecuteContext, conf *config.ImageConfig) string

GetCanonicalTag returns the canonical tag for an image config

func GetImage

func GetImage(ctx *context.ExecuteContext, conf *config.ImageConfig) (*docker.Image, error)

GetImage returns the image created by an image config

func GetImageName

func GetImageName(ctx *context.ExecuteContext, conf *config.ImageConfig) string

GetImageName returns the image name for an image config

func GetTaskConfig

func GetTaskConfig(name, action string, conf *config.ImageConfig) (types.TaskConfig, error)

GetTaskConfig returns a new TaskConfig for the action

func NewTask

func NewTask(runFunc runFunc) func(task.Name, config.Resource) types.Task

NewTask creates a new Task object

func RunBuild

func RunBuild(ctx *context.ExecuteContext, t *Task, hasModifiedDeps bool) (bool, error)

RunBuild builds an image if it is out of date

func RunPull

func RunPull(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error)

RunPull builds or pulls an image if it is out of date

func RunPush

func RunPush(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error)

RunPush pushes an image to the registry

func RunRemove

func RunRemove(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error)

RunRemove builds or pulls an image if it is out of date

func RunTag

func RunTag(ctx *context.ExecuteContext, t *Task, _ bool) (bool, error)

RunTag builds or pulls an image if it is out of date

func Stream

func Stream(out io.Writer, streamer func(out io.Writer) error) error

Stream json output to a terminal

Types

type Task

type Task struct {
	types.NoStop
	// contains filtered or unexported fields
}

Task creates a Docker image

func (*Task) ForEachTag

func (t *Task) ForEachTag(ctx *context.ExecuteContext, each func(string) error) error

ForEachTag runs a function for each tag

func (*Task) Name

func (t *Task) Name() task.Name

Name returns the name of the task

func (*Task) Repr

func (t *Task) Repr() string

Repr formats the task for logging

func (*Task) Run

func (t *Task) Run(ctx *context.ExecuteContext, depsModified bool) (bool, error)

Run builds or pulls an image if it is out of date

Jump to

Keyboard shortcuts

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