Documentation ¶
Index ¶
- Constants
- func GetConfigDir() string
- func GetKeptnNamespace() string
- func GetProjectConfigPath(project string) string
- func GetProjectMetadataFilePath(project string) string
- func GetServiceConfigPath(project, service string) string
- func GetTemporaryUpstreamCredentialsSecretName(projectName string) string
- func GetTmpProjectConfigPath(project string) string
- func GetUpstreamCredentialsSecretName(projectName string) string
- func IsEmpty(name string) (bool, error)
- func IsHelmChartPath(resourcePath string) bool
- func Lock()
- func LockProject(project string)
- func Unlock()
- func UnlockProject(project string)
- type CredentialReader
- type FileSystem
- func (FileSystem) DeleteFile(path string) error
- func (FileSystem) FileExists(path string) bool
- func (fw FileSystem) MakeDir(path string) error
- func (fw FileSystem) ReadFile(filename string) ([]byte, error)
- func (fw FileSystem) WalkPath(path string, walkFunc filepath.WalkFunc) error
- func (fw FileSystem) WriteBase64EncodedFile(path string, content string) error
- func (fw FileSystem) WriteFile(path string, content []byte) error
- func (fw FileSystem) WriteHelmChart(path string) error
- type Git
- func (g *Git) CheckUpstreamConnection(gitContext common_models.GitContext) error
- func (g *Git) CheckoutBranch(gitContext common_models.GitContext, branch string) error
- func (g Git) CloneRepo(gitContext common_models.GitContext) (bool, error)
- func (g *Git) CreateBranch(gitContext common_models.GitContext, branch string, sourceBranch string) error
- func (g *Git) GetCurrentRevision(gitContext common_models.GitContext) (string, error)
- func (g *Git) GetDefaultBranch(gitContext common_models.GitContext) (string, error)
- func (g *Git) GetFileRevision(gitContext common_models.GitContext, revision string, file string) ([]byte, error)
- func (g *Git) MigrateProject(gitContext common_models.GitContext, newMetadataContent []byte) error
- func (g *Git) MoveToNewUpstream(currentContext common_models.GitContext, newContext common_models.GitContext) error
- func (g *Git) ProjectExists(gitContext common_models.GitContext) bool
- func (g *Git) ProjectRepoExists(project string) bool
- func (g *Git) Pull(gitContext common_models.GitContext) error
- func (g Git) Push(gitContext common_models.GitContext) error
- func (g Git) ResetHard(gitContext common_models.GitContext, rev string) error
- func (g Git) StageAndCommitAll(gitContext common_models.GitContext, message string) (string, error)
- type Git2Go
- type Gogit
- type GogitReal
- type IFileSystem
- type IGit
- type K8sCredentialReader
- type ProjectMetadata
- type RollbackFunc
- type ServiceMetadata
- type StageMetadata
Constants ¶
View Source
const StageDirectoryName = ".keptn-stages"
Variables ¶
This section is empty.
Functions ¶
func GetConfigDir ¶
func GetConfigDir() string
func GetKeptnNamespace ¶
func GetKeptnNamespace() string
func GetProjectConfigPath ¶
func GetServiceConfigPath ¶
func GetTmpProjectConfigPath ¶
func IsHelmChartPath ¶
func UnlockProject ¶
func UnlockProject(project string)
Types ¶
type CredentialReader ¶
type CredentialReader interface {
GetCredentials(project string) (*common_models.GitCredentials, error)
}
type FileSystem ¶
type FileSystem struct {
// contains filtered or unexported fields
}
func NewFileSystem ¶
func NewFileSystem(tmpDirLocation string) *FileSystem
func (FileSystem) DeleteFile ¶
func (FileSystem) DeleteFile(path string) error
func (FileSystem) FileExists ¶
func (FileSystem) FileExists(path string) bool
func (FileSystem) MakeDir ¶
func (fw FileSystem) MakeDir(path string) error
func (FileSystem) WalkPath ¶
func (fw FileSystem) WalkPath(path string, walkFunc filepath.WalkFunc) error
func (FileSystem) WriteBase64EncodedFile ¶
func (fw FileSystem) WriteBase64EncodedFile(path string, content string) error
func (FileSystem) WriteHelmChart ¶
func (fw FileSystem) WriteHelmChart(path string) error
type Git ¶
type Git struct {
// contains filtered or unexported fields
}
func (*Git) CheckUpstreamConnection ¶
func (g *Git) CheckUpstreamConnection(gitContext common_models.GitContext) error
func (*Git) CheckoutBranch ¶
func (g *Git) CheckoutBranch(gitContext common_models.GitContext, branch string) error
func (Git) CloneRepo ¶
func (g Git) CloneRepo(gitContext common_models.GitContext) (bool, error)
func (*Git) CreateBranch ¶
func (g *Git) CreateBranch(gitContext common_models.GitContext, branch string, sourceBranch string) error
func (*Git) GetCurrentRevision ¶
func (g *Git) GetCurrentRevision(gitContext common_models.GitContext) (string, error)
func (*Git) GetDefaultBranch ¶
func (g *Git) GetDefaultBranch(gitContext common_models.GitContext) (string, error)
func (*Git) GetFileRevision ¶
func (g *Git) GetFileRevision(gitContext common_models.GitContext, revision string, file string) ([]byte, error)
func (*Git) MigrateProject ¶
func (g *Git) MigrateProject(gitContext common_models.GitContext, newMetadataContent []byte) error
func (*Git) MoveToNewUpstream ¶
func (g *Git) MoveToNewUpstream(currentContext common_models.GitContext, newContext common_models.GitContext) error
func (*Git) ProjectExists ¶
func (g *Git) ProjectExists(gitContext common_models.GitContext) bool
func (*Git) ProjectRepoExists ¶
func (*Git) Pull ¶
func (g *Git) Pull(gitContext common_models.GitContext) error
func (Git) Push ¶
func (g Git) Push(gitContext common_models.GitContext) error
func (Git) ResetHard ¶
func (g Git) ResetHard(gitContext common_models.GitContext, rev string) error
func (Git) StageAndCommitAll ¶
func (g Git) StageAndCommitAll(gitContext common_models.GitContext, message string) (string, error)
type Git2Go ¶
type Git2Go struct{}
func (Git2Go) PlainClone ¶
func (g Git2Go) PlainClone(gitContext common_models.GitContext, path string, isBare bool, o *git.CloneOptions) (*git.Repository, error)
type Gogit ¶
type Gogit interface { PlainOpen(path string) (*git.Repository, error) PlainClone(gitContext common_models.GitContext, path string, isBare bool, o *git.CloneOptions) (*git.Repository, error) PlainInit(path string, isBare bool) (*git.Repository, error) }
type GogitReal ¶
type GogitReal struct{}
func (GogitReal) PlainClone ¶
func (t GogitReal) PlainClone(gitContext common_models.GitContext, path string, isBare bool, o *git.CloneOptions) (*git.Repository, error)
type IFileSystem ¶
type IFileSystem interface { WriteBase64EncodedFile(path string, content string) error WriteHelmChart(path string) error WriteFile(path string, content []byte) error ReadFile(filename string) ([]byte, error) DeleteFile(path string) error FileExists(path string) bool MakeDir(path string) error WalkPath(path string, walkFunc filepath.WalkFunc) error }
IFileSystem is an interface for writing files
type IGit ¶
type IGit interface { ProjectExists(gitContext common_models.GitContext) bool ProjectRepoExists(projectName string) bool CloneRepo(gitContext common_models.GitContext) (bool, error) StageAndCommitAll(gitContext common_models.GitContext, message string) (string, error) Push(gitContext common_models.GitContext) error Pull(gitContext common_models.GitContext) error CreateBranch(gitContext common_models.GitContext, branch string, sourceBranch string) error CheckoutBranch(gitContext common_models.GitContext, branch string) error GetFileRevision(gitContext common_models.GitContext, revision string, file string) ([]byte, error) GetCurrentRevision(gitContext common_models.GitContext) (string, error) GetDefaultBranch(gitContext common_models.GitContext) (string, error) MigrateProject(gitContext common_models.GitContext, newMetadatacontent []byte) error ResetHard(gitContext common_models.GitContext, revision string) error MoveToNewUpstream(currentContext common_models.GitContext, newContext common_models.GitContext) error CheckUpstreamConnection(gitContext common_models.GitContext) error }
IGit provides functions to interact with the git repository of a project
type K8sCredentialReader ¶
type K8sCredentialReader struct {
// contains filtered or unexported fields
}
func NewK8sCredentialReader ¶
func NewK8sCredentialReader(k8sClient kubernetes.Interface) *K8sCredentialReader
func (K8sCredentialReader) GetCredentials ¶
func (kr K8sCredentialReader) GetCredentials(secretName string) (*common_models.GitCredentials, error)
type ProjectMetadata ¶
type RollbackFunc ¶
type RollbackFunc func() error
type ServiceMetadata ¶
type StageMetadata ¶
Source Files ¶
Click to show internal directories.
Click to hide internal directories.