resource

package
v0.0.0-...-cb2ea0e Latest Latest
Warning

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

Go to latest
Published: Aug 10, 2019 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Kind = "pipeline"
	Type = "virtualbox"
)

Defines the Resource Kind and Type.

Variables

This section is empty.

Functions

This section is empty.

Types

type Pipeline

type Pipeline struct {
	Version   string              `json:"version,omitempty"`
	Kind      string              `json:"kind,omitempty"`
	Type      string              `json:"type,omitempty"`
	Name      string              `json:"name,omitempty"`
	Deps      []string            `json:"depends_on,omitempty"`
	Clone     manifest.Clone      `json:"clone,omitempty"`
	Platform  manifest.Platform   `json:"platform,omitempty"`
	Trigger   manifest.Conditions `json:"conditions,omitempty"`
	Workspace manifest.Workspace  `json:"workspace,omitempty"`

	Steps []*Step `json:"steps,omitempty"`
}

Pipeline is a pipeline resource that executes pipelines on the host machine without any virtualization.

func Lookup

func Lookup(name string, manifest *manifest.Manifest) (*Pipeline, error)

Lookup returns the named pipeline from the Manifest.

func (*Pipeline) GetDependsOn

func (p *Pipeline) GetDependsOn() []string

GetDependsOn returns the resource dependencies.

func (*Pipeline) GetKind

func (p *Pipeline) GetKind() string

GetKind returns the resource kind.

func (*Pipeline) GetName

func (p *Pipeline) GetName() string

GetName returns the resource name.

func (*Pipeline) GetPlatform

func (p *Pipeline) GetPlatform() manifest.Platform

GetPlatform returns the resource platform.

func (*Pipeline) GetStep

func (p *Pipeline) GetStep(name string) *Step

GetStep returns the named step. If no step exists with the given name, a nil value is returned.

func (*Pipeline) GetTrigger

func (p *Pipeline) GetTrigger() manifest.Conditions

GetTrigger returns the resource triggers.

func (*Pipeline) GetType

func (p *Pipeline) GetType() string

GetType returns the resource type.

func (*Pipeline) GetVersion

func (p *Pipeline) GetVersion() string

GetVersion returns the resource version.

type Step

type Step struct {
	Name        string                        `json:"name,omitempty"`
	Shell       string                        `json:"shell,omitempty"`
	DependsOn   []string                      `json:"depends_on,omitempty" yaml:"depends_on"`
	Detach      bool                          `json:"detach,omitempty"`
	Environment map[string]*manifest.Variable `json:"environment,omitempty"`
	Failure     string                        `json:"failure,omitempty"`
	Commands    []string                      `json:"commands,omitempty"`
	When        manifest.Conditions           `json:"when,omitempty"`
}

Step defines a Pipeline step.

Jump to

Keyboard shortcuts

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