Documentation ¶
Index ¶
- Constants
- type BuildDriverOptions
- type Image
- type OptionFunc
- func WithBuilder(builder interface{}) OptionFunc
- func WithChildren(children ...*Image) OptionFunc
- func WithLabels(labels map[string]string) OptionFunc
- func WithParent(parent *Image) OptionFunc
- func WithPersistentLabels(persistentLabels map[string]string) OptionFunc
- func WithPersistentVars(persistentVars map[string]interface{}) OptionFunc
- func WithTags(tags ...string) OptionFunc
- func WithVars(vars map[string]interface{}) OptionFunc
- type PromoteOptions
Constants ¶
View Source
const ( // AnsiblePlaybookDriverName is the name of the driver AnsiblePlaybookDriverName = "ansible-playbook" // DockerDriverName is the name of the docekr driver DockerDriverName = "docker" // DryRunDriverName is the name of the dry run driver DryRunDriverName = "dry-run" // DefaultDriverName is the name of the dry run driver DefaultDriverName = "default" // MockDriverName is the name of the mock driver MockDriverName = "mock" )
View Source
const ( // ImageWildcardVersionSymbol is the wildcard version ImageWildcardVersionSymbol = "*" // NameFilterAttribute is the attribute's filter value to filter by name NameFilterAttribute = "name" // VersionFilterAttribute is the attribute's filter value to filter by version VersionFilterAttribute = "version" // RegistryHostFilterAttribute is the attribute's filter value to filter by registry host RegistryHostFilterAttribute = "registry" // RegistryNamespaceFilterAttribute is the attribute's filter value to filter by namespace RegistryNamespaceFilterAttribute = "namespace" // UndefinedStringValue defines an empty value rather that and empty string UndefinedStringValue = "-" )
View Source
const ( // DockerDriverName is the name for the docker promoter DockerPromoterName = "docker" // DryRunPromoterName is the name for the dry run promoter DryRunPromoterName = "dry-run" // MockPromoterName is the name for the mock promoter MockPromoterName = "mock" )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BuildDriverOptions ¶
type BuildDriverOptions struct { // AnsibleConnectionLocal is the local connection to use on ansible driver AnsibleConnectionLocal bool `yaml:"ansible_connection_local"` // AnsibleIntermediateContainerName is the name of an intermediate container that can be used during ansible build process AnsibleIntermediateContainerName string `yaml:"ansible_intermediate_container_name"` // AnsibleInventoryPath is the path to the ansible inventory file ?? AnsibleInventoryPath string `yaml:"ansible_inventory_path"` // AnsibleLimit is the ansible limit ?? AnsibleLimit string `yaml:"ansible_limit"` // BuilderOptions are those options comming from builder BuilderOptions *builder.BuilderOptions `yaml:"builder_options"` // BuilderVarMappings are those variables name that will be automatically generated by builder and set to the driver for building the image BuilderVarMappings map[string]string `yaml:"builder_variables_mapping"` // OutputPrefix prefixes each output line OutputPrefix string `yaml:"output_prefix"` // PullAuthUsername is the username to use for pulling the image PullAuthUsername string `yaml:"pull_auth_username"` // PullAuthPassword is the password to use for pulling the image PullAuthPassword string `yaml:"-"` // PullParentImage indicates whether to pull the parent image PullParentImage bool `yaml:"pull_parent_image"` // PushAuthUsername is the username to use for pushing the image PushAuthUsername string `yaml:"push_auth_username"` // PushAuthPassword is the password to use for pushing the image PushAuthPassword string `yaml:"-"` // PushImageAfterBuild flag indicate whether to push the image to the registry once it has been built PushImageAfterBuild bool `yaml:"push_image_after_build"` // RemoveImageAfterBuild flag indicate whether to remove the image after build RemoveImageAfterBuild bool `yaml:"remove_image_after_build"` }
BuildDriverOptions options required by driver to build an image
type Image ¶
type Image struct { // Builder is the builder to use to build the image Builder interface{} `yaml:"builder"` // Children list of children images Children []*Image `yaml:"-"` // Labels is a map of image labels Labels map[string]string `yaml:"labels"` // Name is the name of the image Name string `yaml:"name"` // Parent is the parent image Parent *Image `yaml:"-"` // PersistentLabels persistent labels PersistentLabels map[string]string `yaml:"persistent_labels"` // PresistentVars are persistent variables PersistentVars map[string]interface{} `yaml:"persistent_vars"` // RegistryHost is the host of the registry RegistryHost string `yaml:"registry_host"` // RegistryNamespace is the namespace of the registry RegistryNamespace string `yaml:"registry_namespace"` // Tags is a list of extra tags Tags []string `yaml:"tags"` // Vars is a map of variables Vars map[string]interface{} `yaml:"vars"` // Version is the version of the image Version string `yaml:"version"` // contains filtered or unexported fields }
Image defines the image on the system
func NewImage ¶
func NewImage(name, version, registryHost, registryNamesapace string, opt ...OptionFunc) (*Image, error)
NewImage creates a new image
func (*Image) IsWildcardImage ¶
IsWildcardImage returns true if the image is a wildcard image
func (*Image) Options ¶
func (i *Image) Options(o ...OptionFunc)
Options returns the options of the image
func (*Image) YAMLMarshal ¶
YAMLMarshal marshals the image to YAML
func (*Image) YAMLUnmarshal ¶
YAMLUnmarshal unmarshals the image from a YAML string
type OptionFunc ¶
type OptionFunc func(*Image)
OptionFunc is an option to pass to NewImage
func WithPersistentLabels ¶
func WithPersistentLabels(persistentLabels map[string]string) OptionFunc
WithPersistentLabels sets the persistent variables
func WithPersistentVars ¶
func WithPersistentVars(persistentVars map[string]interface{}) OptionFunc
WithPersistentVars sets the persistent variables
type PromoteOptions ¶
type PromoteOptions struct { // TargetImageName is the target image name TargetImageName string `yaml:"target_image_name"` // TargetImageTags list of extra tags for the target image TargetImageTags []string `yaml:"target_image_tags"` // RemoveTargetImageTags flag removes all images from local host once the image is promoted RemoveTargetImageTags bool `yaml:"remove_local_images_after_push"` // RemoteSourceImage flag use an image from remote source RemoteSourceImage bool `yaml:"use_image_from_remote_source"` // SourceImageName is the source image name SourceImageName string `yaml:"source_image_name"` // PullAuthUsername PullAuthUsername string `yaml:"pull_auth_username"` // PullAuthPassword PullAuthPassword string `yaml:"-"` // PushAuthUsername PushAuthUsername string `yaml:"push_auth_username"` // PushAuthPassword PushAuthPassword string `yaml:"-"` }
PromoteOptions
Click to show internal directories.
Click to hide internal directories.