Skip to main content

run_hooks

Function run_hooks 

Source
pub fn run_hooks(
    exec: &dyn CommandRunner,
    caproni_cfg: &CaproniConfig,
    resolver: &dyn Resolver,
    repo_config: &RepositoryConfig,
    repo_name: &str,
    hooks: &[LifecycleHookConfig],
    kubeconfig_file: Option<&Config>,
) -> Result<(), HooksError>
Expand description

Ported from RunHooks. kubeconfig_file is a temporary kubeconfig (created and owned by the caller). When Some, it is exposed to each hook process via KUBECONFIG and KUBECACHEDIR environment variables, so that kubectl/helm invocations inside the hook target the Caproni-managed cluster. When None (e.g. during edit_mode_prepare hooks that run before the cluster is available), hooks run without cluster env vars set.