Documentation
¶
Index ¶
- Variables
- func Cache() cache.Cache
- func Configure(c Configurable)
- func WithContext(mutator func(ctx context.Context) context.Context)
- type Artifact
- type Binaries
- type BuildVariables
- type Builder
- type Config
- type Configurable
- type Configurator
- type Configured
- type Dependencies
- type Metadata
- type Notifier
- type Publisher
- type Resolver
- type Result
- type ResultKey
- type Task
- type Version
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultBuilders is a list of default builders. DefaultBuilders = make([]Builder, 0) // DefaultPublishers is a list of default publishers. DefaultPublishers = make([]Publisher, 0) )
Functions ¶
func Configure ¶ added in v0.5.0
func Configure(c Configurable)
Configure with provided Configurable.
Types ¶
type Binaries ¶
type Binaries interface {
Configurator
Install(ctx context.Context, t *tasks.Task, destination string) error
Count() int
// contains filtered or unexported methods
}
func NewBinaries ¶ added in v0.9.0
type BuildVariables ¶ added in v0.5.1
BuildVariables will be passed to a Golang's ldflags for variable injection.
type Builder ¶ added in v0.5.0
type Builder interface {
Accepts(artifact Artifact) bool
Build(artifact Artifact, notifier Notifier) Result
}
Builder builds an artifact.
type Config ¶ added in v0.5.0
type Config struct {
// ProjectDir holds a path to the project.
ProjectDir string
// BuildDirPath holds a build directory path.
BuildDirPath []string
// Version contains the version information.
*Version
// Dependencies will hold additional Golang and pre-compiled dependencies
// that needs to be installed before running tasks.
Dependencies struct {
Golang Dependencies
Binaries
}
// Artifacts holds a list of artifacts to be built.
Artifacts []Artifact
// Builders holds a list of Builder's to be used for building project
// artifacts. If none is configured, default ones will be used.
Builders []Builder
// Publishers holds a list of Publisher's to be used for publishing project
// artifacts. If none is configured, default ones will be used.
Publishers []Publisher
// Cleaning additional cleaning tasks.
Cleaning []Task
// Checks holds a list of checks to perform.
Checks []Task
// BuildVariables holds extra list of variables to be passed to Golang's
// ldflags.
BuildVariables
// Overrides holds a list of overrides of this configuration.
Overrides []Configurator
// context.Context is standard Golang context.
context.Context //nolint:containedctx
}
Config holds configuration information.
func FillInDefaultValues ¶ added in v0.5.0
FillInDefaultValues in provided config and returns a filled one.
type Configurable ¶ added in v0.5.0
type Configurable interface {
Config() *Config
}
Configurable will allow changes of the Config structure.
type Configurator ¶ added in v0.5.0
type Configurator interface {
Configure(cfg Configurable)
}
Configurator will configure project.
type Configured ¶ added in v0.5.0
type Configured interface{}
Configured represents a configured project.
type Dependencies ¶
type Dependencies interface {
Configurator
Install(ctx context.Context, t *tasks.Task, dest string) error
Count() int
// contains filtered or unexported methods
}
func NewDependencies ¶ added in v0.5.0
func NewDependencies(deps ...string) Dependencies
type Metadata ¶ added in v0.5.0
type Metadata struct {
Name string
BuildVariables
}
Metadata holds additional contextual information.
type Notifier ¶ added in v0.5.0
type Notifier interface {
Notify(status string)
}
Notifier can notify of a pending status of long task.
type Publisher ¶ added in v0.5.0
type Publisher interface {
Accepts(artifact Artifact) bool
Publish(artifact Artifact, notifier Notifier) Result
}
Publisher publishes artifacts to a remote site.
type Resolver ¶ added in v0.5.0
type Resolver func() string
Resolver is a func that resolves to a string.
func StaticResolver ¶ added in v0.5.0
StaticResolver can be used to create a Resolver from static data.
type ResultKey ¶ added in v0.5.0
type ResultKey string
ResultKey is used to store results of a build or publish.