config

package
v2.73.2 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2026 License: Apache-2.0 Imports: 34 Imported by: 0

Documentation

Overview

Package config is a generated GoMock package.

Index

Constants

View Source
const DefaultKeepImagesBuiltWithinLastNHours uint64 = 2

Variables

This section is empty.

Functions

func GetDefaultProjectName

func GetDefaultProjectName(ctx context.Context, giterminismManager giterminism_manager.Interface) (string, error)

func InterfaceToStringArray

func InterfaceToStringArray(stringOrStringArray, configSection interface{}, doc *doc) ([]string, error)

func RenderWerfConfig

func RenderWerfConfig(ctx context.Context, customWerfConfigRelPath, customWerfConfigTemplatesDirRelPath, customWerfConfigRenderPath string, imageNameList []string, giterminismManager giterminism_manager.Interface, opts WerfConfigOptions) error

Types

type Ansible

type Ansible struct {
	BeforeInstall             []*AnsibleTask
	Install                   []*AnsibleTask
	BeforeSetup               []*AnsibleTask
	Setup                     []*AnsibleTask
	CacheVersion              string
	BeforeInstallCacheVersion string
	InstallCacheVersion       string
	BeforeSetupCacheVersion   string
	SetupCacheVersion         string
	// contains filtered or unexported fields
}

func (*Ansible) GetDumpConfigSection

func (c *Ansible) GetDumpConfigSection() string

type AnsibleTask

type AnsibleTask struct {
	Config interface{}
	// contains filtered or unexported fields
}

func (*AnsibleTask) GetDumpConfigSection

func (c *AnsibleTask) GetDumpConfigSection() string

type ArtifactExport

type ArtifactExport struct {
	*ExportBase
	// contains filtered or unexported fields
}

type Dependency

type Dependency struct {
	ImageName string
	Before    string
	After     string
	Imports   []*DependencyImport
	// contains filtered or unexported fields
}

type DependencyImport

type DependencyImport struct {
	Type           DependencyImportType
	TargetBuildArg string
	TargetEnv      string
	// contains filtered or unexported fields
}

type DependencyImportType

type DependencyImportType string
const (
	ImageNameImport   DependencyImportType = "ImageName"
	ImageTagImport    DependencyImportType = "ImageTag"
	ImageRepoImport   DependencyImportType = "ImageRepo"
	ImageIDImport     DependencyImportType = "ImageID"
	ImageDigestImport DependencyImportType = "ImageDigest"
)

type DependsOn added in v2.7.0

type DependsOn struct {
	From         string   `yaml:"from,omitempty"`
	Imports      []string `yaml:"import,omitempty"`
	Dependencies []string `yaml:"dependencies,omitempty"`
}

type Docker

type Docker struct {
	Volume      []string
	Expose      []string
	Env         map[string]string
	Label       map[string]string
	Cmd         string
	Workdir     string
	User        string
	Entrypoint  string
	HealthCheck string

	ExactValues bool
	// contains filtered or unexported fields
}

type ExportBase

type ExportBase struct {
	Add          string
	To           string
	IncludePaths []string
	ExcludePaths []string
	Owner        string
	Group        string
	// contains filtered or unexported fields
}

func (*ExportBase) AddExcludePath

func (c *ExportBase) AddExcludePath(arg string)

func (*ExportBase) AutoExcludeExportAndCheck

func (c *ExportBase) AutoExcludeExportAndCheck(exp autoExcludeExport) bool

func (*ExportBase) GetExcludePathsForAutoExclude

func (c *ExportBase) GetExcludePathsForAutoExclude() []string

func (*ExportBase) GetIncludePathsForAutoExclude

func (c *ExportBase) GetIncludePathsForAutoExclude() []string

func (*ExportBase) GetRaw

func (c *ExportBase) GetRaw() interface{}

func (*ExportBase) GetTo

func (c *ExportBase) GetTo() string

func (*ExportBase) GitMappingAdd

func (c *ExportBase) GitMappingAdd() string

func (*ExportBase) GitMappingTo

func (c *ExportBase) GitMappingTo() string

type GitExport

