manifest

package
v1.1.1 Latest Latest
Warning

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

Go to latest
Published: Oct 30, 2021 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Driver

type Driver map[string]string

Driver is used for the driver block in the manifest YAML.

func (*Driver) Scan

func (d *Driver) Scan(val interface{}) error

func (*Driver) String

func (d *Driver) String() string

func (Driver) Value

func (d Driver) Value() (driver.Value, error)

type Job

type Job struct {
	Stage     string             `yaml:",omitempty"`
	Name      string             `yaml:",omitempty"`
	Commands  []string           `yaml:",omitempty"`
	Artifacts runner.Passthrough `yaml:",omitempty"`
}

Job is the type that represents a single job to be executed in a build.

type Manifest

type Manifest struct {
	Namespace     string             `yaml:",omitempty"`
	Driver        Driver             `yaml:",omitempty"`
	Env           []string           `yaml:",omitempty"`
	Objects       runner.Passthrough `yaml:",omitempty"`
	Sources       []Source           `yaml:",omitempty"`
	Stages        []string           `yaml:",omitempty"`
	AllowFailures []string           `yaml:"allow_failures,omitempty"`
	Jobs          []Job              `yaml:",omitempty"`
}

Manifest is the type that represents a manifest for a build. This details the driver to use, variables to set, objects to place, VCS repositories to clone and the actual commands to run and in what order.

func Decode

func Decode(r io.Reader) (Manifest, error)

func Unmarshal

func Unmarshal(b []byte) (Manifest, error)

func (*Manifest) Scan

func (m *Manifest) Scan(val interface{}) error

func (*Manifest) String

func (m *Manifest) String() string

func (*Manifest) UnmarshalJSON

func (m *Manifest) UnmarshalJSON(b []byte) error

func (*Manifest) UnmarshalText

func (m *Manifest) UnmarshalText(b []byte) error

func (*Manifest) Validate

func (m *Manifest) Validate() error

func (Manifest) Value

func (m Manifest) Value() (driver.Value, error)

type Source

type Source struct {
	URL string
	Ref string
	Dir string
}

Source is the type that represents a VCS repository in a manifest.

func (Source) MarshalYAML

func (s Source) MarshalYAML() (interface{}, error)

func (*Source) UnmarshalYAML

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

UnmarshalYAML unmarshals the YAML for a source URL. Source URLs can be in the format of:

[url] [ref] => [dir]

This will correctly unmarshal the given string, and parse it accordingly. The ref, and dir parts of the string are optional. If not specified the ref will be master, and the dir will be the base of the url.

Jump to

Keyboard shortcuts

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