Documentation ¶
Index ¶
- type Application
- type BuildCommandFactorier
- type Dispatcher
- type DriverFactorier
- type JobFactorier
- type MockApplication
- type Options
- type OptionsFunc
- func WithBuilders(builders repository.BuildersStorer) OptionsFunc
- func WithCommandFactory(commandFactory BuildCommandFactorier) OptionsFunc
- func WithCredentials(credentials repository.AuthFactorier) OptionsFunc
- func WithDispatch(dispatch Dispatcher) OptionsFunc
- func WithDriverFactory(driverFactory DriverFactorier) OptionsFunc
- func WithJobFactory(jobFactory JobFactorier) OptionsFunc
- func WithSemver(semver Semverser) OptionsFunc
- type PlanSteper
- type Planner
- type Semverser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Application ¶
type Application struct {
// contains filtered or unexported fields
}
Application is an application service to build docker images
func NewApplication ¶
func NewApplication(options ...OptionsFunc) *Application
NewApplication creates a Service to build docker images
func (*Application) Build ¶
func (a *Application) Build(ctx context.Context, buildPlan Planner, name string, version []string, options *Options, optionsFunc ...OptionsFunc) error
Build method carries out the application tasks
func (*Application) Options ¶
func (a *Application) Options(opts ...OptionsFunc)
Options configure the service
type BuildCommandFactorier ¶
type BuildCommandFactorier interface {
New(repository.BuildDriverer, *image.Image, *image.BuildDriverOptions) command.BuildCommander
}
BuildCommandFactorier interface defines the factory of build commands
type Dispatcher ¶
Dispatcher is a dispatcher to build docker images
type DriverFactorier ¶
type DriverFactorier interface { Get(id string) (driverfactory.BuildDriverFactoryFunc, error) Register(id string, driver driverfactory.BuildDriverFactoryFunc) error }
DriverFactorier interface defines the factory to create a build driver
type JobFactorier ¶
JobFactorier interface defines the factory of build jobs
type MockApplication ¶
MockApplication is a mock of build application
func NewMockApplication ¶
func NewMockApplication() *MockApplication
NewMockApplication return a mock of build application
type Options ¶
type Options struct { // AnsibleConnectionLocal is the local connection to use on ansible driver AnsibleConnectionLocal bool // AnsibleIntermediateContainerName is the name of an intermediate container that can be used during ansible build process AnsibleIntermediateContainerName string // AnsibleInventoryPath is the path to the ansible inventory file ?? AnsibleInventoryPath string // AnsibleLimit is the ansible limit ?? AnsibleLimit string // EnableSemanticVersionTags is a flag to enable semantic version tags EnableSemanticVersionTags bool // ImageFromName is the parent's image name ImageFromName string `yaml:"image_from_name"` // ImageFromRegistryHost is the parent's image registry host ImageFromRegistryHost string `yaml:"image_from_registry_host"` // ImageFromRegistryNamespace is the parent's image namespace ImageFromRegistryNamespace string `yaml:"image_from_namespace"` // ImageFromVersion is the paren't image version ImageFromVersion string `yaml:"image_from_version"` // ImageName is the name of the image to build ImageName string // ImageRegistryHost is the registry's host of the image to be built ImageRegistryHost string `yaml:"image_registry_host"` // ImageRegistryNamespace is the namespace of the image to be built ImageRegistryNamespace string `yaml:"image_namespace"` // ImageVersions is a list of versions to build ImageVersions []string // Lables is a list of labels to add to the image Labels map[string]string // PersistentLabels is a persistent labels list to be sent to driver PersistentLabels map[string]string `yaml:"persistent_labels"` // PersistentVars is a persistent variables list to be sent to driver PersistentVars map[string]interface{} `yaml:"persistent_variables"` // PullParentImage flag indicate whether to pull the parent image before building PullParentImage bool `yaml:"pull_parent_image"` // PushImageAfterBuild flag indicate whether to push the image to the registry once it has been built PushImageAfterBuild bool `yaml:"push_image_after_build"` // RemoveImagesAfterPush flag indicate whether to remove the image after build RemoveImagesAfterPush bool // SemanticVersionTagsTemplate are the semantic version tags templates to generate automatically SemanticVersionTagsTemplates []string `yaml:"semantic_version_tags_template"` // Tags is a list of tags to generate Tags []string `yaml:"tags"` // Vars is a variables list to be sent to driver Vars map[string]interface{} `yaml:"variables"` }
Options
type OptionsFunc ¶
type OptionsFunc func(*Application)
OptionsFunc is a function used to configure the service
func WithBuilders ¶
func WithBuilders(builders repository.BuildersStorer) OptionsFunc
WithBuilders sets the builders storer
func WithCommandFactory ¶
func WithCommandFactory(commandFactory BuildCommandFactorier) OptionsFunc
WithCommandFactory sets the command factory
func WithCredentials ¶
func WithCredentials(credentials repository.AuthFactorier) OptionsFunc
func WithDispatch ¶
func WithDispatch(dispatch Dispatcher) OptionsFunc
WithDispatch sets the dispatcher
func WithDriverFactory ¶
func WithDriverFactory(driverFactory DriverFactorier) OptionsFunc
WithDriverFactory sets the driver factory
func WithJobFactory ¶
func WithJobFactory(jobFactory JobFactorier) OptionsFunc
WithJobFactory sets the job factory
type PlanSteper ¶
PlanSteper interface defines the step plan