common

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Feb 20, 2018 License: MIT Imports: 36 Imported by: 0

Documentation

Index

Constants

View Source
const (
	PullPolicyAlways       = "always"
	PullPolicyNever        = "never"
	PullPolicyIfNotPresent = "if-not-present"
)
View Source
const AfterScriptTimeout = 5 * time.Minute
View Source
const CheckInterval = 3 * time.Second
View Source
const DefaultArtifactDownloadAttempts = 1
View Source
const DefaultCacheRequestTimeout = 10
View Source
const DefaultExecTimeout = 1800
View Source
const DefaultGetSourcesAttempts = 1
View Source
const DefaultMetricsServerPort = 9252
View Source
const DefaultNetworkClientTimeout = 60 * time.Minute
View Source
const DefaultOutputLimit = 4096 // 4MB in kilobytes
View Source
const DefaultRestoreCacheAttempts = 1
View Source
const DefaultTimeout = 7200
View Source
const DefaultWaitForServicesTimeout = 30
View Source
const ForceTraceSentInterval = 30 * time.Second
View Source
const HealthCheckInterval = 3600
View Source
const HealthyChecks = 3
View Source
const KubernetesPollInterval = 3
View Source
const KubernetesPollTimeout = 180
View Source
const NotHealthyCheckInterval = 300
View Source
const PreparationRetries = 3
View Source
const ReloadConfigInterval = 3
View Source
const ShutdownTimeout = 30
View Source
const UpdateInterval = 3 * time.Second
View Source
const UpdateRetryInterval = 3 * time.Second

Variables

View Source
var BRANCH = "HEAD"
View Source
var BUILT = "unknown"
View Source
var NAME = "gitlab-runner"
View Source
var PreparationRetryInterval = 3 * time.Second
View Source
var REVISION = "HEAD"
View Source
var VERSION = "development version"

Functions

func GenerateShellScript

func GenerateShellScript(buildStage BuildStage, info ShellScriptInfo) (string, error)

func GetCommands

func GetCommands() []cli.Command

func GetDefaultShell

func GetDefaultShell() string

func GetExecutors

func GetExecutors() []string

func GetShells

func GetShells() []string

func RegisterCommand

func RegisterCommand(command cli.Command)

func RegisterCommand2

func RegisterCommand2(name, usage string, data Commander, flags ...cli.Flag)

func RegisterExecutor

func RegisterExecutor(executor string, provider ExecutorProvider)

func RegisterShell

func RegisterShell(shell Shell)

Types

type AppVersionInfo

type AppVersionInfo struct {
	Name         string `json:"name"`
	Version      string `json:"version"`
	Revision     string `json:"revision"`
	Branch       string `json:"branch"`
	GOVersion    string `json:"go_version"`
	BuiltAt      string `json:"built_at"`
	OS           string `json:"os"`
	Architecture string `json:"architecture"`
}
var AppVersion AppVersionInfo

func (*AppVersionInfo) Extended

func (v *AppVersionInfo) Extended() string

func (*AppVersionInfo) Line

func (v *AppVersionInfo) Line() string

func (*AppVersionInfo) NewMetricsCollector

func (v *AppVersionInfo) NewMetricsCollector() *prometheus.GaugeVec

NewMetricsCollector returns a prometheus.Collector which represents current build information.

func (*AppVersionInfo) Printer

func (v *AppVersionInfo) Printer(c *cli.Context)

func (*AppVersionInfo) ShortLine

func (v *AppVersionInfo) ShortLine() string

func (*AppVersionInfo) UserAgent

func (v *AppVersionInfo) UserAgent() string

type Artifact

type Artifact struct {
	Name      string        `json:"name"`
	Untracked bool          `json:"untracked"`
	Paths     ArtifactPaths `json:"paths"`
	When      ArtifactWhen  `json:"when"`
	ExpireIn  string        `json:"expire_in"`
}

func (Artifact) ShouldUpload

func (a Artifact) ShouldUpload(state error) bool

type ArtifactPaths

type ArtifactPaths []string

type ArtifactWhen

type ArtifactWhen string
const (
	ArtifactWhenOnFailure ArtifactWhen = "on_failure"
	ArtifactWhenOnSuccess ArtifactWhen = "on_success"
	ArtifactWhenAlways    ArtifactWhen = "always"
)

func (ArtifactWhen) OnFailure

func (when ArtifactWhen) OnFailure() bool

func (ArtifactWhen) OnSuccess

func (when ArtifactWhen) OnSuccess() bool

type Artifacts

type Artifacts []Artifact

type Build

type Build struct {
	JobResponse `yaml:",inline"`

	SystemInterrupt  chan os.Signal `json:"-" yaml:"-"`
	RootDir          string         `json:"-" yaml:"-"`
	BuildDir         string         `json:"-" yaml:"-"`
	CacheDir         string         `json:"-" yaml:"-"`
	Hostname         string         `json:"-" yaml:"-"`
	Runner           *RunnerConfig  `json:"runner"`
	ExecutorData     ExecutorData
	ExecutorFeatures FeaturesInfo `json:"-" yaml:"-"`

	// Unique ID for all running builds on this runner
	RunnerID int `json:"runner_id"`

	// Unique ID for all running builds on this runner and this project
	ProjectRunnerID int `json:"project_runner_id"`

	CurrentStage BuildStage
	CurrentState BuildRuntimeState
	// contains filtered or unexported fields
}

func (*Build) CurrentExecutorStage

func (b *Build) CurrentExecutorStage() ExecutorStage

func (*Build) FullProjectDir

func (b *Build) FullProjectDir() string

func (*Build) GetAllVariables

func (b *Build) GetAllVariables() JobVariables

func (*Build) GetBuildTimeout

func (b *Build) GetBuildTimeout() time.Duration

func (*Build) GetCITLSVariables

func (b *Build) GetCITLSVariables() JobVariables

func (*Build) GetCacheRequestTimeout

func (b *Build) GetCacheRequestTimeout() int

func (*Build) GetDefaultVariables

func (b *Build) GetDefaultVariables() JobVariables

func (*Build) GetDockerAuthConfig

func (b *Build) GetDockerAuthConfig() string

func (*Build) GetDownloadArtifactsAttempts

func (b *Build) GetDownloadArtifactsAttempts() int

func (*Build) GetGetSourcesAttempts

func (b *Build) GetGetSourcesAttempts() int

func (*Build) GetGitCheckout

func (b *Build) GetGitCheckout() bool

func (*Build) GetGitDepth

func (b *Build) GetGitDepth() string

func (*Build) GetGitStrategy

