mirror of
https://github.com/go-gitea/gitea.git
synced 2025-04-08 17:05:45 +02:00
chore: remove /core
This commit is contained in:
parent
feab4b1601
commit
c756f3081d
@ -1,27 +0,0 @@
|
||||
package core
|
||||
|
||||
import (
|
||||
"context"
|
||||
"errors"
|
||||
|
||||
runnerv1 "gitea.com/gitea/proto-go/runner/v1"
|
||||
)
|
||||
|
||||
var ErrDataLock = errors.New("Data Lock Error")
|
||||
|
||||
type Filter struct {
|
||||
Kind string
|
||||
Type string
|
||||
OS string
|
||||
Arch string
|
||||
Kernel string
|
||||
}
|
||||
|
||||
// Scheduler schedules Build stages for execution.
|
||||
type Scheduler interface {
|
||||
// Schedule schedules the stage for execution.
|
||||
Schedule(context.Context, *runnerv1.Task) error
|
||||
|
||||
// Request requests the next stage scheduled for execution.
|
||||
Request(context.Context, Filter) (*runnerv1.Task, error)
|
||||
}
|
@ -1,35 +0,0 @@
|
||||
package core
|
||||
|
||||
// BuildStatus represents a build status
|
||||
type BuildStatus string
|
||||
|
||||
// enumerate all the statuses of bot build
|
||||
const (
|
||||
// Build status
|
||||
StatusSkipped BuildStatus = "skipped"
|
||||
StatusBlocked BuildStatus = "blocked"
|
||||
StatusDeclined BuildStatus = "declined"
|
||||
StatusWaiting BuildStatus = "waiting_on_dependencies"
|
||||
StatusPending BuildStatus = "pending"
|
||||
StatusRunning BuildStatus = "running"
|
||||
StatusPassing BuildStatus = "success"
|
||||
StatusFailing BuildStatus = "failure"
|
||||
StatusKilled BuildStatus = "killed"
|
||||
StatusError BuildStatus = "error"
|
||||
)
|
||||
|
||||
func (status BuildStatus) IsPending() bool {
|
||||
return status == StatusPending
|
||||
}
|
||||
|
||||
func (status BuildStatus) IsRunning() bool {
|
||||
return status == StatusRunning
|
||||
}
|
||||
|
||||
func (status BuildStatus) IsFailed() bool {
|
||||
return status == StatusFailing || status == StatusKilled || status == StatusError
|
||||
}
|
||||
|
||||
func (status BuildStatus) IsSuccess() bool {
|
||||
return status == StatusPassing
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user