type GitExport struct {
	*ExportBase
	// contains filtered or unexported fields
}

type GitExportBase

type GitExportBase struct {
	*GitExport
	StageDependencies *StageDependencies
}

type GitLocal

type GitLocal struct {
	*GitLocalExport
	// contains filtered or unexported fields
}

func (*GitLocal) GetRaw

func (c *GitLocal) GetRaw() interface{}

type GitLocalExport

type GitLocalExport struct {
	*GitExportBase
	// contains filtered or unexported fields
}

type GitManager

type GitManager struct {
	Local  []*GitLocal
	Remote []*GitRemote
	// contains filtered or unexported fields
}

type GitRemote

type GitRemote struct {
	*GitRemoteExport
	Name string
	Url  string
	// contains filtered or unexported fields
}

func (*GitRemote) GetRaw

func (c *GitRemote) GetRaw() interface{}

type GitRemoteExport

type GitRemoteExport struct {
	*GitLocalExport
	BasicAuth *git_repo.BasicAuthCredentials
	Branch    string
	Tag       string
	Commit    string
	// contains filtered or unexported fields
}

type ImageFromDockerfile

type ImageFromDockerfile struct {
	Name            string
	Dockerfile      string
	Context         string
	ContextAddFiles []string
	Target          string
	Args            map[string]interface{}
	AddHost         []string
	Network         string
	SSH             string
	Dependencies    []*Dependency
	Staged          bool
	Secrets         []Secret
	ImageSpec       *ImageSpec
	// contains filtered or unexported fields
}

func (*ImageFromDockerfile) CacheVersion added in v2.30.0

func (c *ImageFromDockerfile) CacheVersion() string

func (*ImageFromDockerfile) GetFrom added in v2.47.0

func (c *ImageFromDockerfile) GetFrom() string

func (*ImageFromDockerfile) GetName

func (c *ImageFromDockerfile) GetName() string

func (*ImageFromDockerfile) IsFinal added in v2.7.0

func (c *ImageFromDockerfile) IsFinal() bool

func (*ImageFromDockerfile) IsStapel

func (c *ImageFromDockerfile) IsStapel() bool

func (*ImageFromDockerfile) Platform

func (c *ImageFromDockerfile) Platform() []string

func (*ImageFromDockerfile) SetFromExternal added in v2.47.0

func (c *ImageFromDockerfile) SetFromExternal()

type ImageInterface

type ImageInterface interface {
	CacheVersion() string
	GetName() string
	IsStapel() bool
	IsFinal() bool
	Platform() []string
	GetFrom() string
	SetFromExternal()
	// contains filtered or unexported methods
}

type ImageSpec added in v2.24.0

type ImageSpec struct {
	Author                  string            `yaml:"author,omitempty"`
	ClearHistory            bool              `yaml:"clearHistory,omitempty"`
	KeepEssentialWerfLabels bool              `yaml:"keepEssentialWerfLabels,omitempty"`
	ClearWerfLabels         bool              `yaml:"clearWerfLabels,omitempty"` // TODO: remove in v3.
	RemoveLabels            []string          `yaml:"removeLabels,omitempty"`
	RemoveVolumes           []string          `yaml:"removeVolumes,omitempty"`
	RemoveEnv               []string          `yaml:"removeEnv,omitempty"`
	ClearCmd                bool              `yaml:"clearCmd,omitempty"`
	ClearEntrypoint         bool              `yaml:"clearEntrypoint,omitempty"`
	ClearUser               bool              `yaml:"clearUser,omitempty"`
	ClearWorkingDir         bool              `yaml:"clearWorkingDir,omitempty"`
	Volumes                 []string          `yaml:"volumes,omitempty"`
	Labels                  map[string]string `yaml:"labels,omitempty"`
	Env                     map[string]string `yaml:"env,omitempty"`
	User                    string            `yaml:"user,omitempty"`
	Cmd                     []string          `yaml:"cmd,omitempty"`
	Entrypoint              []string          `yaml:"entrypoint,omitempty"`
	WorkingDir              string            `yaml:"workingDir,omitempty"`
	StopSignal              string            `yaml:"stopSignal,omitempty"`
	Expose                  []string          `yaml:"expose,omitempty"`
	Healthcheck             *healthConfig     `yaml:"healthcheck,omitempty"`
	// contains filtered or unexported fields
}

