smartbuild

package
v0.0.0-...-fa857ea Latest Latest
Warning

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

Go to latest
Published: May 3, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// OktetoEnableSmartBuildEnvVar represents whether the feature flag to enable smart builds is enabled or not
	OktetoEnableSmartBuildEnvVar = "OKTETO_SMART_BUILDS_ENABLED"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Ctrl

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

Ctrl is the controller for smart builds

func NewSmartBuildCtrl

func NewSmartBuildCtrl(repo repositoryInterface, registry registryController, fs afero.Fs, ioCtrl *io.Controller) *Ctrl

NewSmartBuildCtrl creates a new smart build controller

func (*Ctrl) CloneGlobalImageToDev

func (s *Ctrl) CloneGlobalImageToDev(image string) (string, error)

CloneGlobalImageToDev clones the image from the global registry to the dev registry if needed if the built image belongs to global registry we clone it to the dev registry so that in can be used in dev containers (i.e. okteto up)

func (*Ctrl) GetBuildHash

func (s *Ctrl) GetBuildHash(buildInfo *build.Info, service string) string

GetBuildHash returns the hash of the build based on the env vars

func (*Ctrl) GetProjectHash

func (s *Ctrl) GetProjectHash(buildInfo *build.Info) (string, error)

GetProjectHash returns the commit hash of the project

func (*Ctrl) GetServiceHash

func (s *Ctrl) GetServiceHash(buildInfo *build.Info, service string) string

GetServiceHash returns the hash of the service

func (*Ctrl) IsEnabled

func (s *Ctrl) IsEnabled() bool

IsEnabled returns true if smart builds are enabled, false otherwise

Jump to

Keyboard shortcuts

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