func (b *Build) GetGitStrategy() GitStrategy

func (*Build) GetGitTLSVariables

func (b *Build) GetGitTLSVariables() JobVariables

func (*Build) GetRemoteURL

func (b *Build) GetRemoteURL() string

GetRemoteURL checks if the default clone URL is overwritten by the runner configuration option: 'CloneURL'. If it is, we use that to create the clone URL.

func (*Build) GetRestoreCacheAttempts

func (b *Build) GetRestoreCacheAttempts() int

func (*Build) GetSharedEnvVariable

func (b *Build) GetSharedEnvVariable() JobVariable

func (*Build) GetSubmoduleStrategy

func (b *Build) GetSubmoduleStrategy() SubmoduleStrategy

func (*Build) IsDebugTraceEnabled

func (b *Build) IsDebugTraceEnabled() bool

func (*Build) IsSharedEnv

func (b *Build) IsSharedEnv() bool

func (*Build) Log

func (b *Build) Log() *logrus.Entry

func (*Build) ProjectSlug

func (b *Build) ProjectSlug() (string, error)

func (*Build) ProjectUniqueDir

func (b *Build) ProjectUniqueDir(sharedDir bool) string

func (*Build) ProjectUniqueName

func (b *Build) ProjectUniqueName() string

func (*Build) Run

func (b *Build) Run(globalConfig *Config, trace JobTrace) (err error)

func (*Build) StartBuild

func (b *Build) StartBuild(rootDir, cacheDir string, sharedDir bool)

func (*Build) String

func (b *Build) String() string

type BuildError

type BuildError struct {
	Inner error
}

func (*BuildError) Error

func (b *BuildError) Error() string

type BuildLogger

type BuildLogger struct {
	// contains filtered or unexported fields
}

func NewBuildLogger

func NewBuildLogger(log JobTrace, entry *logrus.Entry) BuildLogger

func (*BuildLogger) Debugln

func (e *BuildLogger) Debugln(args ...interface{})

func (*BuildLogger) Errorln

func (e *BuildLogger) Errorln(args ...interface{})

func (*BuildLogger) Infoln

func (e *BuildLogger) Infoln(args ...interface{})

func (*BuildLogger) Println

func (e *BuildLogger) Println(args ...interface{})

func (*BuildLogger) SendRawLog

func (e *BuildLogger) SendRawLog(args ...interface{})

func (*BuildLogger) SoftErrorln

func (e *BuildLogger) SoftErrorln(args ...interface{})

func (*BuildLogger) Warningln

func (e *BuildLogger) Warningln(args ...interface{})

type BuildRuntimeState

type BuildRuntimeState string
const (
	BuildRunStatePending      BuildRuntimeState = "pending"
	BuildRunRuntimeRunning    BuildRuntimeState = "running"
	BuildRunRuntimeFinished   BuildRuntimeState = "finished"
	BuildRunRuntimeCanceled   BuildRuntimeState = "canceled"
	BuildRunRuntimeTerminated BuildRuntimeState = "terminated"
	BuildRunRuntimeTimedout   BuildRuntimeState = "timedout"
)

type BuildStage

type BuildStage string
const (
	BuildStagePrepare           BuildStage = "prepare_script"
	BuildStageGetSources        BuildStage = "get_sources"
	BuildStageRestoreCache      BuildStage = "restore_cache"
	BuildStageDownloadArtifacts BuildStage = "download_artifacts"
	BuildStageUserScript        BuildStage = "build_script"
	BuildStageAfterScript       BuildStage = "after_script"
	BuildStageArchiveCache      BuildStage = "archive_cache"
	BuildStageUploadArtifacts   BuildStage = "upload_artifacts"
)

type Cache

type Cache struct {
	Key       string        `json:"key"`
	Untracked bool          `json:"untracked"`
	Policy    CachePolicy   `json:"policy"`
	Paths     ArtifactPaths `json:"paths"`
}

func (Cache) CheckPolicy

func (c Cache) CheckPolicy(wanted CachePolicy) (bool, error)

type CacheConfig

type CacheConfig struct {
	Type           string `toml:"Type,omitempty" long:"type" env:"CACHE_TYPE" description:"Select caching method: s3, to use S3 buckets"`
	ServerAddress  string `` /* 138-byte string literal not displayed */
	AccessKey      string `toml:"AccessKey,omitempty" long:"s3-access-key" env:"S3_ACCESS_KEY" description:"S3 Access Key"`
	SecretKey      string `toml:"SecretKey,omitempty" long:"s3-secret-key" env:"S3_SECRET_KEY" description:"S3 Secret Key"`
	BucketName     string `` /* 130-byte string literal not displayed */
	BucketLocation string `toml:"BucketLocation,omitempty" long:"s3-bucket-location" env:"S3_BUCKET_LOCATION" description:"Name of S3 region"`
	Insecure       bool   `toml:"Insecure,omitempty" long:"s3-insecure" env:"S3_CACHE_INSECURE" description:"Use insecure mode (without https)"`
	Path           string `toml:"Path,omitempty" long:"s3-cache-path" env:"S3_CACHE_PATH" description:"Name of the path to prepend to the cache URL"`
	Shared         bool   `toml:"Shared,omitempty" long:"cache-shared" env:"CACHE_SHARED" description:"Enable cache sharing between runners."`
}

type CachePolicy

type CachePolicy string
const (
	CachePolicyUndefined CachePolicy = ""
	CachePolicyPullPush  CachePolicy = "pull-push"
	CachePolicyPull      CachePolicy = "pull"
	CachePolicyPush      CachePolicy = "push"
)

type Caches

type Caches []Cache

type Commander

type Commander interface {
	Execute(c *cli.Context)
}

type Config

type Config struct {
	MetricsServerAddress string          `toml:"metrics_server,omitempty" json:"metrics_server"`
	Concurrent           int             `toml:"concurrent" json:"concurrent"`
	CheckInterval        int             `toml:"check_interval" json:"check_interval" description:"Define active checking interval of jobs"`
	LogLevel             *string         `toml:"log_level" json:"log_level" description:"Define log level (one of: panic, fatal, error, warning, info, debug)"`
	User                 string          `toml:"user,omitempty" json:"user"`
	Runners              []*RunnerConfig `toml:"runners" json:"runners"`
	SentryDSN            *string         `toml:"sentry_dsn"`
	ModTime              time.Time       `toml:"-"`
	Loaded               bool            `toml:"-"`
}

func NewConfig

func NewConfig() *Config

func (*Config) GetCheckInterval

func (c *Config) GetCheckInterval() time.Duration

