pipeline

package
v0.0.0-...-16e729a Latest Latest
Warning

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

Go to latest
Published: May 21, 2017 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Index

Constants

View Source
const PTAttach = "PTRACE_ATTACH"

Variables

This section is empty.

Functions

func HealthCheck

func HealthCheck(conf *config.Service) interface{}

HealthCheck performs a health on deployed services

func Run

func Run(depTree *DepTree, repo *git.Repository, stateCom *statecom.StateCom, lastBuildCommit, currBuildCommit *string, testAll, shouldDeploy *bool) error

Run runs the build for all changed services

func RunTests

func RunTests(srv *Service) error

RunTests runs a serivce's tests

func TraverseTree

func TraverseTree(depSrv *DepService, repo *git.Repository, lastBuildCommit, currBuildCommit *string) error

TraverseTree traverses a dependency tree

Types

type DepService

type DepService struct {
	Parent   *DepService
	Children map[string]*DepService
	// contains filtered or unexported fields
}

DepService represents a service in the tree

type DepTree

type DepTree struct {
	CurrNode *DepService
}

DepTree is a dependency tree to determine whether or not to build services

func NewTreeList

func NewTreeList(proj *Project) (newTree *DepTree)

NewTreeList returns a list of dependency trees

type Project

type Project struct {
	State    string
	ABSPath  string
	Services map[string]*Service

	CloneOpts *git.CloneOptions
	// contains filtered or unexported fields
}

Project is a struct for the Project in the pipeline

func New

func New(conf *config.Config, creds *credentials.RawCredentials, clonePath, branch, last, curr string) *Project

New returns a new instance of a pipeline project

func (*Project) Checkout

func (p *Project) Checkout(repo *git.Repository, commit string) error

Checkout checks out the repo to the current commit or HEAD of the branch

func (*Project) Clone

func (p *Project) Clone() (repo *git.Repository, err error)

Clone clones a git repo

type Service

type Service struct {
	State string

	HasFailed bool
	// contains filtered or unexported fields
}

Service is a struct for services in the pipeline

func NewService

func NewService(srv config.Service, creds *credentials.RawCredentials, clonePath, last, curr string) *Service

NewService returns an instance of a pipeline service

func (*Service) ShouldBuild

func (s *Service) ShouldBuild(repo *git.Repository, lastBuildCommit, currBuildCommit *string) (bool, error)

ShouldBuild diffs a service's path and determs whether or not it needs to run the pipeline on it

Jump to

Keyboard shortcuts

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