config

package
v2.6.1 Latest Latest
Warning

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

Go to latest
Published: Jun 18, 2024 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Index

Constants

This section is empty.

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 string, imagesToProcess []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 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
}

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
	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
	Platform        []string
	// contains filtered or unexported fields
}

func (*ImageFromDockerfile) GetName

func (c *ImageFromDockerfile) GetName() string

func (*ImageFromDockerfile) IsStapel

func (c *ImageFromDockerfile) IsStapel() bool

type ImageInterface

type ImageInterface interface {
	GetName() string
	IsStapel() bool
}

type Import

type Import struct {
	*ArtifactExport
	ImageName    string
	ArtifactName string
	Before       string
	After        string
	Stage        string
	// 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 {
	Platform []string
}

type MetaCleanup

type MetaCleanup struct {
	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 {
	MetaCleanupKeepPolicyLimit
}

type MetaCleanupKeepPolicyLimit

type MetaCleanupKeepPolicyLimit struct {
	Last     *int
	In       *time.Duration
	Operator *Operator
}

func (*MetaCleanupKeepPolicyLimit) String

func (c *MetaCleanupKeepPolicyLimit) String() string

type MetaCleanupKeepPolicyReferences

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

func (*MetaCleanupKeepPolicyReferences) String

type MetaDeploy

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

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 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 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

type StapelImageBase

type StapelImageBase struct {
	Name             string
	From             string
	FromLatest       bool
	FromImageName    string
	FromArtifactName string
	FromCacheVersion string
	Git              *GitManager
	Shell            *Shell
	Ansible          *Ansible
	Mount            []*Mount
	Import           []*Import
	Dependencies     []*Dependency
	Platform         []string
	// contains filtered or unexported fields
}

func (*StapelImageBase) GetName

func (c *StapelImageBase) GetName() string

func (*StapelImageBase) ImageBaseConfig

func (c *StapelImageBase) ImageBaseConfig() *StapelImageBase

func (*StapelImageBase) IsArtifact

func (c *StapelImageBase) IsArtifact() bool

func (*StapelImageBase) IsStapel

func (c *StapelImageBase) IsStapel() bool

type StapelImageInterface

type StapelImageInterface interface {
	ImageInterface

	ImageBaseConfig() *StapelImageBase
	IsArtifact() bool
	// contains filtered or unexported methods
}

type WerfConfig

type WerfConfig struct {
	Meta                 *Meta
	StapelImages         []*StapelImage
	ImagesFromDockerfile []*ImageFromDockerfile
	Artifacts            []*StapelImageArtifact
}

func GetWerfConfig

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

func (*WerfConfig) CheckThatImagesExist

func (c *WerfConfig) CheckThatImagesExist(names []string) error

func (*WerfConfig) GetAllImages

func (c *WerfConfig) GetAllImages() []ImageInterface

func (*WerfConfig) GetArtifact

func (c *WerfConfig) GetArtifact(imageName string) *StapelImageArtifact

func (*WerfConfig) GetDockerfileImage

func (c *WerfConfig) GetDockerfileImage(imageName string) *ImageFromDockerfile

func (*WerfConfig) GetImage

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

func (*WerfConfig) GetImageGraphList

func (c *WerfConfig) GetImageGraphList(onlyImages []string, withoutImages bool) ([]imageGraph, error)

func (*WerfConfig) GetImageNameList

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

func (*WerfConfig) GetSpecificImages

func (c *WerfConfig) GetSpecificImages(onlyImages []string, withoutImages bool) ([]ImageInterface, error)

func (*WerfConfig) GetStapelImage

func (c *WerfConfig) GetStapelImage(imageName string) *StapelImage

func (*WerfConfig) GroupImagesByIndependentSets

func (c *WerfConfig) GroupImagesByIndependentSets(onlyImages []string, withoutImages bool) (sets [][]ImageInterface, err error)

func (*WerfConfig) HasImage

func (c *WerfConfig) HasImage(imageName string) bool

func (*WerfConfig) HasImageOrArtifact

func (c *WerfConfig) HasImageOrArtifact(imageName string) bool

func (*WerfConfig) HasNamelessImage

func (c *WerfConfig) HasNamelessImage() bool

type WerfConfigOptions

type WerfConfigOptions struct {
	LogRenderedFilePath bool
	Env                 string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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