aws-greengrass / aws-greengrass-gdk-cli

The Greengrass Development Kit - Command Line Interface (GDK CLI) is a tool that helps you create Greengrass V2 components either using templates or community repositories.
https://docs.aws.amazon.com/greengrass/v2/developerguide/greengrass-development-kit-cli.html
Apache License 2.0
28 stars 18 forks source link

support a new build type for components with no artifacts #74

Open massi-ang opened 2 years ago

massi-ang commented 2 years ago

Describe the bug I have a component with no artifacts, just a recipe. When I use gdk component publish, the command fails saying

[Errno 2] No such file or directory: '/Users/xxx/Projects/comp/greengrass-build/recipes/recipe.yaml'

To Reproduce Steps to reproduce the behavior. If possible, provide a minimal amount of code that causes the bug.

Create a compoent with only a recipe, no artifacts. In the gdk-config.json file, provide a noop custom build command (eg date) so the gdk component build succeeds.

Call gdk component publish

Expected behavior A clear and concise description of what you expected to happen.

Component is successfully published

Actual behavior Tell us what actually happened.

Error

[Errno 2] No such file or directory: '/Users/xxx/Projects/comp/greengrass-build/recipes/recipe.yaml'

Environment

Additional context Add any other context about the problem here.

E.g. what is the impact of the bug?

saranyailla commented 2 years ago

Hi, This is the expected behavior and thank you for reporting this use case. If the customer chooses custom build in the config file, we expect customers to modify/build the recipes and artifacts as needed and have them available in the greengrass-build folder by the end of the build command execution.

These will later be used by the publish command.

I'm going to re-label this as documentation as it is needs to be specified in the documentation explicitly.

Edit: Since, having only recipes with no artifacts for a component is a common use case, we decided to actively track the support for it.

saranyailla commented 2 years ago

Hi, AWS Public Documentation for GDK CLI is updated with more details related to custom build command.