func (*Config) LoadConfig

func (c *Config) LoadConfig(configFile string) error

func (*Config) SaveConfig

func (c *Config) SaveConfig(configFile string) error

func (*Config) StatConfig

func (c *Config) StatConfig(configFile string) error

type ContainerCommand

type ContainerCommand []string
var (
	ContainerCommandBuild ContainerCommand = []string{"gitlab-runner-build"}
)

type Credentials

type Credentials struct {
	Type     string `json:"type"`
	URL      string `json:"url"`
	Username string `json:"username"`
	Password string `json:"password"`
}

type Dependencies

type Dependencies []Dependency

type Dependency

type Dependency struct {
	ID            int                     `json:"id"`
	Token         string                  `json:"token"`
	Name          string                  `json:"name"`
	ArtifactsFile DependencyArtifactsFile `json:"artifacts_file"`
}

type DependencyArtifactsFile

type DependencyArtifactsFile struct {
	Filename string `json:"filename"`
	Size     int64  `json:"size"`
}

type DockerConfig

type DockerConfig struct {
	docker_helpers.DockerCredentials
	Hostname               string            `toml:"hostname,omitempty" json:"hostname" long:"hostname" env:"DOCKER_HOSTNAME" description:"Custom container hostname"`
	Image                  string            `toml:"image" json:"image" long:"image" env:"DOCKER_IMAGE" description:"Docker image to be used"`
	Runtime                string            `toml:"runtime,omitempty" json:"runtime" long:"runtime" env:"DOCKER_RUNTIME" description:"Docker runtime to be used"`
	CPUSetCPUs             string            `` /* 159-byte string literal not displayed */
	CPUS                   string            `toml:"cpus,omitempty" json:"cpus" long:"cpus" env:"DOCKER_CPUS" description:"Number of CPUs"`
	DNS                    []string          `toml:"dns,omitempty" json:"dns" long:"dns" env:"DOCKER_DNS" description:"A list of DNS servers for the container to use"`
	DNSSearch              []string          `` /* 130-byte string literal not displayed */
	Privileged             bool              `` /* 138-byte string literal not displayed */
	UsernsMode             string            `toml:"userns_mode,omitempty" json:"userns_mode" long:"userns" env:"DOCKER_USERNS_MODE" description:"User namespace to use"`
	CapAdd                 []string          `toml:"cap_add" json:"cap_add" long:"cap-add" env:"DOCKER_CAP_ADD" description:"Add Linux capabilities"`
	CapDrop                []string          `toml:"cap_drop" json:"cap_drop" long:"cap-drop" env:"DOCKER_CAP_DROP" description:"Drop Linux capabilities"`
	SecurityOpt            []string          `toml:"security_opt" json:"security_opt" long:"security-opt" env:"DOCKER_SECURITY_OPT" description:"Security Options"`
	Devices                []string          `toml:"devices" json:"devices" long:"devices" env:"DOCKER_DEVICES" description:"Add a host device to the container"`
	DisableCache           bool              `` /* 142-byte string literal not displayed */
	Volumes                []string          `toml:"volumes,omitempty" json:"volumes" long:"volumes" env:"DOCKER_VOLUMES" description:"Bind mount a volumes"`
	VolumeDriver           string            `` /* 138-byte string literal not displayed */
	CacheDir               string            `` /* 129-byte string literal not displayed */
	ExtraHosts             []string          `` /* 137-byte string literal not displayed */
	VolumesFrom            []string          `` /* 161-byte string literal not displayed */
	NetworkMode            string            `` /* 143-byte string literal not displayed */
	Links                  []string          `toml:"links,omitempty" json:"links" long:"links" env:"DOCKER_LINKS" description:"Add link to another container"`
	Services               []string          `` /* 136-byte string literal not displayed */
	WaitForServicesTimeout int               `` /* 197-byte string literal not displayed */
	AllowedImages          []string          `` /* 142-byte string literal not displayed */
	AllowedServices        []string          `` /* 152-byte string literal not displayed */
	PullPolicy             DockerPullPolicy  `` /* 154-byte string literal not displayed */
	ShmSize                int64             `` /* 141-byte string literal not displayed */
	Tmpfs                  map[string]string `` /* 344-byte string literal not displayed */
	ServicesTmpfs          map[string]string `` /* 388-byte string literal not displayed */
	SysCtls                DockerSysCtls     `` /* 178-byte string literal not displayed */
	HelperImage            string            `` /* 195-byte string literal not displayed */
}

func (*DockerConfig) GetNanoCPUs

func (c *DockerConfig) GetNanoCPUs() (int64, error)

type DockerMachine

type DockerMachine struct {
	IdleCount      int      `long:"idle-nodes" env:"MACHINE_IDLE_COUNT" description:"Maximum idle machines"`
	IdleTime       int      `toml:"IdleTime,omitzero" long:"idle-time" env:"MACHINE_IDLE_TIME" description:"Minimum time after node can be destroyed"`
	MaxBuilds      int      `` /* 128-byte string literal not displayed */
	MachineDriver  string   `long:"machine-driver" env:"MACHINE_DRIVER" description:"The driver to use when creating machine"`
	MachineName    string   `long:"machine-name" env:"MACHINE_NAME" description:"The template for machine name (needs to include %s)"`
	MachineOptions []string `long:"machine-options" env:"MACHINE_OPTIONS" description:"Additional machine creation options"`

	OffPeakPeriods   []string `long:"off-peak-periods" env:"MACHINE_OFF_PEAK_PERIODS" description:"Time periods when the scheduler is in the OffPeak mode"`
	OffPeakTimezone  string   `long:"off-peak-timezone" env:"MACHINE_OFF_PEAK_TIMEZONE" description:"Timezone for the OffPeak periods (defaults to Local)"`
	OffPeakIdleCount int      `` /* 138-byte string literal not displayed */
	OffPeakIdleTime  int      `` /* 158-byte string literal not displayed */
	// contains filtered or unexported fields
}

func (*DockerMachine) CompileOffPeakPeriods

func (c *DockerMachine) CompileOffPeakPeriods() (err error)

func (*DockerMachine) GetIdleCount

func (c *DockerMachine) GetIdleCount() int

func (*DockerMachine) GetIdleTime

func (c *DockerMachine) GetIdleTime() int

type DockerPullPolicy

type DockerPullPolicy string

func (DockerPullPolicy) Get

Get returns one of the predefined values or returns an error if the value can't match the predefined

type DockerSysCtls

type DockerSysCtls map[string]string

type DownloadState

