build

package
v0.0.0-...-fa857ea Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SerializeArgs

func SerializeArgs(buildArgs Args) []string

SerializeArgs returns build args as a list of strings

Types

type Arg

type Arg struct {
	Name  string
	Value string
}

Arg is an argument used on the build step.

func (*Arg) String

func (a *Arg) String() string

func (*Arg) UnmarshalYAML

func (a *Arg) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.

type Args

type Args []Arg

Args is a list of arguments used on the build step.

func (*Args) UnmarshalYAML

func (a *Args) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.

type DependsOn

type DependsOn []string

DependsOn represents the images that needs to be built before

func (*DependsOn) UnmarshalYAML

func (d *DependsOn) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.

type Info

type Info struct {
	Secrets          Secrets           `yaml:"secrets,omitempty"`
	Name             string            `yaml:"name,omitempty"`
	Context          string            `yaml:"context,omitempty"`
	Dockerfile       string            `yaml:"dockerfile,omitempty"`
	Target           string            `yaml:"target,omitempty"`
	Image            string            `yaml:"image,omitempty"`
	CacheFrom        cache.From        `yaml:"cache_from,omitempty"`
	Args             Args              `yaml:"args,omitempty"`
	VolumesToInclude []VolumeMounts    `yaml:"-"`
	ExportCache      cache.ExportCache `yaml:"export_cache,omitempty"`
	DependsOn        DependsOn         `yaml:"depends_on,omitempty"`
}

Info represents the build info to generate an image

func CreateDockerfileWithVolumeMounts

func CreateDockerfileWithVolumeMounts(context, image string, volumes []VolumeMounts, fs afero.Fs) (*Info, error)

CreateDockerfileWithVolumeMounts creates the Dockerfile with volume mounts and returns the BuildInfo

func (*Info) AddArgs

func (i *Info) AddArgs(previousImageArgs map[string]string) error

AddArgs add a set of args to the build information

func (*Info) Copy

func (i *Info) Copy() *Info

Copy clones the buildInfo without the pointers

func (*Info) GetDockerfilePath

func (i *Info) GetDockerfilePath(fs afero.Fs) string

GetDockerfilePath returns the path to the Dockerfile

func (*Info) MarshalYAML

func (i *Info) MarshalYAML() (interface{}, error)

MarshalYAML Implements the marshaler interface of the yaml pkg.

func (*Info) SetBuildDefaults

func (i *Info) SetBuildDefaults()

func (*Info) UnmarshalYAML

func (i *Info) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.

type ManifestBuild

type ManifestBuild map[string]*Info

ManifestBuild defines all the build section

func (*ManifestBuild) GetSvcsToBuildFromList

func (b *ManifestBuild) GetSvcsToBuildFromList(toBuild []string) []string

GetSvcsToBuildFromList returns the builds from a list and all its dependencies

func (*ManifestBuild) Validate

func (b *ManifestBuild) Validate() error

Validate validates the build section of the manifest

type Secrets

type Secrets map[string]string

Secrets represents the secrets to be injected to the build of the image

type VolumeMounts

type VolumeMounts struct {
	LocalPath  string `yaml:"local_path,omitempty"`
	RemotePath string `yaml:"remote_path,omitempty"`
}

func (VolumeMounts) MarshalYAML

func (v VolumeMounts) MarshalYAML() (interface{}, error)

MarshalYAML Implements the marshaler interface of the yaml pkg.

func (VolumeMounts) ToString

func (v VolumeMounts) ToString() string

ToString returns volume as string

func (*VolumeMounts) UnmarshalYAML

func (v *VolumeMounts) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML Implements the Unmarshaler interface of the yaml pkg.

Jump to

Keyboard shortcuts

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