gitlab

package
v1.3.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 16, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Convert

func Convert(b []byte) ([]byte, error)

Convert converts the yaml configuration file from the legacy format to the 1.0+ format.

Types

type Config

type Config struct {
	// Image specifies the Docker image with
	// which we run your builds.
	Image Image

	// Stages is used to group steps into stages,
	// where each stage is executed sequentially.
	Stages []string

	// Services is used to define a set of services
	// that should be started and linked to each
	// step in the pipeline.
	Services []*Image

	// Variables is used to customize execution,
	// such as the clone strategy.
	Variables map[string]string

	// Before contains the list of bash commands
	// that are executed in sequence before the
	// first job.
	Before internal.StringSlice `yaml:"before_script"`

	// After contains the list of bash commands
	// that are executed in sequence after the
	// last job.
	After internal.StringSlice `yaml:"after_script"`

	// Jobs is used to define individual units
	// of execution that make up a stage.
	Jobs map[string]*Job `yaml:",inline"`
}

Config defines the pipeline configuration.

type Image

type Image struct {
	Name       string
	Entrypoint []string
	Command    []string
	Alias      string
}

Image defines a Docker image.

func (*Image) UnmarshalYAML

func (i *Image) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements custom parsing for an Image.

type Job

type Job struct {
	// Name of the pipeline step.
	Name string

	// Stage is the name of the stage.
	Stage string

	// Image specifies the Docker image with
	// which we run your builds.
	Image Image

	// Script contains the list of bash commands
	// that are executed in sequence.
	Script internal.StringSlice

	// Before contains the list of bash commands
	// that are executed in sequence before the
	// primary script.
	Before internal.StringSlice `yaml:"before_script"`

	// After contains the list of bash commands
	// that are executed in sequence after the
	// primary script.
	After internal.StringSlice `yaml:"after_script"`

	// Services defines a set of services linked
	// to the job.
	Services []*Image

	// Only defines the names of branches and tags
	// for which the job will run.
	Only internal.StringSlice

	// Except defines the names of branches and tags
	// for which the job will not run.
	Except internal.StringSlice

	// Variables is used to customize execution,
	// such as the clone strategy.
	Variables map[string]string

	// Allow job to fail. Failed job doesn’t contribute
	// to commit status
	AllowFailure bool

	// Define when to run job. Can be on_success, on_failure,
	// always or manual
	When internal.StringSlice
}

Job defines a build execution unit.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL