Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( NewDeployRunner = newDeployRunner NewCloudRunDeployRunner = newCloudRunDeployRunner )
for testing
var (
NewRenderRunner = newRenderRunner
)
for testing
Functions ¶
func SetupStaticEnvOptions ¶
func SetupStaticEnvOptions(cfg Config)
Types ¶
type BuildEnvOpts ¶
type BuildEnvOpts struct {
Image string
PushImage bool
ImageRepo string
ImageTag string
BuildContext string
}
BuildEnvOpts contains the environment variables to be set in a build type lifecycle hook executor.
func NewBuildEnvOpts ¶
NewBuildEnvOpts returns `BuildEnvOpts` required to create a `Runner` for build lifecycle hooks
type DeployEnvOpts ¶
type DeployEnvOpts struct {
RunID string
KubeContext string
Namespaces Namespaces
}
DeployEnvOpts contains the environment variables to be set in a deploy type lifecycle hook executor.
func NewDeployEnvOpts ¶
func NewDeployEnvOpts(runID string, kubeContext string, namespaces []string) DeployEnvOpts
type MockRunner ¶
type MockRunner struct {
PreHooks func(ctx context.Context, out io.Writer) error
PostHooks func(ctx context.Context, out io.Writer) error
}
MockRunner implements the Runner interface, to be used in unit tests
func (MockRunner) RunPostHooks ¶
func (MockRunner) RunPreHooks ¶
type Namespaces ¶ added in v2.8.0
type Namespaces []string
func (Namespaces) String ¶ added in v2.8.0
func (ns Namespaces) String() string
type RenderEnvOpts ¶
RenderEnvOpts contains the environment variables to be set in a deploy type lifecycle hook executor.
func NewRenderEnvOpts ¶
func NewRenderEnvOpts(kubeContext string, namespaces []string) RenderEnvOpts
type RenderHookRunner ¶ added in v2.10.0
type Runner ¶
type Runner interface {
// RunPreHooks executes all pre-step hooks defined by the `Runner`
RunPreHooks(ctx context.Context, out io.Writer) error
// RunPostHooks executes all post-step hooks defined by the `Runner`
RunPostHooks(ctx context.Context, out io.Writer) error
}
Runner represents a lifecycle hooks runner
func BuildRunner ¶
func BuildRunner(d latest.BuildHooks, opts BuildEnvOpts) Runner
BuildRunner creates a new runner for pre-build and post-build lifecycle hooks
type StaticEnvOpts ¶
type StaticEnvOpts struct {
DefaultRepo *string
MultiLevelRepo *bool
RPCPort *int
HTTPPort *int
WorkDir string
}
StaticEnvOpts contains the environment variables to be set in a lifecycle hook executor that don't change during the lifetime of the process.