Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: CDK component v1 #1401

Merged
merged 3 commits into from
Oct 11, 2023
Merged

Conversation

jon-stewart
Copy link
Contributor

@jon-stewart jon-stewart commented Oct 9, 2023

Summary

CDK components v1:

  • list
  • show
  • install

Dependency injection of Stager into the Catalog. This means we can swap out download and archival functionality without affecting the Catalog or CDKComponent.

Made an explicit distinction between apiInfo and hostInfo. These structs included in the CDKComponent using composition.

We now stage components. This means to download the artifact to a temporary directory and validate before we install.

How did you test this change?

  • unit testing
  • manual testing
> lacework components list                                        
     STATUS             NAME          VERSION   DESCRIPTION
----------------+-------------------+---------+--------------
  Not Installed   component-example   0.7.30
  Deprecated      iac                 0.6.10
  Deprecated      sast                0.0.55

Components version: 0.3.0
> lacework components show component-example
     STATUS             NAME          VERSION   DESCRIPTION
----------------+-------------------+---------+--------------
  Not Installed   component-example   0.7.30

The following versions of this component are available to install:
 - 0.7.22
 - 0.7.28
 - 0.7.29
 - 0.7.30
> lacework components install component-example
 [✓] Component component-example staged
 [✓] Component signature verified
 [✓] Component installed

> ls -la ~/.config/lacework/components/component-example                         
total 968
drwxr-xr-x  7 j0n  staff     224  9 Oct 14:21 .
drwxr-xr-x  6 j0n  staff     192  9 Oct 14:21 ..
-rw-r--r--  1 j0n  staff     624  9 Oct 14:21 .signature
-rw-r--r--  1 j0n  staff       7  9 Oct 14:21 .version
-rw-r--r--  1 j0n  staff  483919  9 Oct 14:21 component-example
> lacework components list
    STATUS           NAME          VERSION   DESCRIPTION
-------------+-------------------+---------+--------------
  Installed    component-example   0.7.30
  Deprecated   iac                 0.6.10
  Deprecated   sast                0.0.55

Components version: 0.3.0
> lacework components show component-example
   STATUS           NAME          VERSION   DESCRIPTION
------------+-------------------+---------+--------------
  Installed   component-example   0.7.30

The following versions of this component are available to install:
 - 0.7.22
 - 0.7.28
 - 0.7.29
 - 0.7.30 (installed)

Issue

https://lacework.atlassian.net/browse/GROW-2329

- list
- show
- install
@jon-stewart jon-stewart self-assigned this Oct 9, 2023
@jon-stewart jon-stewart requested a review from a team as a code owner October 9, 2023 13:50
@jon-stewart jon-stewart changed the title feat(GROW-2329): CDK component v1 feat: CDK component v1 Oct 10, 2023
@jon-stewart jon-stewart merged commit e80e318 into main Oct 11, 2023
@jon-stewart jon-stewart deleted the jon-stewart/GROW-2329/cdk-components branch October 11, 2023 12:44
@lacework-releng lacework-releng mentioned this pull request Oct 11, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants