resource

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: BlueOak-1.0.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

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

Defines the Resource Kind and Type.

Variables

This section is empty.

Functions

func Lookup

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

Lookup returns the named pipeline from the Manifest.

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"`
	Concurrency manifest.Concurrency `json:"concurrency,omitempty"`
	Node        map[string]string    `json:"node,omitempty"`
	Platform    manifest.Platform    `json:"platform,omitempty"`
	Trigger     manifest.Conditions  `json:"conditions,omitempty"`

	Image string `json:"image,omitempty"`

	Environment map[string]string `json:"environment,omitempty"`
	Steps       []*Step           `json:"steps,omitempty"`
	Workspace   Workspace         `json:"workspace,omitempty"`
}

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

func (*Pipeline) GetConcurrency

func (p *Pipeline) GetConcurrency() manifest.Concurrency

GetConcurrency returns the resource concurrency limits.

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) GetNodes

func (p *Pipeline) GetNodes() map[string]string

GetNodes returns the resource node labels.

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 {
	Commands    []string                      `json:"commands,omitempty"`
	Detach      bool                          `json:"detach,omitempty"`
	DependsOn   []string                      `json:"depends_on,omitempty" yaml:"depends_on"`
	Environment map[string]*manifest.Variable `json:"environment,omitempty"`
	Failure     string                        `json:"failure,omitempty"`
	Name        string                        `json:"name,omitempty"`
	Shell       string                        `json:"shell,omitempty"`
	When        manifest.Conditions           `json:"when,omitempty"`
	WorkingDir  string                        `json:"working_dir,omitempty" yaml:"working_dir"`
}

Step defines a Pipeline step.

type Workspace

type Workspace struct {
	Path string `json:"path,omitempty"`
}

Workspace represents the pipeline workspace configuration.

Jump to

Keyboard shortcuts

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