type ImagesToProcess added in v2.10.8

type ImagesToProcess struct {
	ImageNameList      []string
	FinalImageNameList []string
	WithoutImages      bool
}

func NewImagesToProcess added in v2.10.8

func NewImagesToProcess(werfConfig *WerfConfig, imageNameList []string, onlyFinal, withoutImages bool) (ImagesToProcess, error)

type Import

type Import struct {
	*ArtifactExport
	ImageName     string
	ArtifactName  string
	Before        string
	After         string
	Stage         string
	ExternalImage bool
	// contains filtered or unexported fields
}

func (*Import) GetRaw

func (c *Import) GetRaw() interface{}

type Meta

type Meta struct {
	ConfigVersion int
	Project       string
	Deploy        MetaDeploy
	Cleanup       MetaCleanup
	GitWorktree   MetaGitWorktree
	Build         MetaBuild
}

type MetaBuild

type MetaBuild struct {
	CacheVersion string
	Platform     []string
	Staged       bool
	ImageSpec    *ImageSpec
}

type MetaCleanup

type MetaCleanup struct {
	DisableCleanup                     bool
	DisableKubernetesBasedPolicy       bool
	DisableGitHistoryBasedPolicy       bool
	DisableBuiltWithinLastNHoursPolicy bool
	KeepImagesBuiltWithinLastNHours    uint64
	KeepPolicies                       []*MetaCleanupKeepPolicy
}

type MetaCleanupKeepPolicy

type MetaCleanupKeepPolicy struct {
	References         MetaCleanupKeepPolicyReferences
	ImagesPerReference MetaCleanupKeepPolicyImagesPerReference
}

func (*MetaCleanupKeepPolicy) String

func (p *MetaCleanupKeepPolicy) String() string

type MetaCleanupKeepPolicyImagesPerReference

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

func NewMetaCleanupKeepPolicyImagesPerReference added in v2.10.0

func NewMetaCleanupKeepPolicyImagesPerReference(last *int, in *time.Duration, operator *Operator) MetaCleanupKeepPolicyImagesPerReference

func (*MetaCleanupKeepPolicyImagesPerReference) In added in v2.10.0

func (c *MetaCleanupKeepPolicyImagesPerReference) In() *time.Duration

func (*MetaCleanupKeepPolicyImagesPerReference) Last added in v2.10.0

func (*MetaCleanupKeepPolicyImagesPerReference) Operator added in v2.10.0

func (*MetaCleanupKeepPolicyImagesPerReference) String added in v2.10.0

type MetaCleanupKeepPolicyReferences

type MetaCleanupKeepPolicyReferences struct {
	TagRegexp    *regexp.Regexp
	BranchRegexp *regexp.Regexp
	Limit        *MetaCleanupKeepPolicyReferencesLimit
}

func (*MetaCleanupKeepPolicyReferences) String

type MetaCleanupKeepPolicyReferencesLimit added in v2.10.0

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

func NewMetaCleanupKeepPolicyReferencesLimit added in v2.10.0

func NewMetaCleanupKeepPolicyReferencesLimit(last *int, in *time.Duration, operator *Operator) *MetaCleanupKeepPolicyReferencesLimit

func (*MetaCleanupKeepPolicyReferencesLimit) In added in v2.10.0

func (c *MetaCleanupKeepPolicyReferencesLimit) In() *time.Duration

func (*MetaCleanupKeepPolicyReferencesLimit) Last added in v2.10.0

func (*MetaCleanupKeepPolicyReferencesLimit) Operator added in v2.10.0

func (*MetaCleanupKeepPolicyReferencesLimit) String added in v2.10.0

type MetaDeploy

type MetaDeploy struct {
	HelmChartConfig MetaDeployHelmChartConfig
	HelmChartDir    *string
	HelmRelease     *string
	HelmReleaseSlug *bool
	Namespace       *string
	NamespaceSlug   *bool
}

type MetaDeployHelmChartConfig added in v2.16.0

