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 ¶
View Source
var ( // DefaultBuilders is a list of default builders. DefaultBuilders = make([]Builder, 0) // DefaultPublishers is a list of default publishers. DefaultPublishers = make([]Publisher, 0) )
Functions ¶
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 ¶
type BuildVariables ¶
BuildVariables will be passed to a Golang's ldflags for variable injection.
type Builder ¶
type Builder interface { Accepts(artifact Artifact) bool Build(artifact Artifact, notifier Notifier) Result }
Builder builds an artifact.
type Config ¶
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 ¶
FillInDefaultValues in provided config and returns a filled one.
type Configurable ¶
type Configurable interface {
Config() *Config
}
Configurable will allow changes of the Config structure.
type Configurator ¶
type Configurator interface {
Configure(cfg Configurable)
}
Configurator will configure 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 ¶
func NewDependencies(deps ...string) Dependencies
type Metadata ¶
type Metadata struct { Name string BuildVariables }
Metadata holds additional contextual information.
type Notifier ¶
type Notifier interface {
Notify(status string)
}
Notifier can notify of a pending status of long task.
type Publisher ¶
type Publisher interface { Accepts(artifact Artifact) bool Publish(artifact Artifact, notifier Notifier) Result }
Publisher publishes artifacts to a remote site.
type Resolver ¶
type Resolver func() string
Resolver is a func that resolves to a string.
func StaticResolver ¶
StaticResolver can be used to create a Resolver from static data.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.