type DownloadState int
const (
	DownloadSucceeded DownloadState = iota
	DownloadForbidden
	DownloadFailed
	DownloadNotFound
)

type Executor

type Executor interface {
	Shell() *ShellScriptInfo
	Prepare(options ExecutorPrepareOptions) error
	Run(cmd ExecutorCommand) error
	Finish(err error)
	Cleanup()
	GetCurrentStage() ExecutorStage
	SetCurrentStage(stage ExecutorStage)
}

func NewExecutor

func NewExecutor(executor string) Executor

type ExecutorCommand

type ExecutorCommand struct {
	Script     string
	Predefined bool
	Context    context.Context
}

type ExecutorData

type ExecutorData interface{}

type ExecutorPrepareOptions

type ExecutorPrepareOptions struct {
	Config  *RunnerConfig
	Build   *Build
	Trace   JobTrace
	User    string
	Context context.Context
}

type ExecutorProvider

type ExecutorProvider interface {
	CanCreate() bool
	Create() Executor
	Acquire(config *RunnerConfig) (ExecutorData, error)
	Release(config *RunnerConfig, data ExecutorData) error
	GetFeatures(features *FeaturesInfo)
}

func GetExecutor

func GetExecutor(executor string) ExecutorProvider

func GetExecutorProviders

func GetExecutorProviders() (providers []ExecutorProvider)

type ExecutorStage

type ExecutorStage string
const (
	ExecutorStageCreated ExecutorStage = "created"
	ExecutorStagePrepare ExecutorStage = "prepare"
	ExecutorStageFinish  ExecutorStage = "finish"
	ExecutorStageCleanup ExecutorStage = "cleanup"
)

type FailuresCollector

type FailuresCollector interface {
	RecordFailure(reason JobFailureReason, runnerDescription string)
}

type FeaturesInfo

type FeaturesInfo struct {
	Variables bool `json:"variables"`
	Image     bool `json:"image"`
	Services  bool `json:"services"`
	Artifacts bool `json:"features"`
	Cache     bool `json:"cache"`
	Shared    bool `json:"shared"`
}

type GitInfo

type GitInfo struct {
	RepoURL   string         `json:"repo_url"`
	Ref       string         `json:"ref"`
	Sha       string         `json:"sha"`
	BeforeSha string         `json:"before_sha"`
	RefType   GitInfoRefType `json:"ref_type"`
}

type GitInfoRefType

type GitInfoRefType string
const (
	RefTypeBranch GitInfoRefType = "branch"
	RefTypeTag    GitInfoRefType = "tag"
)

type GitStrategy

type GitStrategy int
const (
	GitClone GitStrategy = iota
	GitFetch
	GitNone
)

type GitlabFeatures

type GitlabFeatures struct {
	TraceSections bool `json:"trace_sections"`
}

type Image

type Image struct {
	Name       string   `json:"name"`
	Alias      string   `json:"alias,omitempty"`
	Command    []string `json:"command,omitempty"`
	Entrypoint []string `json:"entrypoint,omitempty"`
}

type JobCredentials

type JobCredentials struct {
	ID          int    `long:"id" env:"CI_JOB_ID" description:"The build ID to upload artifacts for"`
	Token       string `long:"token" env:"CI_JOB_TOKEN" required:"true" description:"Build token"`
	URL         string `long:"url" env:"CI_SERVER_URL" required:"true" description:"GitLab CI URL"`
	TLSCAFile   string `` /* 129-byte string literal not displayed */
	TLSCertFile string `` /* 141-byte string literal not displayed */
	TLSKeyFile  string `` /* 139-byte string literal not displayed */
}

func (*JobCredentials) GetTLSCAFile

func (j *JobCredentials) GetTLSCAFile() string

func (*JobCredentials) GetTLSCertFile

func (j *JobCredentials) GetTLSCertFile() string

func (*JobCredentials) GetTLSKeyFile

func (j *JobCredentials) GetTLSKeyFile() string

func (*JobCredentials) GetToken

func (j *JobCredentials) GetToken() string

func (*JobCredentials) GetURL

func (j *JobCredentials) GetURL() string

type JobFailureReason

type JobFailureReason string
const (
	NoneFailure         JobFailureReason = ""
	ScriptFailure       JobFailureReason = "script_failure"
	RunnerSystemFailure JobFailureReason = "runner_system_failure"
)

type JobInfo

type JobInfo struct {
	Name        string `json:"name"`
	Stage       string `json:"stage"`
	ProjectID   int    `json:"project_id"`
	ProjectName string `json:"project_name"`
}

type JobRequest

type JobRequest struct {
	Info       VersionInfo `json:"info,omitempty"`
	Token      string      `json:"token,omitempty"`
	LastUpdate string      `json:"last_update,omitempty"`
}

type JobResponse

type JobResponse struct {
	ID            int            `json:"id"`
	Token         string         `json:"token"`
	AllowGitFetch bool           `json:"allow_git_fetch"`
	JobInfo       JobInfo        `json:"job_info"`
	GitInfo       GitInfo        `json:"git_info"`
	RunnerInfo    RunnerInfo     `json:"runner_info"`
	Variables     JobVariables   `json:"variables"`
	Steps         Steps          `json:"steps"`
	Image         Image          `json:"image"`
	Services      Services       `json:"services"`
	Artifacts     Artifacts      `json:"artifacts"`
	Cache         Caches         `json:"cache"`
	Credentials   []Credentials  `json:"credentials"`
	Dependencies  Dependencies   `json:"dependencies"`
	Features      GitlabFeatures `json:"features"`

	TLSCAChain  string `json:"-"`
	TLSAuthCert string `json:"-"`
	TLSAuthKey  string `json:"-"`
}

func GetFailedBuild

func GetFailedBuild() (JobResponse, error)

func GetLongRunningBuild

func GetLongRunningBuild() (JobResponse, error)

func GetMultilineBashBuild

func GetMultilineBashBuild() (JobResponse, error)

func GetRemoteBrokenTLSBuild

func GetRemoteBrokenTLSBuild() (job JobResponse, err error)

func GetRemoteFailedBuild

func GetRemoteFailedBuild() (JobResponse, error)

func GetRemoteGitLabComTLSBuild

func GetRemoteGitLabComTLSBuild() (job JobResponse, err error)

func GetRemoteLongRunningBuild

func GetRemoteLongRunningBuild() (JobResponse, error)

func GetRemoteSuccessfulBuild

func GetRemoteSuccessfulBuild() (JobResponse, error)

func GetRemoteSuccessfulBuildWithAfterScript

func GetRemoteSuccessfulBuildWithAfterScript() (JobResponse, error)