type MetaDeployHelmChartConfig struct {
	AppVersion *string
}

type MetaGitWorktree

type MetaGitWorktree struct {
	ForceShallowClone                  *bool
	AllowUnshallow                     *bool
	AllowFetchingOriginBranchesAndTags *bool
}

func (MetaGitWorktree) GetAllowFetchingOriginBranchesAndTags

func (obj MetaGitWorktree) GetAllowFetchingOriginBranchesAndTags() bool

func (MetaGitWorktree) GetAllowUnshallow

func (obj MetaGitWorktree) GetAllowUnshallow() bool

func (MetaGitWorktree) GetForceShallowClone

func (obj MetaGitWorktree) GetForceShallowClone() bool

type MockImageInterface added in v2.41.0

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

MockImageInterface is a mock of ImageInterface interface.

func NewMockImageInterface added in v2.41.0

func NewMockImageInterface(ctrl *gomock.Controller) *MockImageInterface

NewMockImageInterface creates a new mock instance.

func (*MockImageInterface) CacheVersion added in v2.41.0

func (m *MockImageInterface) CacheVersion() string

CacheVersion mocks base method.

func (*MockImageInterface) EXPECT added in v2.41.0

EXPECT returns an object that allows the caller to indicate expected use.

func (*MockImageInterface) GetFrom added in v2.47.0

func (m *MockImageInterface) GetFrom() string

GetFrom mocks base method.

func (*MockImageInterface) GetName added in v2.41.0

func (m *MockImageInterface) GetName() string

GetName mocks base method.

func (*MockImageInterface) IsFinal added in v2.41.0

func (m *MockImageInterface) IsFinal() bool

IsFinal mocks base method.

func (*MockImageInterface) IsStapel added in v2.41.0

func (m *MockImageInterface) IsStapel() bool

IsStapel mocks base method.

func (*MockImageInterface) Platform added in v2.41.0

func (m *MockImageInterface) Platform() []string

Platform mocks base method.

func (*MockImageInterface) SetFromExternal added in v2.47.0

func (m *MockImageInterface) SetFromExternal()

SetFromExternal mocks base method.

type MockImageInterfaceMockRecorder added in v2.41.0

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

MockImageInterfaceMockRecorder is the mock recorder for MockImageInterface.

func (*MockImageInterfaceMockRecorder) CacheVersion added in v2.41.0

func (mr *MockImageInterfaceMockRecorder) CacheVersion() *gomock.Call

CacheVersion indicates an expected call of CacheVersion.

func (*MockImageInterfaceMockRecorder) GetFrom added in v2.47.6

GetFrom indicates an expected call of GetFrom.

func (*MockImageInterfaceMockRecorder) GetName added in v2.41.0

GetName indicates an expected call of GetName.

func (*MockImageInterfaceMockRecorder) IsFinal added in v2.41.0

IsFinal indicates an expected call of IsFinal.

func (*MockImageInterfaceMockRecorder) IsStapel added in v2.41.0

func (mr *MockImageInterfaceMockRecorder) IsStapel() *gomock.Call

IsStapel indicates an expected call of IsStapel.

func (*MockImageInterfaceMockRecorder) Platform added in v2.41.0

func (mr *MockImageInterfaceMockRecorder) Platform() *gomock.Call

Platform indicates an expected call of Platform.

func (*MockImageInterfaceMockRecorder) SetFromExternal added in v2.47.6

func (mr *MockImageInterfaceMockRecorder) SetFromExternal() *gomock.Call

SetFromExternal indicates an expected call of SetFromExternal.

type Mount

type Mount struct {
	To   string
	From string
	Type string
	// contains filtered or unexported fields
}

type Operator

type Operator string
var (
	OrOperator  Operator = "Or"
	AndOperator Operator = "And"
)

type Secret added in v2.14.0

type Secret struct {
	Id             string
	ValueFromEnv   string
	ValueFromSrc   string
	ValueFromPlain string
}

func GetValidatedSecrets added in v2.15.0

func GetValidatedSecrets(rawSecrets []*rawSecret, giterminismManager giterminism_manager.Interface, doc *doc) ([]Secret, error)

