build

package
v0.110.2 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2024 License: AGPL-3.0 Imports: 20 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToCreateTask = errors.New("failed to create task")

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, logger logger.Lightweight) (*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    abstract.Instance
	Timeout     time.Duration
	Environment map[string]string
	Commands    []*Command

	LastHeartbeatReceivedAt atomic.Pointer[time.Time]

	// 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, logger logger.Lightweight) (*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