func GetRemoteSuccessfulBuildWithDumpedVariables

func GetRemoteSuccessfulBuildWithDumpedVariables() (response JobResponse, err error)

func GetSuccessfulBuild

func GetSuccessfulBuild() (JobResponse, error)

func (*JobResponse) RepoCleanURL

func (j *JobResponse) RepoCleanURL() string

type JobState

type JobState string
const (
	Pending JobState = "pending"
	Running JobState = "running"
	Failed  JobState = "failed"
	Success JobState = "success"
)

type JobTrace

type JobTrace interface {
	io.Writer
	Success()
	Fail(err error, failureReason JobFailureReason)
	SetCancelFunc(cancelFunc context.CancelFunc)
	SetFailuresCollector(fc FailuresCollector)
	IsStdout() bool
}

type JobTracePatch

type JobTracePatch interface {
	Patch() []byte
	Offset() int
	Limit() int
	SetNewOffset(newOffset int)
	ValidateRange() bool
}

type JobVariable

type JobVariable struct {
	Key      string `json:"key"`
	Value    string `json:"value"`
	Public   bool   `json:"public"`
	Internal bool   `json:"-"`
	File     bool   `json:"file"`
}

func ParseVariable

func ParseVariable(text string) (variable JobVariable, err error)

func (JobVariable) String

func (b JobVariable) String() string

type JobVariables

type JobVariables []JobVariable

func (JobVariables) Expand

func (b JobVariables) Expand() (variables JobVariables)

func (JobVariables) ExpandValue

func (b JobVariables) ExpandValue(value string) string

func (JobVariables) Get

func (b JobVariables) Get(key string) string

func (JobVariables) PublicOrInternal

func (b JobVariables) PublicOrInternal() (variables JobVariables)

func (JobVariables) StringList

func (b JobVariables) StringList() (variables []string)

type KubernetesConfig

type KubernetesConfig struct {
	Host                           string               `` /* 151-byte string literal not displayed */
	CertFile                       string               `` /* 145-byte string literal not displayed */
	KeyFile                        string               `` /* 141-byte string literal not displayed */
	CAFile                         string               `` /* 140-byte string literal not displayed */
	BearerTokenOverwriteAllowed    bool                 `` /* 248-byte string literal not displayed */
	BearerToken                    string               `` /* 181-byte string literal not displayed */
	Image                          string               `` /* 137-byte string literal not displayed */
	Namespace                      string               `` /* 127-byte string literal not displayed */
	NamespaceOverwriteAllowed      string               `` /* 220-byte string literal not displayed */
	Privileged                     bool                 `` /* 156-byte string literal not displayed */
	CPULimit                       string               `` /* 146-byte string literal not displayed */
	MemoryLimit                    string               `` /* 164-byte string literal not displayed */
	ServiceCPULimit                string               `` /* 186-byte string literal not displayed */
	ServiceMemoryLimit             string               `` /* 204-byte string literal not displayed */
	HelperCPULimit                 string               `` /* 181-byte string literal not displayed */
	HelperMemoryLimit              string               `` /* 199-byte string literal not displayed */
	CPURequest                     string               `` /* 159-byte string literal not displayed */
	MemoryRequest                  string               `` /* 174-byte string literal not displayed */
	ServiceCPURequest              string               `` /* 199-byte string literal not displayed */
	ServiceMemoryRequest           string               `` /* 213-byte string literal not displayed */
	HelperCPURequest               string               `` /* 194-byte string literal not displayed */
	HelperMemoryRequest            string               `` /* 208-byte string literal not displayed */
	PullPolicy                     KubernetesPullPolicy `` /* 231-byte string literal not displayed */
	NodeSelector                   map[string]string    `` /* 239-byte string literal not displayed */
	ImagePullSecrets               []string             `` /* 205-byte string literal not displayed */
	HelperImage                    string               `` /* 199-byte string literal not displayed */
	TerminationGracePeriodSeconds  int64                `` /* 330-byte string literal not displayed */
	PollInterval                   int                  `` /* 224-byte string literal not displayed */
	PollTimeout                    int                  `` /* 325-byte string literal not displayed */
	PodLabels                      map[string]string    `` /* 268-byte string literal not displayed */
	ServiceAccount                 string               `` /* 195-byte string literal not displayed */
	ServiceAccountOverwriteAllowed string               `` /* 240-byte string literal not displayed */
	PodAnnotations                 map[string]string    `` /* 296-byte string literal not displayed */
	PodAnnotationsOverwriteAllowed string               `` /* 243-byte string literal not displayed */
	Volumes                        KubernetesVolumes    `toml:"volumes"`
}

func (*KubernetesConfig) GetHelperImage

func (c *KubernetesConfig) GetHelperImage() string

func (*KubernetesConfig) GetPollAttempts

func (c *KubernetesConfig) GetPollAttempts() int

func (*KubernetesConfig) GetPollInterval

func (c *KubernetesConfig) GetPollInterval() int

type KubernetesConfigMap

type KubernetesConfigMap struct {
	Name      string            `toml:"name" json:"name" description:"The name of the volume and ConfigMap to use"`
	MountPath string            `toml:"mount_path" description:"Path where volume should be mounted inside of container"`
	ReadOnly  bool              `toml:"read_only,omitempty" description:"If this volume should be mounted read only"`
	Items     map[string]string `toml:"items,omitempty" description:"Key-to-path mapping for keys from the config map that should be used."`
}

type KubernetesEmptyDir

type KubernetesEmptyDir struct {
	Name      string `toml:"name" json:"name" description:"The name of the volume and EmptyDir to use"`
	MountPath string `toml:"mount_path" description:"Path where volume should be mounted inside of container"`
	Medium    string `toml:"medium,omitempty" description:"Set to 'Memory' to have a tmpfs"`
}

type KubernetesHostPath

type KubernetesHostPath struct {
	Name      string `toml:"name" json:"name" description:"The name of the volume"`
	MountPath string `toml:"mount_path" description:"Path where volume should be mounted inside of container"`
	ReadOnly  bool   `toml:"read_only,omitempty" description:"If this volume should be mounted read only"`
	HostPath  string `toml:"host_path,omitempty" description:"Path from the host that should be mounted as a volume"`
}

type KubernetesPVC

type KubernetesPVC struct {
	Name      string `toml:"name" json:"name" description:"The name of the volume and PVC to use"`
	MountPath string `toml:"mount_path" description:"Path where volume should be mounted inside of container"`
	ReadOnly  bool   `toml:"read_only,omitempty" description:"If this volume should be mounted read only"`
}

