scm

package
v0.7.0-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CloneRepo

func CloneRepo(token string, codeSource *api.CodeSource, ref string, folder string) (string, error)

CloneRepo represents clone repo to `destPath`, `ref` is for main repo.

func CloneRepos

func CloneRepos(token string, codeSources *api.CodeCheckoutStage, ref string) (string, error)

CloneRepo represents clone main repo and dep repos.

func GetCloneDir

func GetCloneDir() string

GetCloneDir returns the clone dir.

func GetCommitID

func GetCommitID(codeSource *api.CodeSource, folder string) (string, error)

func GetCommitLog

func GetCommitLog(codeSource *api.CodeSource, folder string) (api.CommitLog, error)

func GetRepoName

func GetRepoName(codeSource *api.CodeSource) (string, error)

func RegisterProvider

func RegisterProvider(scmType api.SCMType, provider SCMProvider) error

RegisterProvider registers SCM providers.

Types

type SCMProvider

type SCMProvider interface {
	Clone(token, url, ref, destPath string) (string, error)
	GetCommitID(repoPath string) (string, error)
	GetCommitLog(repoPath string) api.CommitLog
}

func GetSCMProvider

func GetSCMProvider(scmType api.SCMType) (SCMProvider, error)

GetSCMProvider gets the SCM provider by the type.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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