Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var (
NewDeployRunner = newDeployRunner
)
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 ¶ added in v1.30.0
NewBuildEnvOpts returns `BuildEnvOpts` required to create a `Runner` for build lifecycle hooks
type DeployEnvOpts ¶
DeployEnvOpts contains the environment variables to be set in a deploy type lifecycle hook executor.
func NewDeployEnvOpts ¶ added in v1.30.0
func NewDeployEnvOpts(runID string, kubeContext string, namespaces []string) DeployEnvOpts
type MockRunner ¶ added in v1.31.0
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 ¶ added in v1.31.0
func (MockRunner) RunPreHooks ¶ added in v1.31.0
type Runner ¶ added in v1.30.0
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 ¶ added in v1.30.0
func BuildRunner(d v1.BuildHooks, opts BuildEnvOpts) Runner
BuildRunner creates a new runner for pre-build and post-build lifecycle hooks
type StaticEnvOpts ¶
StaticEnvOpts contains the environment variables to be set in a lifecycle hook executor that don't change during the lifetime of the process.
Source Files ¶
Click to show internal directories.
Click to hide internal directories.