bobfile

package
v0.0.0-...-b7a57f2 Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: Apache-2.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented         = fmt.Errorf("Not implemented")
	ErrBobfileNotFound        = fmt.Errorf("Could not find a bob.yaml")
	ErrHashesFileDoesNotExist = fmt.Errorf("Hashes file does not exist")
	ErrTaskHashDoesNotExist   = fmt.Errorf("Task hash does not exist")
	ErrBobfileExists          = fmt.Errorf("Bobfile exists")
	ErrDuplicateTaskName      = fmt.Errorf("duplicate task name")
	ErrInvalidProjectName     = fmt.Errorf("invalid project name")
	ErrSelfReference          = fmt.Errorf("self reference")

	ErrInvalidRunType = fmt.Errorf("Invalid run type")

	ProjectNameFormatHint = "project name should be in the form 'project' or 'registry.com/user/project'"
)

Functions

func NewRemotestore

func NewRemotestore(endpoint *url.URL, allowInsecure bool, token string) (s store.Store)

Types

type Bobfile

type Bobfile struct {
	// Version is optional, and can be used to
	Version string `yaml:"version,omitempty"`

	// Project uniquely identifies the current project (optional). If supplied,
	// aggregation makes sure the project does not depend on another instance
	// of itself. If not provided, then the project name is set after the path
	// of its bobfile.
	Project string `yaml:"project,omitempty"`

	Imports []string `yaml:"import,omitempty"`

	// Variables is a map of variables that can be used in the tasks.
	Variables VariableMap

	// BTasks build tasks
	BTasks bobtask.Map `yaml:"build"`
	// RTasks run tasks
	RTasks bobrun.RunMap `yaml:"run"`

	Dependencies []string `yaml:"dependencies"`

	// Nixpkgs specifies an optional nixpkgs source.
	Nixpkgs string `yaml:"nixpkgs"`

	RemoteStoreHost string
	// contains filtered or unexported fields
}

func BobfileRead

func BobfileRead(dir string) (_ *Bobfile, err error)

BobfileRead read from a bobfile. Calls sanitize on the result.

func BobfileReadPlain

func BobfileReadPlain(dir string) (_ *Bobfile, err error)

BobfileReadPlain reads a bobfile. For performance reasons sanitize is not called.

func NewBobfile

func NewBobfile() *Bobfile

func (*Bobfile) BobfileSave

func (b *Bobfile) BobfileSave(dir, name string) (err error)

func (*Bobfile) Bobfiles

func (b *Bobfile) Bobfiles() []*Bobfile

func (*Bobfile) Dir

func (b *Bobfile) Dir() string

func (*Bobfile) Playbook

func (b *Bobfile) Playbook(taskName string, opts ...playbook.Option) (*playbook.Playbook, error)

func (*Bobfile) Remotestore

func (b *Bobfile) Remotestore() store.Store

func (*Bobfile) SetBobfiles

func (b *Bobfile) SetBobfiles(bobs []*Bobfile)

func (*Bobfile) SetRemotestore

func (b *Bobfile) SetRemotestore(remote store.Store)

func (*Bobfile) Validate

func (b *Bobfile) Validate() (err error)

Validate makes sure no task depends on itself (self-reference) or has the same name as another task

func (*Bobfile) Vars

func (b *Bobfile) Vars() []string

Vars returns the bobfile variables in the form "key=value" based on its Variables

func (*Bobfile) Verify

func (b *Bobfile) Verify() error

Verify a bobfile before task runner.

func (*Bobfile) VerifyAfter

func (b *Bobfile) VerifyAfter() error

VerifyAfter a bobfile after task runner.

func (*Bobfile) VerifyBefore

func (b *Bobfile) VerifyBefore() error

VerifyBefore a bobfile before task runner.

type VariableMap

type VariableMap map[string]string

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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