pipeline

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 4, 2018 License: Apache-2.0 Imports: 23 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatePipeline

func CreatePipeline(p *gaia.CreatePipeline)

CreatePipeline is the main function which executes step by step the creation of a plugin. After each step, the status is written to store and can be retrieved via API.

func GitLSRemote

func GitLSRemote(repo *gaia.GitRepo) error

GitLSRemote get remote branches from a git repo without actually cloning the repo. This is great for looking if we have access to this repo.

func InitTicker

func InitTicker(store *store.Store, scheduler *scheduler.Scheduler)

InitTicker inititates the pipeline ticker. This periodic job will check for new pipelines.

Types

type ActivePipelines

type ActivePipelines struct {
	sync.RWMutex

	// All active pipelines
	Pipelines []gaia.Pipeline
}

ActivePipelines holds all active pipelines. ActivePipelines can be safely shared between goroutines.

var (
	// GlobalActivePipelines holds globally all current active pipleines.
	GlobalActivePipelines *ActivePipelines
)

func NewActivePipelines

func NewActivePipelines() *ActivePipelines

NewActivePipelines creates a new instance of ActivePipelines

func (*ActivePipelines) Append

func (ap *ActivePipelines) Append(p gaia.Pipeline)

Append appends a new pipeline to ActivePipelines.

func (*ActivePipelines) Contains

func (ap *ActivePipelines) Contains(n string) bool

Contains checks if the given pipeline name has been already appended to the given ActivePipelines instance.

func (*ActivePipelines) GetByName

func (ap *ActivePipelines) GetByName(n string) *gaia.Pipeline

GetByName looks up the pipeline by the given name.

func (*ActivePipelines) Iter

func (ap *ActivePipelines) Iter() <-chan gaia.Pipeline

Iter iterates over the pipelines in the concurrent slice.

func (*ActivePipelines) Replace

func (ap *ActivePipelines) Replace(p gaia.Pipeline) bool

Replace takes the given pipeline and replaces it in the ActivePipelines slice. Return true when success otherwise false.

type BuildPipeline

type BuildPipeline interface {
	// PrepareEnvironment prepares the environment before we start the
	// build process.
	PrepareEnvironment(*gaia.CreatePipeline) error

	// ExecuteBuild executes the compiler and tracks the status of
	// the compiling process.
	ExecuteBuild(*gaia.CreatePipeline) error

	// CopyBinary copies the result from the compile process
	// to the plugins folder.
	CopyBinary(*gaia.CreatePipeline) error
}

BuildPipeline is the interface for pipelines which are not yet compiled.

type BuildPipelineGolang

type BuildPipelineGolang struct {
	Type gaia.PipelineType
}

BuildPipelineGolang is the real implementation of BuildPipeline for golang

func (*BuildPipelineGolang) CopyBinary

func (b *BuildPipelineGolang) CopyBinary(p *gaia.CreatePipeline) error

CopyBinary copies the final compiled archive to the destination folder.

func (*BuildPipelineGolang) ExecuteBuild

func (b *BuildPipelineGolang) ExecuteBuild(p *gaia.CreatePipeline) error

ExecuteBuild executes the golang build process

func (*BuildPipelineGolang) PrepareEnvironment

func (b *BuildPipelineGolang) PrepareEnvironment(p *gaia.CreatePipeline) error

PrepareEnvironment prepares the environment before we start the build process.

Jump to

Keyboard shortcuts

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