Documentation
¶
Index ¶
- Constants
- func CommandsSchema() *jsonschema.Schema
- type BuildPlan
- type Cache
- type Command
- func NewCopyCommand(src string, dst ...string) Command
- func NewExecCommand(cmd string, options ...ExecOptions) Command
- func NewExecShellCommand(cmd string, options ...ExecOptions) Command
- func NewFileCommand(path, name string, options ...FileOptions) Command
- func NewPathCommand(path string, customName ...string) Command
- func NewVariableCommand(name, value string, customName ...string) Command
- func UnmarshalCommand(data []byte) (Command, error)
- func UnmarshalJsonCommand(data []byte) (Command, error)
- func UnmarshalStringCommand(data []byte) (Command, error)
- type CopyCommand
- type ExecCommand
- type ExecOptions
- type FileCommand
- type FileOptions
- type PathCommand
- type PlanPackages
- type Start
- type Step
- type VariableCommand
Constants ¶
View Source
const ( CacheTypeLocked = "locked" )
Variables ¶
This section is empty.
Functions ¶
func CommandsSchema ¶
func CommandsSchema() *jsonschema.Schema
Types ¶
type BuildPlan ¶
type BuildPlan struct {
BaseImage string `json:"baseImage,omitempty"`
Steps []Step `json:"steps,omitempty"`
Start Start `json:"start,omitempty"`
Caches map[string]*Cache `json:"caches,omitempty"`
Secrets []string `json:"secrets,omitempty"`
}
func NewBuildPlan ¶
func NewBuildPlan() *BuildPlan
type Cache ¶
type Command ¶
type Command interface {
CommandType() string
}
func NewCopyCommand ¶
func NewExecCommand ¶
func NewExecCommand(cmd string, options ...ExecOptions) Command
func NewExecShellCommand ¶
func NewExecShellCommand(cmd string, options ...ExecOptions) Command
func NewFileCommand ¶
func NewFileCommand(path, name string, options ...FileOptions) Command
func NewPathCommand ¶
func NewVariableCommand ¶
func UnmarshalCommand ¶
func UnmarshalJsonCommand ¶
func UnmarshalStringCommand ¶
type CopyCommand ¶
type CopyCommand struct {
Image string `json:"image,omitempty" jsonschema:"description=Optional source image to copy from. This can be any public image URL"`
Src string `json:"src" jsonschema:"description=Source path to copy from. Can be a file or directory"`
Dest string `json:"dest" jsonschema:"description=Destination path to copy to. Will be created if it doesn't exist"`
}
CopyCommand represents copying files or directories during the build
func (CopyCommand) CommandType ¶
func (c CopyCommand) CommandType() string
type ExecCommand ¶
type ExecCommand struct {
Cmd string `json:"cmd" jsonschema:"description=The shell command to execute (e.g. 'go build' or 'npm install')"`
Caches []string `` /* 199-byte string literal not displayed */
CustomName string `json:"customName,omitempty" jsonschema:"description=Optional custom name to display for this command in build output"`
}
ExecCommand represents a shell command to be executed during the build
func (ExecCommand) CommandType ¶
func (e ExecCommand) CommandType() string
type ExecOptions ¶
type FileCommand ¶
type FileCommand struct {
Path string `json:"path" jsonschema:"description=Directory path where the file should be created"`
Name string `json:"name" jsonschema:"description=Name of the file to create"`
Mode os.FileMode `json:"mode,omitempty" jsonschema:"description=Optional Unix file permissions mode (e.g. 0644 for regular file)"`
CustomName string `json:"customName,omitempty" jsonschema:"description=Optional custom name to display for this file operation"`
}
FileCommand represents creating or modifying a file during the build
func (FileCommand) CommandType ¶
func (f FileCommand) CommandType() string
type FileOptions ¶
type PathCommand ¶
type PathCommand struct {
Path string `` /* 167-byte string literal not displayed */
}
PathCommand represents adding a directory to the global PATH environment variable
func (PathCommand) CommandType ¶
func (g PathCommand) CommandType() string
type PlanPackages ¶
type PlanPackages struct {
Apt []string `json:"apt,omitempty"`
Mise map[string]string `json:"mise,omitempty"`
}
func NewPlanPackages ¶
func NewPlanPackages() *PlanPackages
func (*PlanPackages) AddAptPackage ¶
func (p *PlanPackages) AddAptPackage(pkg string)
func (*PlanPackages) AddMisePackage ¶
func (p *PlanPackages) AddMisePackage(pkg string, version string)
type Start ¶
type Start struct {
// The image to use for the container runtime
BaseImage string `json:"baseImage,omitempty"`
// The command to run in the container
Command string `json:"cmd,omitempty"`
// Outputs to be copied from the container to the host
Outputs []string `json:"outputs,omitempty"`
// $PATHs to be prefixed to the container's base $PATH
Paths []string `json:"paths,omitempty"`
// Environment variables to set in the container. These are not available at build time.
Variables map[string]string `json:"variables,omitempty"`
}
type Step ¶
type Step struct {
// The name of the step
Name string `json:"name,omitempty" jsonschema:"description=The name of the step"`
// The steps that this step depends on. The step will only run after all the steps in DependsOn have run
DependsOn []string `` /* 153-byte string literal not displayed */
// The commands to run in this step
Commands *[]Command `json:"commands,omitempty" jsonschema:"description=The commands to run in this step"`
// Whether the commands executed in this step should have access to secrets
UseSecrets *bool `json:"useSecrets,omitempty" jsonschema:"description=Whether the commands executed in this step should have access to secrets"`
// Paths that this step outputs. Only these paths will be available to the next step
Outputs *[]string `` /* 131-byte string literal not displayed */
// The assets available to this step. The key is the name of the asset that is referenced in a file command
Assets map[string]string `` /* 153-byte string literal not displayed */
// The base image that will be used for this step
// If empty (default), the base image will be the one from the previous step
// Only set this if you don't want to reuse any part of the file system from the previous step
StartingImage string `` /* 270-byte string literal not displayed */
}
func (*Step) AddCommands ¶
func (Step) JSONSchemaExtend ¶
func (Step) JSONSchemaExtend(schema *jsonschema.Schema)
func (*Step) UnmarshalJSON ¶
type VariableCommand ¶
type VariableCommand struct {
Name string `json:"name" jsonschema:"description=Name of the environment variable to set (e.g. 'NODE_ENV')"`
Value string `json:"value" jsonschema:"description=Value to set for the environment variable (e.g. 'production')"`
}
VariableCommand represents setting an environment variable for the build
func (VariableCommand) CommandType ¶
func (v VariableCommand) CommandType() string
Click to show internal directories.
Click to hide internal directories.