Documentation
¶
Index ¶
Constants ¶
const StepTest = "test"
StepTest is the detected test command. It is not a provisioning step: it exists only as the input to the Dockerfile CMD that `chunk sidecar build` generates from a piped env spec, and is never run as part of the sidecar setup sequence. How a project's tests are actually invoked is user-owned config — see config.ProjectConfig.Commands.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Environment ¶
type Environment struct {
Stack string `json:"stack"`
Setup []Step `json:"setup"`
Image string `json:"image"`
ImageVersion string `json:"image_version"`
}
Environment describes the detected tech stack and build configuration for a repository.
func (*Environment) BinaryPaths ¶
func (e *Environment) BinaryPaths() string
BinaryPaths returns colon-separated PATH prefixes needed for the detected stack. cimg images set these via Docker ENV which e2b does not propagate to SSH sessions.
func (*Environment) ForConfig ¶ added in v0.7.139
func (e *Environment) ForConfig() *Environment
ForConfig returns a copy of e suitable for persisting to .chunk/config.json, with the StepTest step removed so that Setup contains only steps that are really run during setup.
Callers that generate a Dockerfile must use the full env spec, not this copy: dropping StepTest drops the image's CMD.
func (*Environment) ProvisioningSteps ¶ added in v0.7.139
func (e *Environment) ProvisioningSteps() int
ProvisioningSteps returns the number of steps that really run during setup, i.e. Setup without StepTest. Zero for a nil receiver.
func (*Environment) SetupStep ¶
func (e *Environment) SetupStep(name string) string
SetupStep returns the command for the named setup step, or "" if absent.