Documentation ¶
Index ¶
- Constants
- type Action
- type Artifact
- func (a Artifact) Cacheable() bool
- func (a Artifact) LocallyCached(ctx context.Context) (bool, error)
- func (a Artifact) Pull(ctx context.Context) error
- func (a Artifact) Push(ctx context.Context) error
- func (a Artifact) RemotelyCached(ctx context.Context) (bool, error)
- func (a *Artifact) UseDockerClient(client container.Docker)
- type Target
Constants ¶
const Type = "docker_image"
Type is the string value of the Target type
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Action ¶
type Action struct { Target *Target Artifact *Artifact Client container.Docker KVStore kv.Storage Logger logz.FieldLogger }
Action is the executor for building a docker image
func (*Action) UseDockerClient ¶
UseDockerClient sets this Action container.Docker client
func (*Action) UseKVStorage ¶
UseKVStorage allows the KV Storage client to be injected into the target's action
func (*Action) UseLogger ¶
func (a *Action) UseLogger(logger logz.FieldLogger)
UseLogger injects a logger into the target's action
type Artifact ¶
type Artifact struct { ark.RawArtifact `mapstructure:",squash"` URL string `json:"url" mapstructure:"url"` Client container.Docker `json:"-" mapstructure:"-"` }
Artifact is the result of a successful actions.BuildDockerImage
func (Artifact) Cacheable ¶
Cacheable always returns true because docker image may be stored remotely and locally
func (Artifact) LocallyCached ¶
LocallyCached determines if the image exists in the local docker registry by its URL
func (Artifact) RemotelyCached ¶
RemotelyCached determines if the image exists in the remote repository by its URL
func (*Artifact) UseDockerClient ¶
UseDockerClient sets this Artifact container.Docker client
type Target ¶
type Target struct { ark.RawTarget `mapstructure:",squash"` Repo string `json:"repo" mapstructure:"repo"` Dockerfile string `json:"dockerfile" mapstructure:"dockerfile"` Secrets []string `json:"secrets" mapstructure:"secrets"` DisableEntrypointInjection bool `json:"disableEntrypointInjection" mapstructure:"disableEntrypointInjection"` CacheInline bool `json:"cacheInline" mapstructure:"cacheInline"` BuildArgs map[string]*string `json:"BuildArgs" mapstructure:"buildArgs"` Output string `json:"output" mapstructure:"output"` CacheFrom []string `json:"cacheFrom" mapstructure:"cacheFrom"` }
Target expresses intention to build a docker image