Documentation
¶
Index ¶
- type Compiler
- type Config
- type Option
- func WithEnviron(env map[string]string) Option
- func WithLocal(local bool) Option
- func WithMetadata(metadata frontend.Metadata) Option
- func WithNetrc(username, password, machine string) Option
- func WithPrefix(prefix string) Option
- func WithProxy(http, https, none string) Option
- func WithVolumes(volumes ...string) Option
- func WithWorkspace(base, path string) Option
- type Stage
- type Step
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Compiler ¶
type Compiler struct {
// contains filtered or unexported fields
}
Compiler compiles the yaml
func NewCompiler ¶
NewCompiler creates a new Compiler with options.
type Config ¶
type Config struct {
// Image specifies the Docker image with
// which we run your builds.
Image string
// Clone defines the depth of Git clones
// for all pipelines.
Clone struct {
Depth int
}
// Pipeline defines the pipeline configuration
// which includes a list of all steps for default,
// tag, and branch-specific execution.
Pipelines struct {
Default Stage
Tags map[string]Stage
Branches map[string]Stage
}
}
Config defines the pipeline configuration.
func ParseBytes ¶
ParseBytes parses the configuration from bytes b.
func ParseString ¶
ParseString parses the configuration from string s.
type Option ¶
type Option func(*Compiler)
Option configures a compiler option.
func WithEnviron ¶
WithEnviron configures the compiler with environment variables added by default to every container in the pipeline.
func WithLocal ¶
WithLocal configures the compiler with the local flag. The local flag indicates the pipeline execution is running in a local development environment with a mounted local working directory.
func WithMetadata ¶
WithMetadata configutes the compiler with the repostiory, build and system metadata. The metadata is used to remove steps from the compiled pipeline configuration that should be skipped. The metadata is also added to each container as environment variables.
func WithNetrc ¶
WithNetrc configures the compiler with netrc authentication credentials added by default to every container in the pipeline.
func WithPrefix ¶
WithPrefix configures the compiler with the prefix. The prefix is used to prefix container, volume and network names to avoid collision at runtime.
func WithProxy ¶
WithProxy configures the compiler with HTTP_PROXY, HTTPS_PROXY, and NO_PROXY environment variables added by default to every container in the pipeline.
func WithVolumes ¶
WithVolumes configutes the compiler with default volumes that are mounted to each container in the pipeline.
func WithWorkspace ¶
WithWorkspace configures the compiler with the workspace base and path. The workspace base is a volume created at runtime and mounted into all containers in the pipeline. The base and path are joined to provide the working directory for all build and plugin steps in the pipeline.
type Stage ¶
Stage contains a list of steps executed for a specific branch or tag.
func (*Stage) UnmarshalYAML ¶
UnmarshalYAML implements custom parsing for the stage section of the yaml to cleanup the structure a bit.