Documentation
¶
Index ¶
- Variables
- func BuildImage(dir, image string, compose ComposeBuild, w io.Writer) error
- func CleanupInitConfig(dir string) error
- func GetInitConfigPath(dir string) string
- func PushImage(image string, w io.Writer) error
- func WriteInitConfig(dir string, useCompose bool, composeFile string) error
- func WriteInitConfigFull(dir string, cfg InitConfig) error
- type AppEntry
- type BuildahBuilder
- type Builder
- type ComposeBuild
- type DockerBuilder
- type InitConfig
- type PodmanBuilder
Constants ¶
This section is empty.
Variables ¶
var AllBuilders = []Builder{ DockerBuilder{}, PodmanBuilder{}, BuildahBuilder{}, }
AllBuilders is the ordered list of supported builders. First available one wins.
Functions ¶
func BuildImage ¶
func BuildImage(dir, image string, compose ComposeBuild, w io.Writer) error
BuildImage builds an image using the first available builder.
func CleanupInitConfig ¶
CleanupInitConfig removes .orkestra/bundle/.init.ork after a successful deployment.
func GetInitConfigPath ¶
GetInitConfigPath returns the absolute path to the .init.ork file located within the Orkestra bundle directory.
The file is stored at: <dir>/.orkestra/bundle/.init.ork This directory is ignored by git (via .gitignore rule for .orkestra/bundle/), ensuring the init configuration remains local to the environment and is not accidentally committed to version control.
The caller is responsible for creating the parent directories and the file itself. Use WriteInitConfig to write content, LoadInitConfig to load content and CleanupInitConfig to remove the file after a successful deployment.
func WriteInitConfig ¶
WriteInitConfig persists a single-app or compose config to .orkestra/bundle/.init.ork.
func WriteInitConfigFull ¶
func WriteInitConfigFull(dir string, cfg InitConfig) error
WriteInitConfigFull writes the full InitConfig to .orkestra/bundle/.init.ork.
Types ¶
type AppEntry ¶
type AppEntry struct {
Name string // app name — used for image tag, CR name, and katalog dir
Dir string // absolute path to the app's build context directory
Dockerfile string // path to Dockerfile (absolute or relative); empty = "Dockerfile" in Dir
}
AppEntry represents one application in a multi-app project.
type BuildahBuilder ¶
type BuildahBuilder struct{}
func (BuildahBuilder) Available ¶
func (BuildahBuilder) Available() bool
func (BuildahBuilder) Build ¶
func (BuildahBuilder) Build(dir, image string, compose ComposeBuild, w io.Writer) error
func (BuildahBuilder) Name ¶
func (BuildahBuilder) Name() string
type Builder ¶
type Builder interface {
Name() string
Build(dir, image string, compose ComposeBuild, w io.Writer) error
Push(image string, w io.Writer) error
Available() bool
}
Builder is the interface implemented by all container builders.
type ComposeBuild ¶
type ComposeBuild struct {
UseCompose bool // true → use compose build
ComposeFile string // path to docker-compose.yaml (only when UseCompose)
Dockerfile string // path to Dockerfile; empty → "Dockerfile" in the build dir
}
ComposeBuild describes how to build a container image.
type DockerBuilder ¶
type DockerBuilder struct{}
func (DockerBuilder) Available ¶
func (DockerBuilder) Available() bool
func (DockerBuilder) Build ¶
func (DockerBuilder) Build(dir, image string, compose ComposeBuild, w io.Writer) error
func (DockerBuilder) Name ¶
func (DockerBuilder) Name() string
type InitConfig ¶
type InitConfig struct {
UseCompose bool // true → compose-based build
ComposeFile string // path to docker-compose.yaml (only when UseCompose)
Apps []AppEntry // one entry per buildable app; empty = legacy single-app
}
InitConfig is the full configuration persisted in .orkestra/bundle/.init.ork. It bridges `ork doctor init` settings through to `ork doctor deploy`.
func LoadInitConfig ¶
func LoadInitConfig(dir string) (InitConfig, error)
LoadInitConfig reads .orkestra/bundle/.init.ork and returns the full InitConfig. Returns an empty InitConfig (no error) when the file does not exist.
type PodmanBuilder ¶
type PodmanBuilder struct{}
func (PodmanBuilder) Available ¶
func (PodmanBuilder) Available() bool
func (PodmanBuilder) Build ¶
func (PodmanBuilder) Build(dir, image string, compose ComposeBuild, w io.Writer) error
func (PodmanBuilder) Name ¶
func (PodmanBuilder) Name() string