type KubernetesPullPolicy

type KubernetesPullPolicy string

func (KubernetesPullPolicy) Get

Get returns one of the predefined values in kubernetes notation or returns an error if the value can't match the predefined

type KubernetesSecret

type KubernetesSecret struct {
	Name      string            `toml:"name" json:"name" description:"The name of the volume and Secret to use"`
	MountPath string            `toml:"mount_path" description:"Path where volume should be mounted inside of container"`
	ReadOnly  bool              `toml:"read_only,omitempty" description:"If this volume should be mounted read only"`
	Items     map[string]string `toml:"items,omitempty" description:"Key-to-path mapping for keys from the secret that should be used."`
}

type KubernetesVolumes

type KubernetesVolumes struct {
	HostPaths  []KubernetesHostPath  `toml:"host_path" description:"The host paths which will be mounted"`
	PVCs       []KubernetesPVC       `toml:"pvc" description:"The persistent volume claims that will be mounted"`
	ConfigMaps []KubernetesConfigMap `toml:"config_map" description:"The config maps which will be mounted as volumes"`
	Secrets    []KubernetesSecret    `toml:"secret" description:"The secret maps which will be mounted"`
	EmptyDirs  []KubernetesEmptyDir  `toml:"empty_dir" description:"The empty dirs which will be mounted"`
}

type MockCommander

type MockCommander struct {
	mock.Mock
}

MockCommander is an autogenerated mock type for the Commander type

func (*MockCommander) Execute

func (_m *MockCommander) Execute(c *cli.Context)

Execute provides a mock function with given fields: c

type MockExecutor

type MockExecutor struct {
	mock.Mock
}

MockExecutor is an autogenerated mock type for the Executor type

func (*MockExecutor) Cleanup

func (_m *MockExecutor) Cleanup()

Cleanup provides a mock function with given fields:

func (*MockExecutor) Finish

func (_m *MockExecutor) Finish(err error)

Finish provides a mock function with given fields: err

func (*MockExecutor) GetCurrentStage

func (_m *MockExecutor) GetCurrentStage() ExecutorStage

GetCurrentStage provides a mock function with given fields:

func (*MockExecutor) Prepare

func (_m *MockExecutor) Prepare(options ExecutorPrepareOptions) error

Prepare provides a mock function with given fields: options

func (*MockExecutor) Run

func (_m *MockExecutor) Run(cmd ExecutorCommand) error

Run provides a mock function with given fields: cmd

func (*MockExecutor) SetCurrentStage

func (_m *MockExecutor) SetCurrentStage(stage ExecutorStage)

SetCurrentStage provides a mock function with given fields: stage

func (*MockExecutor) Shell

func (_m *MockExecutor) Shell() *ShellScriptInfo

Shell provides a mock function with given fields:

type MockExecutorData

type MockExecutorData struct {
	mock.Mock
}

MockExecutorData is an autogenerated mock type for the ExecutorData type

type MockExecutorProvider

type MockExecutorProvider struct {
	mock.Mock
}

MockExecutorProvider is an autogenerated mock type for the ExecutorProvider type

func (*MockExecutorProvider) Acquire

func (_m *MockExecutorProvider) Acquire(config *RunnerConfig) (ExecutorData, error)

Acquire provides a mock function with given fields: config

func (*MockExecutorProvider) CanCreate

func (_m *MockExecutorProvider) CanCreate() bool

CanCreate provides a mock function with given fields:

func (*MockExecutorProvider) Create

func (_m *MockExecutorProvider) Create() Executor

Create provides a mock function with given fields:

func (*MockExecutorProvider) GetFeatures

func (_m *MockExecutorProvider) GetFeatures(features *FeaturesInfo)

GetFeatures provides a mock function with given fields: features

func (*MockExecutorProvider) Release

func (_m *MockExecutorProvider) Release(config *RunnerConfig, data ExecutorData) error

Release provides a mock function with given fields: config, data

type MockJobTrace

type MockJobTrace struct {
	mock.Mock
}

MockJobTrace is an autogenerated mock type for the JobTrace type

func (*MockJobTrace) Fail

func (_m *MockJobTrace) Fail(err error, failureReason JobFailureReason)

Fail provides a mock function with given fields: err

func (*MockJobTrace) IsStdout

func (_m *MockJobTrace) IsStdout() bool

IsStdout provides a mock function with given fields:

func (*MockJobTrace) SetCancelFunc

func (_m *MockJobTrace) SetCancelFunc(cancelFunc context.CancelFunc)

SetCancelFunc provides a mock function with given fields: cancelFunc

func (*MockJobTrace) Success

func (_m *MockJobTrace) Success()

Success provides a mock function with given fields:

func (*MockJobTrace) Write

func (_m *MockJobTrace) Write(p []byte) (int, error)

Write provides a mock function with given fields: p

type MockJobTracePatch

type MockJobTracePatch struct {
	mock.Mock
}

MockJobTracePatch is an autogenerated mock type for the JobTracePatch type

func (*MockJobTracePatch) Limit

func (_m *MockJobTracePatch) Limit() int

Limit provides a mock function with given fields:

func (*MockJobTracePatch) Offset

func (_m *MockJobTracePatch) Offset() int

Offset provides a mock function with given fields:

func (*MockJobTracePatch) Patch

func (_m *MockJobTracePatch) Patch() []byte

Patch provides a mock function with given fields:

func (*MockJobTracePatch) SetNewOffset

func (_m *MockJobTracePatch) SetNewOffset(newOffset int)

SetNewOffset provides a mock function with given fields: newOffset

func (*MockJobTracePatch) ValidateRange

func (_m *MockJobTracePatch) ValidateRange() bool

ValidateRange provides a mock function with given fields:

type MockNetwork

type MockNetwork struct {
	mock.Mock
}

MockNetwork is an autogenerated mock type for the Network type

func (*MockNetwork) DownloadArtifacts

func (_m *MockNetwork) DownloadArtifacts(config JobCredentials, artifactsFile string) DownloadState

DownloadArtifacts provides a mock function with given fields: config, artifactsFile

func (*MockNetwork) PatchTrace

func (_m *MockNetwork) PatchTrace(config RunnerConfig, jobCredentials *JobCredentials, tracePart JobTracePatch) UpdateState

PatchTrace provides a mock function with given fields: config, jobCredentials, tracePart

func (*MockNetwork) ProcessJob

func (_m *MockNetwork) ProcessJob(config RunnerConfig, buildCredentials *JobCredentials) JobTrace

ProcessJob provides a mock function with given fields: config, buildCredentials

