build

package
v0.37.2 Latest Latest
Warning

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

Go to latest
Published: Dec 31, 2025 License: Apache-2.0 Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetLog added in v0.37.0

func GetLog(arg *container.Build, ids ...string) (string, error)

func StepperImages added in v0.31.0

func StepperImages(images ...string) func(build container.Build) []string

Types

type BuildCategory added in v0.30.3

type BuildCategory string

BuildCategory represents different phases of the build pipeline

const (
	Auth      BuildCategory = "auth"      // Authentication & credentials
	PreBuild  BuildCategory = "prebuild"  // Setup, protobuf, dependencies
	Build     BuildCategory = "build"     // Language-specific compilation
	PostBuild BuildCategory = "postbuild" // Production artifacts, packaging
	Quality   BuildCategory = "quality"   // Linting, testing, security scanning
	Apply     BuildCategory = "apply"     // Infrastructure changes
	Publish   BuildCategory = "publish"   // Publishing, releases, notifications
)

type BuildContext

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

func ToBuildContexts added in v0.2.1

func ToBuildContexts(steps ...BuildStepv3) []*BuildContext

func (*BuildContext) Build added in v0.37.0

func (bc *BuildContext) Build() BuildStepv3

type BuildResult added in v0.37.1

type BuildResult struct {
	Loop  container.BuildLoop
	Error error
	IDs   []string
}

type BuildSteps

type BuildSteps struct {
	Steps []*BuildContext
	// contains filtered or unexported fields
}

func NewBuildSteps

func NewBuildSteps(steps ...BuildStepv3) *BuildSteps

func (*BuildSteps) Add

func (bs *BuildSteps) Add(step BuildStepv3)

func (*BuildSteps) AddAfter added in v0.30.3

func (bs *BuildSteps) AddAfter(stepName string, step BuildStepv3) error

func (*BuildSteps) AddAsync

func (bs *BuildSteps) AddAsync(step BuildStepv3)

func (*BuildSteps) AddAsyncAfter added in v0.30.3

func (bs *BuildSteps) AddAsyncAfter(stepName string, step BuildStepv3) error

func (*BuildSteps) AddAsyncBefore added in v0.30.3

func (bs *BuildSteps) AddAsyncBefore(stepName string, step BuildStepv3) error

func (*BuildSteps) AddAsyncToCategory added in v0.30.3

func (bs *BuildSteps) AddAsyncToCategory(category BuildCategory, step BuildStepv3) error

func (*BuildSteps) AddBefore added in v0.30.3

func (bs *BuildSteps) AddBefore(stepName string, step BuildStepv3) error

Hook-based insertion methods

func (*BuildSteps) AddToCategory added in v0.30.3

func (bs *BuildSteps) AddToCategory(category BuildCategory, step BuildStepv3) error

Category-based addition methods

func (*BuildSteps) GetCategoryOrder added in v0.30.3

func (bs *BuildSteps) GetCategoryOrder() []BuildCategory

GetCategoryOrder returns the categories in the order they appear in the build steps

func (*BuildSteps) GetStepsInCategory added in v0.30.3

func (bs *BuildSteps) GetStepsInCategory(category BuildCategory) []*BuildContext

GetStepsInCategory returns all steps in a specific category

func (*BuildSteps) Images

func (bs *BuildSteps) Images(groups container.BuildGroups) []string

func (*BuildSteps) Init added in v0.2.1

func (bs *BuildSteps) Init()

func (*BuildSteps) IsNotInit added in v0.2.1

func (bs *BuildSteps) IsNotInit() bool

func (*BuildSteps) PrintSteps

func (bs *BuildSteps) PrintSteps()

func (*BuildSteps) Replace added in v0.30.3

func (bs *BuildSteps) Replace(stepName string, step BuildStepv3) error

Replace existing step by name

func (*BuildSteps) Run

func (bs *BuildSteps) Run(arg *container.Build, step ...string) BuildResult

func (*BuildSteps) String

func (bs *BuildSteps) String() string

type BuildStepv2 added in v0.31.0

type BuildStepv2 interface {
	Alias() string
	BuildType() *container.BuildType
	Name() string
	Images(build container.Build) []string
	IsAsync() bool
	Matches(build container.Build) bool
	RunWithBuild(build container.Build) error
}

type BuildStepv3 added in v0.37.0

type BuildStepv3 interface {
	BuildStepv2
	RunWithBuildV3(build container.Build) (string, error)
}

type MatchesFunc added in v0.30.1

type MatchesFunc func(build container.Build) bool

type RunFuncv2 added in v0.31.0

type RunFuncv2 func(container.Build) error

type RunFuncv3 added in v0.37.0

type RunFuncv3 func(container.Build) (string, error)

type Stepper added in v0.31.0

type Stepper struct {
	RunFn      RunFuncv2
	RunFnV3    RunFuncv3
	MatchedFn  func(build container.Build) bool
	ImagesFn   func(build container.Build) []string
	BuildType_ container.BuildType
	Name_      string
	Alias_     string
	Async_     bool
}

func (Stepper) Alias added in v0.37.0

func (g Stepper) Alias() string

func (Stepper) BuildType added in v0.37.0

func (g Stepper) BuildType() *container.BuildType

func (Stepper) Images added in v0.31.0

func (g Stepper) Images(build container.Build) []string

func (Stepper) IsAsync added in v0.31.0

func (g Stepper) IsAsync() bool

func (Stepper) Matches added in v0.31.0

func (g Stepper) Matches(build container.Build) bool

Matches implements the Build interface provider matching logic

func (Stepper) Name added in v0.31.0

func (g Stepper) Name() string

func (Stepper) Run added in v0.31.0

func (g Stepper) Run() error

func (Stepper) RunWithBuild added in v0.31.0

func (g Stepper) RunWithBuild(build container.Build) error

func (Stepper) RunWithBuildV3 added in v0.37.0

func (g Stepper) RunWithBuildV3(build container.Build) (string, error)

Jump to

Keyboard shortcuts

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