type Shell

type Shell struct {
	BeforeInstall             []string
	Install                   []string
	BeforeSetup               []string
	Setup                     []string
	CacheVersion              string
	BeforeInstallCacheVersion string
	InstallCacheVersion       string
	BeforeSetupCacheVersion   string
	SetupCacheVersion         string
	// contains filtered or unexported fields
}

func (*Shell) GetDumpConfigSection

func (c *Shell) GetDumpConfigSection() string

type StageDependencies

type StageDependencies struct {
	Install     []string
	Setup       []string
	BeforeSetup []string
	// contains filtered or unexported fields
}

type StapelImage

type StapelImage struct {
	*StapelImageBase
	Docker *Docker
}

type StapelImageArtifact

type StapelImageArtifact struct {
	*StapelImageBase
}

func (*StapelImageArtifact) IsArtifact

func (c *StapelImageArtifact) IsArtifact() bool

func (*StapelImageArtifact) IsFinal added in v2.7.0

func (c *StapelImageArtifact) IsFinal() bool

type StapelImageBase

type StapelImageBase struct {
	Name             string
	From             string
	FromLatest       bool
	FromArtifactName string
	FromCacheVersion string
	Git              *GitManager
	Shell            *Shell
	Ansible          *Ansible
	Mount            []*Mount
	Import           []*Import
	Dependencies     []*Dependency
	Secrets          []Secret
	ImageSpec        *ImageSpec
	Network          string

	FromExternal bool
	// contains filtered or unexported fields
}

func (*StapelImageBase) CacheVersion added in v2.30.0

func (c *StapelImageBase) CacheVersion() string

func (*StapelImageBase) GetFrom added in v2.47.0

func (c *StapelImageBase) GetFrom() string

func (*StapelImageBase) GetName

func (c *StapelImageBase) GetName() string

func (*StapelImageBase) ImageBaseConfig

func (c *StapelImageBase) ImageBaseConfig() *StapelImageBase

func (*StapelImageBase) IsFinal added in v2.7.0

func (c *StapelImageBase) IsFinal() bool

func (*StapelImageBase) IsGitAfterPatchDisabled added in v2.7.0

func (c *StapelImageBase) IsGitAfterPatchDisabled() bool

func (*StapelImageBase) IsStapel

func (c *StapelImageBase) IsStapel() bool

func (*StapelImageBase) Platform

func (c *StapelImageBase) Platform() []string

func (*StapelImageBase) SetFromExternal added in v2.47.0

func (c *StapelImageBase) SetFromExternal()

type StapelImageInterface

type StapelImageInterface interface {
	ImageInterface
	ImageBaseConfig() *StapelImageBase
	IsGitAfterPatchDisabled() bool
}

type WerfConfig

type WerfConfig struct {
	Meta *Meta
	// contains filtered or unexported fields
}

func GetWerfConfig

func GetWerfConfig(ctx context.Context, customWerfConfigRelPath, customWerfConfigTemplatesDirRelPath, customWerfConfigRenderPath string, giterminismManager giterminism_manager.Interface, opts WerfConfigOptions) (string, *WerfConfig, error)

func NewWerfConfig added in v2.47.0

func NewWerfConfig(meta *Meta, images []ImageInterface) *WerfConfig

func (*WerfConfig) GetImage

func (c *WerfConfig) GetImage(imageName string) ImageInterface

func (*WerfConfig) GetImageGraphList

func (c *WerfConfig) GetImageGraphList(imagesToProcess ImagesToProcess) ([]imageGraph, error)

func (*WerfConfig) GetImageNameList

func (c *WerfConfig) GetImageNameList(onlyFinal bool) []string

func (*WerfConfig) GroupImagesByIndependentSets

func (c *WerfConfig) GroupImagesByIndependentSets(imagesToProcess ImagesToProcess) (sets [][]ImageInterface, err error)

func (*WerfConfig) Images added in v2.7.0

func (c *WerfConfig) Images(onlyFinal bool) []ImageInterface

type WerfConfigOptions

type WerfConfigOptions struct {
	LogRenderedFilePath bool
	Env                 string
	DebugTemplates      bool
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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