scm

package
Version: v0.5.4 Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2019 License: Apache-2.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildCompleted added in v0.1.0

func BuildCompleted(scms []*SCM, reportUrl string) error

func BuildErrored added in v0.1.0

func BuildErrored(scms []*SCM, reportUrl string) error

func BuildStarted added in v0.1.0

func BuildStarted(scms []*SCM) error

func IsCommitNotFound added in v0.1.0

func IsCommitNotFound(err error) bool

func ReportBuild added in v0.2.0

func ReportBuild(scms []*SCM, success bool, reportUrl string) error

Types

type Provider

type Provider string
const (
	ProviderGithub    Provider = "github"
	ProviderBitbucket Provider = "bitbucket"
	ProviderGitlab    Provider = "gitlab"
	ProviderGitea     Provider = "gitea"
	ProviderGogs      Provider = "gogs"
	ProviderStash     Provider = "stash"
)

type SCM

type SCM struct {
	Provider  *Provider `hcl:"provider"`
	URL       *string   `hcl:"url"`
	Token     string    `hcl:"token"`
	Repo      *string   `hcl:"repo"`
	Remote    *string   `hcl:"remote"`
	Condition *string   `hcl:"condition"`
	Git       git.Repository
	// contains filtered or unexported fields
}

func InitSCMs

func InitSCMs(scms []*SCM, env map[string]string) ([]*SCM, error)

func (SCM) BuildCanceled

func (s SCM) BuildCanceled(reportUrl string) error

func (SCM) BuildCompleted

func (s SCM) BuildCompleted(reportUrl string) error

func (SCM) BuildErrored

func (s SCM) BuildErrored(reportUrl string) error

func (SCM) BuildFailed

func (s SCM) BuildFailed(reportUrl string) error

func (SCM) BuildStarted

func (s SCM) BuildStarted() error

func (*SCM) GetProvider

func (s *SCM) GetProvider() Provider

func (*SCM) GetRepo

func (s *SCM) GetRepo() string

func (*SCM) GetURL

func (s *SCM) GetURL() (string, error)

func (*SCM) Init

func (s *SCM) Init(ctx context.Context) (err error)

func (SCM) PostStatus

func (s SCM) PostStatus(state State, commit string, message string, reportUrl string) error

type State

type State int
const (
	StateUnknown State = iota
	StatePending
	StateRunning
	StateSuccess
	StateFailure
	StateCanceled
	StateError
)

Source Files

Jump to

Keyboard shortcuts

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