Documentation ¶
Index ¶
- Constants
- type ArtifactImportAfterInstallStage
- type ArtifactImportAfterSetupStage
- type ArtifactImportBeforeInstallStage
- type ArtifactImportBeforeSetupStage
- type ArtifactImportStage
- type BaseStage
- func (s *BaseStage) AfterImageSyncDockerStateHook(_ Conveyor) error
- func (s *BaseStage) GetDependencies(_ Conveyor, _ imagePkg.ImageInterface) (string, error)
- func (s *BaseStage) GetGitPaths() []*GitPath
- func (s *BaseStage) GetImage() imagePkg.ImageInterface
- func (s *BaseStage) GetSignature() string
- func (s *BaseStage) IsEmpty(_ Conveyor, _ imagePkg.ImageInterface) (bool, error)
- func (s *BaseStage) Name() StageName
- func (s *BaseStage) PreRunHook(_ Conveyor) error
- func (s *BaseStage) PrepareImage(_ Conveyor, prevBuiltImage, image imagePkg.ImageInterface) error
- func (s *BaseStage) SetGitPaths(gitPaths []*GitPath)
- func (s *BaseStage) SetImage(image imagePkg.ImageInterface)
- func (s *BaseStage) SetSignature(signature string)
- func (s *BaseStage) ShouldBeReset(builtImage imagePkg.ImageInterface) (bool, error)
- type BeforeInstallStage
- type BeforeSetupStage
- type ContainerFileDescriptor
- type Conveyor
- type DockerInstructionsStage
- type FromStage
- type GitArchiveStage
- type GitCacheStage
- type GitLatestPatchStage
- type GitPatchStage
- type GitPath
- func (gp *GitPath) AddGitCommitToImageLabels(image image.ImageInterface, commit string)
- func (gp *GitPath) ApplyArchiveCommand(image image.ImageInterface) error
- func (gp *GitPath) ApplyPatchCommand(prevBuiltImage, image image.ImageInterface) error
- func (gp *GitPath) GetCommitsToPatch(prevBuiltImage image.ImageInterface) (string, string, error)
- func (gp *GitPath) GetFullName() string
- func (gp *GitPath) GetGitCommitFromImageLabels(builtImage image.ImageInterface) string
- func (gp *GitPath) GetParamshash() string
- func (gp *GitPath) GitRepo() git_repo.GitRepo
- func (gp *GitPath) ImageGitCommitLabel() string
- func (gp *GitPath) IsEmpty() (bool, error)
- func (gp *GitPath) IsLocal() bool
- func (gp *GitPath) IsPatchEmpty(prevBuiltImage image.ImageInterface) (bool, error)
- func (gp *GitPath) LatestCommit() (string, error)
- func (gp *GitPath) PatchSize(fromCommit string) (int64, error)
- func (gp *GitPath) StageDependenciesChecksum(stageName StageName) (string, error)
- type GitStage
- type InstallStage
- type Interface
- type NewBaseStageOptions
- type NewGitArchiveStageOptions
- type NewGitPatchStageOptions
- type SetupStage
- type StageName
- type UserStage
- type UserWithGitPatchStage
Constants ¶
View Source
const GitArchiveResetCommitRegex = "(\\[werf reset\\])|(\\[reset werf\\])"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ArtifactImportAfterInstallStage ¶
type ArtifactImportAfterInstallStage struct {
*ArtifactImportStage
}
func GenerateArtifactImportAfterInstallStage ¶
func GenerateArtifactImportAfterInstallStage(imageBaseConfig *config.ImageBase, baseStageOptions *NewBaseStageOptions) *ArtifactImportAfterInstallStage
type ArtifactImportAfterSetupStage ¶
type ArtifactImportAfterSetupStage struct {
*ArtifactImportStage
}
func GenerateArtifactImportAfterSetupStage ¶
func GenerateArtifactImportAfterSetupStage(imageBaseConfig *config.ImageBase, baseStageOptions *NewBaseStageOptions) *ArtifactImportAfterSetupStage
type ArtifactImportBeforeInstallStage ¶
type ArtifactImportBeforeInstallStage struct {
*ArtifactImportStage
}
func GenerateArtifactImportBeforeInstallStage ¶
func GenerateArtifactImportBeforeInstallStage(imageBaseConfig *config.ImageBase, baseStageOptions *NewBaseStageOptions) *ArtifactImportBeforeInstallStage
type ArtifactImportBeforeSetupStage ¶
type ArtifactImportBeforeSetupStage struct {
*ArtifactImportStage
}
func GenerateArtifactImportBeforeSetupStage ¶
func GenerateArtifactImportBeforeSetupStage(imageBaseConfig *config.ImageBase, baseStageOptions *NewBaseStageOptions) *ArtifactImportBeforeSetupStage
type ArtifactImportStage ¶
type ArtifactImportStage struct { *BaseStage // contains filtered or unexported fields }
func (*ArtifactImportStage) GetDependencies ¶
func (s *ArtifactImportStage) GetDependencies(c Conveyor, _ image.ImageInterface) (string, error)
func (*ArtifactImportStage) PreRunHook ¶
func (s *ArtifactImportStage) PreRunHook(c Conveyor) error
func (*ArtifactImportStage) PrepareImage ¶
func (s *ArtifactImportStage) PrepareImage(c Conveyor, _, image image.ImageInterface) error
type BaseStage ¶
type BaseStage struct {
// contains filtered or unexported fields
}
func (*BaseStage) AfterImageSyncDockerStateHook ¶
func (*BaseStage) GetDependencies ¶
func (*BaseStage) GetGitPaths ¶
func (*BaseStage) GetImage ¶
func (s *BaseStage) GetImage() imagePkg.ImageInterface
func (*BaseStage) GetSignature ¶
func (*BaseStage) PreRunHook ¶
func (*BaseStage) PrepareImage ¶
func (s *BaseStage) PrepareImage(_ Conveyor, prevBuiltImage, image imagePkg.ImageInterface) error
func (*BaseStage) SetGitPaths ¶
func (*BaseStage) SetImage ¶
func (s *BaseStage) SetImage(image imagePkg.ImageInterface)
func (*BaseStage) SetSignature ¶
func (*BaseStage) ShouldBeReset ¶
func (s *BaseStage) ShouldBeReset(builtImage imagePkg.ImageInterface) (bool, error)
type BeforeInstallStage ¶
type BeforeInstallStage struct {
*UserStage
}
func GenerateBeforeInstallStage ¶
func GenerateBeforeInstallStage(imageBaseConfig *config.ImageBase, baseStageOptions *NewBaseStageOptions) *BeforeInstallStage
func (*BeforeInstallStage) GetDependencies ¶
func (s *BeforeInstallStage) GetDependencies(_ Conveyor, _ image.ImageInterface) (string, error)
func (*BeforeInstallStage) PrepareImage ¶
func (s *BeforeInstallStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type BeforeSetupStage ¶
type BeforeSetupStage struct {
*UserWithGitPatchStage
}
func GenerateBeforeSetupStage ¶
func GenerateBeforeSetupStage(imageBaseConfig *config.ImageBase, gitPatchStageOptions *NewGitPatchStageOptions, baseStageOptions *NewBaseStageOptions) *BeforeSetupStage
func (*BeforeSetupStage) GetDependencies ¶
func (s *BeforeSetupStage) GetDependencies(_ Conveyor, _ image.ImageInterface) (string, error)
func (*BeforeSetupStage) PrepareImage ¶
func (s *BeforeSetupStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type ContainerFileDescriptor ¶
type DockerInstructionsStage ¶
type DockerInstructionsStage struct { *BaseStage // contains filtered or unexported fields }
func GenerateDockerInstructionsStage ¶
func GenerateDockerInstructionsStage(imageConfig *config.Image, baseStageOptions *NewBaseStageOptions) *DockerInstructionsStage
func (*DockerInstructionsStage) GetDependencies ¶
func (s *DockerInstructionsStage) GetDependencies(_ Conveyor, _ image.ImageInterface) (string, error)
func (*DockerInstructionsStage) PrepareImage ¶
func (s *DockerInstructionsStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type FromStage ¶
type FromStage struct { *BaseStage // contains filtered or unexported fields }
func GenerateFromStage ¶
func GenerateFromStage(imageBaseConfig *config.ImageBase, baseStageOptions *NewBaseStageOptions) *FromStage
func (*FromStage) GetDependencies ¶
func (*FromStage) PrepareImage ¶
func (s *FromStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type GitArchiveStage ¶
func NewGitArchiveStage ¶
func NewGitArchiveStage(gitArchiveStageOptions *NewGitArchiveStageOptions, baseStageOptions *NewBaseStageOptions) *GitArchiveStage
func (*GitArchiveStage) GetDependencies ¶
func (s *GitArchiveStage) GetDependencies(_ Conveyor, _ image.ImageInterface) (string, error)
func (*GitArchiveStage) PrepareImage ¶
func (s *GitArchiveStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type GitCacheStage ¶
type GitCacheStage struct {
*GitPatchStage
}
func NewGitCacheStage ¶
func NewGitCacheStage(gitPatchStageOptions *NewGitPatchStageOptions, baseStageOptions *NewBaseStageOptions) *GitCacheStage
func (*GitCacheStage) GetDependencies ¶
func (s *GitCacheStage) GetDependencies(_ Conveyor, prevImage image.ImageInterface) (string, error)
type GitLatestPatchStage ¶
type GitLatestPatchStage struct {
*GitPatchStage
}
func NewGitLatestPatchStage ¶
func NewGitLatestPatchStage(gitPatchStageOptions *NewGitPatchStageOptions, baseStageOptions *NewBaseStageOptions) *GitLatestPatchStage
func (*GitLatestPatchStage) GetDependencies ¶
func (s *GitLatestPatchStage) GetDependencies(_ Conveyor, prevImage image.ImageInterface) (string, error)
func (*GitLatestPatchStage) IsEmpty ¶
func (s *GitLatestPatchStage) IsEmpty(c Conveyor, prevBuiltImage image.ImageInterface) (bool, error)
type GitPatchStage ¶
type GitPatchStage struct { *GitStage PatchesDir string ArchivesDir string ContainerPatchesDir string ContainerArchivesDir string }
func (*GitPatchStage) IsEmpty ¶
func (s *GitPatchStage) IsEmpty(c Conveyor, prevBuiltImage image.ImageInterface) (bool, error)
func (*GitPatchStage) PrepareImage ¶
func (s *GitPatchStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type GitPath ¶
type GitPath struct { GitRepoInterface git_repo.GitRepo LocalGitRepo *git_repo.Local RemoteGitRepo *git_repo.Remote Name string As string Branch string Tag string Commit string To string RepoPath string Cwd string Owner string Group string IncludePaths []string ExcludePaths []string StagesDependencies map[StageName][]string PatchesDir string ContainerPatchesDir string ArchivesDir string ContainerArchivesDir string }
func (*GitPath) AddGitCommitToImageLabels ¶
func (gp *GitPath) AddGitCommitToImageLabels(image image.ImageInterface, commit string)
func (*GitPath) ApplyArchiveCommand ¶
func (gp *GitPath) ApplyArchiveCommand(image image.ImageInterface) error
func (*GitPath) ApplyPatchCommand ¶
func (gp *GitPath) ApplyPatchCommand(prevBuiltImage, image image.ImageInterface) error
func (*GitPath) GetCommitsToPatch ¶
func (*GitPath) GetFullName ¶
func (*GitPath) GetGitCommitFromImageLabels ¶
func (gp *GitPath) GetGitCommitFromImageLabels(builtImage image.ImageInterface) string
func (*GitPath) GetParamshash ¶
func (*GitPath) ImageGitCommitLabel ¶
func (*GitPath) IsPatchEmpty ¶
func (gp *GitPath) IsPatchEmpty(prevBuiltImage image.ImageInterface) (bool, error)
func (*GitPath) LatestCommit ¶
type GitStage ¶
type GitStage struct {
*BaseStage
}
func (*GitStage) AfterImageSyncDockerStateHook ¶
func (*GitStage) PrepareImage ¶
func (s *GitStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type InstallStage ¶
type InstallStage struct {
*UserWithGitPatchStage
}
func GenerateInstallStage ¶
func GenerateInstallStage(imageBaseConfig *config.ImageBase, gitPatchStageOptions *NewGitPatchStageOptions, baseStageOptions *NewBaseStageOptions) *InstallStage
func (*InstallStage) GetDependencies ¶
func (s *InstallStage) GetDependencies(_ Conveyor, _ image.ImageInterface) (string, error)
func (*InstallStage) PrepareImage ¶
func (s *InstallStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type Interface ¶
type Interface interface { Name() StageName IsEmpty(c Conveyor, prevBuiltImage image.ImageInterface) (bool, error) ShouldBeReset(builtImage image.ImageInterface) (bool, error) GetDependencies(c Conveyor, prevImage image.ImageInterface) (string, error) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error AfterImageSyncDockerStateHook(Conveyor) error PreRunHook(Conveyor) error SetSignature(signature string) GetSignature() string SetImage(image.ImageInterface) GetImage() image.ImageInterface SetGitPaths([]*GitPath) GetGitPaths() []*GitPath }
type NewBaseStageOptions ¶
type NewGitPatchStageOptions ¶
type SetupStage ¶
type SetupStage struct {
*UserWithGitPatchStage
}
func GenerateSetupStage ¶
func GenerateSetupStage(imageBaseConfig *config.ImageBase, gitPatchStageOptions *NewGitPatchStageOptions, baseStageOptions *NewBaseStageOptions) *SetupStage
func (*SetupStage) GetDependencies ¶
func (s *SetupStage) GetDependencies(_ Conveyor, _ image.ImageInterface) (string, error)
func (*SetupStage) PrepareImage ¶
func (s *SetupStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
type StageName ¶
type StageName string
const ( From StageName = "from" BeforeInstall StageName = "before_install" ArtifactImportBeforeInstall StageName = "imports_before_install" GitArchive StageName = "git_archive" Install StageName = "install" ArtifactImportAfterInstall StageName = "imports_after_install" BeforeSetup StageName = "before_setup" ArtifactImportBeforeSetup StageName = "imports_before_setup" Setup StageName = "setup" ArtifactImportAfterSetup StageName = "imports_after_setup" GitCache StageName = "git_cache" GitLatestPatch StageName = "git_latest_patch" DockerInstructions StageName = "docker_instructions" )
type UserWithGitPatchStage ¶
type UserWithGitPatchStage struct { *UserStage GitPatchStage *GitPatchStage }
func (*UserWithGitPatchStage) AfterImageSyncDockerStateHook ¶
func (s *UserWithGitPatchStage) AfterImageSyncDockerStateHook(c Conveyor) error
func (*UserWithGitPatchStage) PrepareImage ¶
func (s *UserWithGitPatchStage) PrepareImage(c Conveyor, prevBuiltImage, image image.ImageInterface) error
Source Files ¶
- artifact_import.go
- artifact_import_after_install.go
- artifact_import_after_setup.go
- artifact_import_before_install.go
- artifact_import_before_setup.go
- base.go
- before_install.go
- before_setup.go
- conveyor.go
- docker_instructions.go
- from.go
- git.go
- git_archive.go
- git_cache.go
- git_latest_patch.go
- git_patch.go
- git_path.go
- install.go
- interface.go
- setup.go
- user.go
- user_with_git_patch.go
Click to show internal directories.
Click to hide internal directories.