build

package
Version: v0.0.0-...-043d1ac Latest Latest
Warning

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

Go to latest
Published: Jul 28, 2017 License: AGPL-3.0-or-later, GPL-3.0 Imports: 22 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BuildingRank  = 100
	PendingRank   = 200
	FailedRank    = 300
	CompletedRank = 400
	ArchivedRank  = 500
)

Variables

This section is empty.

Functions

func ClearAll

func ClearAll() (err error)

func ClearFailed

func ClearFailed() (err error)

func ClearLog

func ClearLog(db *database.Database, buildId bson.ObjectId) (err error)

func ClearPending

func ClearPending() (err error)

func GetLog

func GetLog(db *database.Database, buildId bson.ObjectId) (
	log []string, err error)

func PublishChange

func PublishChange(db *database.Database) (err error)

func RetryFailed

func RetryFailed() (err error)

Types

type Build

type Build struct {
	Id         bson.ObjectId   `bson:"_id" json:"id"`
	Name       string          `bson:"name" json:"name"`
	SubNames   []string        `bson:"sub_names" json:"sub_names"`
	Builder    string          `bson:"builder" json:"builder"`
	Start      time.Time       `bson:"start,omitempty" json:"start,omitempty"`
	Stop       time.Time       `bson:"stop,omitempty" json:"stop,omitempty"`
	State      string          `bson:"state" json:"state"`
	StateRank  int             `bson:"state_rank" json:"state_rank"`
	Version    string          `bson:"version" json:"version"`
	Release    string          `bson:"release" json:"release"`
	Repo       string          `bson:"repo" json:"repo"`
	RepoState  bson.ObjectId   `bson:"repo_state,omitempty" json:"repo_state"`
	Uploaded   bool            `bson:"uploaded" json:"uploaded"`
	Arch       string          `bson:"arch" json:"arch"`
	Log        []string        `bson:"log,omitempty" json:"log"`
	PkgIds     []bson.ObjectId `bson:"pkg_ids" json:"pkg_ids"`
	PkgBuildId bson.ObjectId   `bson:"pkg_build_id" json:"pkg_build_id"`
}

func Get

func Get(db *database.Database, buildId bson.ObjectId) (
	bild *Build, err error)

func GetAll

func GetAll(db *database.Database, index int) (
	builds []*Build, queryIndex, count int, err error)

func GetKey

func GetKey(db *database.Database, name, version, release,
	repo, arch string) (bild *Build, err error)

func GetQueued

func GetQueued(db *database.Database) (build *Build, err error)

func GetReady

func GetReady(db *database.Database) (builds []*Build, err error)

func (*Build) Archive

func (b *Build) Archive(db *database.Database) (err error)

func (*Build) Build

func (b *Build) Build(db *database.Database) (err error)

func (*Build) ClearUpload

func (b *Build) ClearUpload(db *database.Database) (err error)

func (*Build) FullVersion

func (b *Build) FullVersion() string

func (*Build) Key

func (b *Build) Key() string

func (*Build) Rebuild

func (b *Build) Rebuild(db *database.Database) (err error)

func (*Build) Remove

func (b *Build) Remove(db *database.Database) (err error)

func (*Build) Upload

func (b *Build) Upload(db *database.Database, force bool) (err error)

type BuildLog

type BuildLog struct {
	Build     bson.ObjectId `bson:"b"`
	Timestamp time.Time     `bson:"t"`
	Log       string        `bson:"l"`
}

Jump to

Keyboard shortcuts

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