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

chore:[CDS-105957]: Add Suggestions for managing dependencies before cdk deploy command #9125

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 17 additions & 0 deletions docs/continuous-delivery/cd-infrastructure/aws-cdk.md
Original file line number Diff line number Diff line change
Expand Up @@ -373,6 +373,23 @@ Ensure that the user Id used in the Git Clone step and steps that call Git comma
This issue can also occur for existing pipelines for users who have turned on the `CDS_CONTAINER_STEP_GROUP_RUN_AS_USER_AND_PRIVILEGED_FIX` feature flag as it changes the behavior of certain settings including `Run as User` when it is not configured. To fix this issue, set `Run as User` in your Git Clone step and CDK Deploy step to `0`.
:::

:::tip

Currently, there isn’t a direct method to manage application dependencies during the process. It is necessary to install the required dependencies before running the CDK commands. Below are some recommended approaches to handle this:

1. **Add a Run Step for Installing Dependencies**:
Add a *Run Step* prior to the CDK Deploy step where you can execute the commands to install the dependencies, such as `npm install`. This ensures that when the CDK step runs, all necessary dependencies are already installed.

2. **Update the `cdk.json` File**:
Update the `cdk.json` file to define a custom build command that includes dependency installation, such as `npm install`, before deployment. For example:
```json
{
"app": "npx ts-node -P tsconfig.json --prefer-ts-exts src/ec2-instance.ts",
"output": "cdk.out",
"build": "npm install --verbose && npx projen bundle"
}
:::

### Output variable expressions

After pipeline execution, the CDK Deploy step **Output** tab displays several output variables.
Expand Down
Loading