func (*MockNetwork) RegisterRunner

func (_m *MockNetwork) RegisterRunner(config RunnerCredentials, description string, tags string, runUntagged bool, locked bool) *RegisterRunnerResponse

RegisterRunner provides a mock function with given fields: config, description, tags, runUntagged, locked

func (*MockNetwork) RequestJob

func (_m *MockNetwork) RequestJob(config RunnerConfig) (*JobResponse, bool)

RequestJob provides a mock function with given fields: config

func (*MockNetwork) UnregisterRunner

func (_m *MockNetwork) UnregisterRunner(config RunnerCredentials) bool

UnregisterRunner provides a mock function with given fields: config

func (*MockNetwork) UpdateJob

func (_m *MockNetwork) UpdateJob(config RunnerConfig, jobCredentials *JobCredentials, jobInfo UpdateJobInfo) UpdateState

UpdateJob provides a mock function with given fields: config, jobCredentials, id, state, trace

func (*MockNetwork) UploadArtifacts

func (_m *MockNetwork) UploadArtifacts(config JobCredentials, artifactsFile string) UploadState

UploadArtifacts provides a mock function with given fields: config, artifactsFile

func (*MockNetwork) UploadRawArtifacts

func (_m *MockNetwork) UploadRawArtifacts(config JobCredentials, reader io.Reader, baseName string, expireIn string) UploadState

UploadRawArtifacts provides a mock function with given fields: config, reader, baseName, expireIn

func (*MockNetwork) VerifyRunner

func (_m *MockNetwork) VerifyRunner(config RunnerCredentials) bool

VerifyRunner provides a mock function with given fields: config

type MockShell

type MockShell struct {
	mock.Mock
}

MockShell is an autogenerated mock type for the Shell type

func (*MockShell) GenerateScript

func (_m *MockShell) GenerateScript(buildStage BuildStage, info ShellScriptInfo) (string, error)

GenerateScript provides a mock function with given fields: buildStage, info

func (*MockShell) GetConfiguration

func (_m *MockShell) GetConfiguration(info ShellScriptInfo) (*ShellConfiguration, error)

GetConfiguration provides a mock function with given fields: info

func (*MockShell) GetFeatures

func (_m *MockShell) GetFeatures(features *FeaturesInfo)

GetFeatures provides a mock function with given fields: features

func (*MockShell) GetName

func (_m *MockShell) GetName() string

GetName provides a mock function with given fields:

func (*MockShell) IsDefault

func (_m *MockShell) IsDefault() bool

IsDefault provides a mock function with given fields:

type Network

type Network interface {
	RegisterRunner(config RunnerCredentials, description, tags string, runUntagged, locked bool) *RegisterRunnerResponse
	VerifyRunner(config RunnerCredentials) bool
	UnregisterRunner(config RunnerCredentials) bool
	RequestJob(config RunnerConfig) (*JobResponse, bool)
	UpdateJob(config RunnerConfig, jobCredentials *JobCredentials, jobInfo UpdateJobInfo) UpdateState
	PatchTrace(config RunnerConfig, jobCredentials *JobCredentials, tracePart JobTracePatch) UpdateState
	DownloadArtifacts(config JobCredentials, artifactsFile string) DownloadState
	UploadRawArtifacts(config JobCredentials, reader io.Reader, baseName string, expireIn string) UploadState
	UploadArtifacts(config JobCredentials, artifactsFile string) UploadState
	ProcessJob(config RunnerConfig, buildCredentials *JobCredentials) JobTrace
}

type ParallelsConfig

type ParallelsConfig struct {
	BaseName         string `toml:"base_name" json:"base_name" long:"base-name" env:"PARALLELS_BASE_NAME" description:"VM name to be used"`
	TemplateName     string `` /* 142-byte string literal not displayed */
	DisableSnapshots bool   `` /* 174-byte string literal not displayed */
}

type RegisterRunnerRequest

type RegisterRunnerRequest struct {
	Info        VersionInfo `json:"info,omitempty"`
	Token       string      `json:"token,omitempty"`
	Description string      `json:"description,omitempty"`
	Tags        string      `json:"tag_list,omitempty"`
	RunUntagged bool        `json:"run_untagged"`
	Locked      bool        `json:"locked"`
}

type RegisterRunnerResponse

type RegisterRunnerResponse struct {
	Token string `json:"token,omitempty"`
}

type RunnerConfig

type RunnerConfig struct {
	Name               string `toml:"name" json:"name" short:"name" long:"description" env:"RUNNER_NAME" description:"Runner name"`
	Limit              int    `` /* 130-byte string literal not displayed */
	OutputLimit        int    `` /* 126-byte string literal not displayed */
	RequestConcurrency int    `` /* 146-byte string literal not displayed */

	RunnerCredentials
	RunnerSettings
}

func (*RunnerConfig) GetRequestConcurrency

func (c *RunnerConfig) GetRequestConcurrency() int

func (*RunnerConfig) GetVariables

func (c *RunnerConfig) GetVariables() JobVariables

func (*RunnerConfig) String

func (c *RunnerConfig) String() string

type RunnerCredentials

type RunnerCredentials struct {
	URL         string `toml:"url" json:"url" short:"u" long:"url" env:"CI_SERVER_URL" required:"true" description:"Runner URL"`
	Token       string `toml:"token" json:"token" short:"t" long:"token" env:"CI_SERVER_TOKEN" required:"true" description:"Runner token"`
	TLSCAFile   string `` /* 177-byte string literal not displayed */
	TLSCertFile string `` /* 181-byte string literal not displayed */
	TLSKeyFile  string `` /* 177-byte string literal not displayed */
}

func (*RunnerCredentials) GetTLSCAFile

func (c *RunnerCredentials) GetTLSCAFile() string

func (*RunnerCredentials) GetTLSCertFile

func (c *RunnerCredentials) GetTLSCertFile() string

func (*RunnerCredentials) GetTLSKeyFile

func (c *RunnerCredentials) GetTLSKeyFile() string

func (*RunnerCredentials) GetToken

func (c *RunnerCredentials) GetToken() string

func (*RunnerCredentials) GetURL

func (c *RunnerCredentials) GetURL() string

func (*RunnerCredentials) Log

func (c *RunnerCredentials) Log() *log.Entry

func (*RunnerCredentials) SameAs

func (c *RunnerCredentials) SameAs(other *RunnerCredentials) bool

func (*RunnerCredentials) ShortDescription

func (c *RunnerCredentials) ShortDescription() string

func (*RunnerCredentials) UniqueID

func (c *RunnerCredentials) UniqueID() string

type RunnerInfo

