build

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 27, 2020 License: MPL-2.0 Imports: 10 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

	// Environment variables that will be injected via an agent
	Environment map[string]string
	// contains filtered or unexported fields
}

func New

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

func (*Build) GetNextTask

func (b *Build) GetNextTask() *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)

type Task

type Task struct {
	ID int64

	Instance *instance.Instance
	Timeout  time.Duration

	// Original Protocol Buffers structure for reference
	ProtoTask *api.Task

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

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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