bitbucket

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Nov 26, 2023 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, ref string) ([]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 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
	}

	Definitions struct {
		Services map[string]*Step
		Caches   map[string]string
	}
}

Config defines the pipeline configuration.

func (*Config) Pipeline

func (c *Config) Pipeline(ref string) Stage

Pipeline returns the pipeline stage that best matches the branch and ref. If there is no matching pipeline specific to the branch or tag, the default pipeline is returned.

type Stage

type Stage struct {
	Name  string
	Steps []*Step
}

Stage contains a list of steps executed for a specific branch or tag.

func (*Stage) UnmarshalYAML

func (s *Stage) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML implements custom parsing for the stage section of the yaml to cleanup the structure a bit.

type Step

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

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

	// Script contains the list of bash commands
	// that are executed in sequence.
	Script []string

	// Variables provides environment variables
	// passed to the container at runtime.
	Variables map[string]string

	// Artifacts defines files that are to be
	// snapshotted and shared with the subsequent
	// step. This is not used, because Drone uses
	// a shared volume to share artifacts.
	Artifacts []string
}

Step defines a build execution unit.

Jump to

Keyboard shortcuts

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