type RunnerInfo struct {
	Timeout int `json:"timeout"`
}

type RunnerSettings

type RunnerSettings struct {
	Executor  string `` /* 140-byte string literal not displayed */
	BuildsDir string `` /* 135-byte string literal not displayed */
	CacheDir  string `` /* 135-byte string literal not displayed */
	CloneURL  string `` /* 151-byte string literal not displayed */

	Environment     []string `` /* 148-byte string literal not displayed */
	PreCloneScript  string   `` /* 187-byte string literal not displayed */
	PreBuildScript  string   `` /* 214-byte string literal not displayed */
	PostBuildScript string   `` /* 220-byte string literal not displayed */

	Shell string `toml:"shell,omitempty" json:"shell" long:"shell" env:"RUNNER_SHELL" description:"Select bash, cmd or powershell"`

	SSH        *ssh.Config       `toml:"ssh,omitempty" json:"ssh" group:"ssh executor" namespace:"ssh"`
	Docker     *DockerConfig     `toml:"docker,omitempty" json:"docker" group:"docker executor" namespace:"docker"`
	Parallels  *ParallelsConfig  `toml:"parallels,omitempty" json:"parallels" group:"parallels executor" namespace:"parallels"`
	VirtualBox *VirtualBoxConfig `toml:"virtualbox,omitempty" json:"virtualbox" group:"virtualbox executor" namespace:"virtualbox"`
	Cache      *CacheConfig      `toml:"cache,omitempty" json:"cache" group:"cache configuration" namespace:"cache"`
	Machine    *DockerMachine    `toml:"machine,omitempty" json:"machine" group:"docker machine provider" namespace:"machine"`
	Kubernetes *KubernetesConfig `toml:"kubernetes,omitempty" json:"kubernetes" group:"kubernetes executor" namespace:"kubernetes"`
}

type Services

type Services []Image

type Shell

type Shell interface {
	GetName() string
	GetFeatures(features *FeaturesInfo)
	IsDefault() bool

	GetConfiguration(info ShellScriptInfo) (*ShellConfiguration, error)
	GenerateScript(buildStage BuildStage, info ShellScriptInfo) (string, error)
}

func GetShell

func GetShell(shell string) Shell

type ShellConfiguration

type ShellConfiguration struct {
	Environment   []string
	DockerCommand []string
	Command       string
	Arguments     []string
	PassFile      bool
	Extension     string
}

func GetShellConfiguration

func GetShellConfiguration(info ShellScriptInfo) (*ShellConfiguration, error)

func (*ShellConfiguration) GetCommandWithArguments

func (s *ShellConfiguration) GetCommandWithArguments() []string

func (*ShellConfiguration) String

func (s *ShellConfiguration) String() string

type ShellScriptInfo

type ShellScriptInfo struct {
	Shell           string
	Build           *Build
	Type            ShellType
	User            string
	RunnerCommand   string
	PreCloneScript  string
	PreBuildScript  string
	PostBuildScript string
}

type ShellType

type ShellType int
const (
	NormalShell ShellType = iota
	LoginShell
)

type Step

type Step struct {
	Name         StepName   `json:"name"`
	Script       StepScript `json:"script"`
	Timeout      int        `json:"timeout"`
	When         StepWhen   `json:"when"`
	AllowFailure bool       `json:"allow_failure"`
}

type StepName

type StepName string
const (
	StepNameScript      StepName = "script"
	StepNameAfterScript StepName = "after_script"
)

type StepScript

type StepScript []string

type StepWhen

type StepWhen string
const (
	StepWhenOnFailure StepWhen = "on_failure"
	StepWhenOnSuccess StepWhen = "on_success"
	StepWhenAlways    StepWhen = "always"
)

type Steps

type Steps []Step

type SubmoduleStrategy

type SubmoduleStrategy int
const (
	SubmoduleInvalid SubmoduleStrategy = iota
	SubmoduleNone
	SubmoduleNormal
	SubmoduleRecursive
)

type Trace

type Trace struct {
	Writer     io.Writer
	CancelFunc context.CancelFunc
	// contains filtered or unexported fields
}

func (*Trace) Fail

func (s *Trace) Fail(err error, failureReason JobFailureReason)

func (*Trace) IsStdout

func (s *Trace) IsStdout() bool

func (*Trace) SetCancelFunc

func (s *Trace) SetCancelFunc(cancelFunc context.CancelFunc)

func (*Trace) SetFailuresCollector

func (s *Trace) SetFailuresCollector(fc FailuresCollector)

func (*Trace) Success

func (s *Trace) Success()

func (*Trace) Write

func (s *Trace) Write(p []byte) (n int, err error)

type UnregisterRunnerRequest

type UnregisterRunnerRequest struct {
	Token string `json:"token,omitempty"`
}

type UpdateJobInfo

type UpdateJobInfo struct {
	ID            int
	State         JobState
	Trace         *string
	FailureReason JobFailureReason
}

type UpdateJobRequest

type UpdateJobRequest struct {
	Info          VersionInfo      `json:"info,omitempty"`
	Token         string           `json:"token,omitempty"`
	State         JobState         `json:"state,omitempty"`
	FailureReason JobFailureReason `json:"failure_reason,omitempty"`
	Trace         *string          `json:"trace,omitempty"`
}

type UpdateState

type UpdateState int
const (
	UpdateSucceeded UpdateState = iota
	UpdateNotFound
	UpdateAbort
	UpdateFailed
	UpdateRangeMismatch
)

type UploadState

type UploadState int
const (
	UploadSucceeded UploadState = iota
	UploadTooLarge
	UploadForbidden
	UploadFailed
)

type VerifyRunnerRequest

type VerifyRunnerRequest struct {
	Token string `json:"token,omitempty"`
}

type VersionInfo

type VersionInfo struct {
	Name         string       `json:"name,omitempty"`
	Version      string       `json:"version,omitempty"`
	Revision     string       `json:"revision,omitempty"`
	Platform     string       `json:"platform,omitempty"`
	Architecture string       `json:"architecture,omitempty"`
	Executor     string       `json:"executor,omitempty"`
	Features     FeaturesInfo `json:"features"`
}

type VirtualBoxConfig

type VirtualBoxConfig struct {
	BaseName         string `toml:"base_name" json:"base_name" long:"base-name" env:"VIRTUALBOX_BASE_NAME" description:"VM name to be used"`
	BaseSnapshot     string `` /* 165-byte string literal not displayed */
	DisableSnapshots bool   `` /* 175-byte string literal not displayed */
}

Jump to

Keyboard shortcuts

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