v2

package
v0.0.0-...-06d3161 Latest Latest
Warning

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

Go to latest
Published: Apr 30, 2024 License: Apache-2.0 Imports: 29 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 OktetoBuilder

type OktetoBuilder struct {
	basic.Builder

	Registry oktetoRegistryInterface
	Config   oktetoBuilderConfigInterface
	// contains filtered or unexported fields
}

OktetoBuilder builds the images

func NewBuilder

func NewBuilder(builder buildCmd.OktetoBuilderInterface, registry oktetoRegistryInterface, ioCtrl *io.Controller, okCtx okteto.ContextInterface, k8sLogger *io.K8sLogger, onBuildFinish []OnBuildFinish) *OktetoBuilder

NewBuilder creates a new okteto builder

func NewBuilderFromScratch

func NewBuilderFromScratch(ioCtrl *io.Controller, onBuildFinish []OnBuildFinish) *OktetoBuilder

NewBuilderFromScratch creates a new okteto builder

func (*OktetoBuilder) Build

func (ob *OktetoBuilder) Build(ctx context.Context, options *types.BuildOptions) error

Build builds the images defined by a manifest TODO: Function with cyclomatic complexity higher than threshold. Refactor function in order to reduce its complexity skipcq: GO-R1005

func (*OktetoBuilder) GetBuildEnvVars

func (bc *OktetoBuilder) GetBuildEnvVars() map[string]string

GetBuildEnvVars gets okteto build env vars

func (*OktetoBuilder) GetServicesToBuildDuringDeploy

func (bc *OktetoBuilder) GetServicesToBuildDuringDeploy(ctx context.Context, manifest *model.Manifest, svcsToDeploy []string) ([]string, error)

GetServicesToBuildDuringDeploy returns the services it has to build if they are not already built this function is called from outside the build cmd and during a "deploy operation" (up, deploy, destroy, compose).

func (*OktetoBuilder) GetServicesToBuildForImage

func (bc *OktetoBuilder) GetServicesToBuildForImage(ctx context.Context, manifest *model.Manifest, imgFinder model.ImageFromManifest) ([]string, error)

func (*OktetoBuilder) IsV1

func (*OktetoBuilder) IsV1() bool

IsV1 returns false since it is a builder v2

func (*OktetoBuilder) SetServiceEnvVars

func (bc *OktetoBuilder) SetServiceEnvVars(service, reference string)

SetServiceEnvVars set okteto build env vars

type OnBuildFinish

type OnBuildFinish func(ctx context.Context, meta *analytics.ImageBuildMetadata)

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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