Skip to content

Commit

Permalink
style(cdk): rename lifecycle event cdk-cleanup (#1092)
Browse files Browse the repository at this point in the history
As a Lacework CDK developer,
I need a way to run cleanup event for my component,
So that I can remove any file, cache, libraries, etc. during component removal.

**Description**

When installing new CDK components, users use the command `lacework component install <component>`
which runs the lifecycle event `cdk-init`, this event helps components to deploy any necessary
file, cache, config, libraries, etc. during installation. When users want to uninstall the
component, we should have a cleanup event to remove anything deployed.

Jira: https://lacework.atlassian.net/browse/GROW-1081

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>

Signed-off-by: Salim Afiune Maya <afiune@lacework.net>
  • Loading branch information
afiune authored Jan 6, 2023
1 parent 606fc22 commit 4969c91
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cli/cmd/component.go
Original file line number Diff line number Diff line change
Expand Up @@ -492,8 +492,8 @@ func runComponentsDelete(_ *cobra.Command, args []string) (err error) {
}

cli.StartProgress("Cleaning component data...")
// component life cycle: remove
stdout, stderr, errCmd := component.RunAndReturn([]string{"cdk-remove"}, nil, cli.envs()...)
// component life cycle: cleanup
stdout, stderr, errCmd := component.RunAndReturn([]string{"cdk-cleanup"}, nil, cli.envs()...)
if errCmd != nil {
cli.Log.Warnw("component life cycle",
"error", errCmd.Error(), "stdout", stdout, "stderr", stderr)
Expand Down

0 comments on commit 4969c91

Please sign in to comment.