build

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2020 License: MPL-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Build

type Build struct {
	// A directory on host where .cirrus.yml that drives this execution is located
	ProjectDir string

	Cache *cache.Cache
	// contains filtered or unexported fields
}

func New

func New(projectDir string, tasks []*api.Task) (*Build, error)

func (*Build) GetNextTask

func (b *Build) GetNextTask() (result *Task)

func (*Build) GetTask

func (b *Build) GetTask(id int64) *Task

func (*Build) GetTaskFromIdentification

func (b *Build) GetTaskFromIdentification(tid *api.TaskIdentification, clientSecret string) (*Task, error)

func (*Build) Tasks added in v0.7.0

func (b *Build) Tasks() (result []*Task)

type Command added in v0.3.0

type Command struct {

	// Original Protocol Buffers structure for reference
	ProtoCommand *api.Command

	// A mutex to guarantee safe accesses from both the main loop and gRPC server handlers
	Mutex sync.RWMutex
	// contains filtered or unexported fields
}

func (*Command) SetStatus added in v0.3.0

func (command *Command) SetStatus(status commandstatus.Status)

func (*Command) Status added in v0.3.0

func (command *Command) Status() commandstatus.Status

type Task

type Task struct {
	ID          int64
	RequiredIDs []int64
	Name        string
	Labels      []string

	Instance    instance.Instance
	Timeout     time.Duration
	Environment map[string]string
	Commands    []*Command

	// A mutex to guarantee safe accesses from both the main loop and gRPC server handlers
	Mutex sync.RWMutex
	// contains filtered or unexported fields
}

func NewFromProto

func NewFromProto(protoTask *api.Task) (*Task, error)

func (*Task) FailedAtLeastOnce added in v0.3.0

func (task *Task) FailedAtLeastOnce() bool

func (*Task) GetCommand added in v0.3.0

func (task *Task) GetCommand(name string) *Command

func (*Task) ProtoCommands added in v0.3.0

func (task *Task) ProtoCommands() []*api.Command

func (*Task) SetStatus

func (task *Task) SetStatus(status taskstatus.Status)

func (*Task) Status

func (task *Task) Status() taskstatus.Status

func (*Task) String

func (task *Task) String() string

func (*Task) UniqueDescription added in v0.8.0

func (task *Task) UniqueDescription() string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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