build

package
v0.23.1 Latest Latest
Warning

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

Go to latest
Published: Jul 30, 2024 License: Apache-2.0 Imports: 27 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrBuildNotFound = errors.New("build not found")
)

Functions

func IsBuildNotFound

func IsBuildNotFound(err error) bool

Types

type BuildOutcome

type BuildOutcome struct {
	Outcome               string `json:"outcome"`
	ContainerId           string `json:"containerId"`
	RemoteUser            string `json:"remoteUser"`
	RemoteWorkspaceFolder string `json:"remoteWorkspaceFolder"`
}

type BuildResult

type BuildResult struct {
	Hash              string `json:"hash"`
	User              string `json:"user"`
	ImageName         string `json:"imageName"`
	ProjectVolumePath string `json:"projectVolumePath"`

} // @name BuildResult

type Builder

type Builder struct {
	// contains filtered or unexported fields
}

func (*Builder) SaveBuildResults

func (b *Builder) SaveBuildResults(r BuildResult) error

type BuilderConfig

type BuilderConfig struct {
	Image                    string
	ContainerRegistryService containerregistries.IContainerRegistryService
	ServerConfigFolder       string
	ContainerRegistryServer  string
	BuildResultStore         Store
	// Namespace to be used when tagging and pushing the build image
	BuildImageNamespace string
	BasePath            string
	LoggerFactory       logs.LoggerFactory
	DefaultProjectImage string
	DefaultProjectUser  string
}

type BuilderFactory

type BuilderFactory struct {
	// contains filtered or unexported fields
}

func (*BuilderFactory) CheckExistingBuild

func (f *BuilderFactory) CheckExistingBuild(p workspace.Project) (*BuildResult, error)

func (*BuilderFactory) Create

type BuilderFactoryConfig

type BuilderFactoryConfig struct {
	BuilderConfig
	CreateGitService func(projectDir string, logWriter io.Writer) git.IGitService
}

type DevcontainerBuilder

type DevcontainerBuilder struct {
	*Builder
	// contains filtered or unexported fields
}

func (*DevcontainerBuilder) Build

func (b *DevcontainerBuilder) Build() (*BuildResult, error)

func (*DevcontainerBuilder) CleanUp

func (b *DevcontainerBuilder) CleanUp() error

func (*DevcontainerBuilder) Publish

func (b *DevcontainerBuilder) Publish() error

type IBuilder

type IBuilder interface {
	Build() (*BuildResult, error)
	CleanUp() error
	Publish() error
	SaveBuildResults(r BuildResult) error
}

type IBuilderFactory

type IBuilderFactory interface {
	Create(p workspace.Project, gpc *gitprovider.GitProviderConfig) (IBuilder, error)
	CheckExistingBuild(p workspace.Project) (*BuildResult, error)
}

func NewBuilderFactory

func NewBuilderFactory(config BuilderFactoryConfig) IBuilderFactory

type Store

type Store interface {
	Find(hash string) (*BuildResult, error)
	List() ([]*BuildResult, error)
	Save(buildResult *BuildResult) error
	Delete(hash string) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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