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

[BUG] Projen instructions fail at deploy step #103

Closed
rhyslewis-aws opened this issue Jan 16, 2025 · 3 comments · Fixed by #104
Closed

[BUG] Projen instructions fail at deploy step #103

rhyslewis-aws opened this issue Jan 16, 2025 · 3 comments · Fixed by #104
Labels
bug Something isn't working

Comments

@rhyslewis-aws
Copy link
Contributor

Describe the bug

I have been following the Projen steps here: https://cdklabs.github.io/cdk-cicd-wrapper/getting_started/projen.html and get this error:

Since this app includes more than a single stack, specify which stacks to use (wildcards are supported) or specify `--all`
Stacks: sharedloadbalancer · sharedloadbalancerRepository · sharedloadbalancerSSMParameterStack · sharedloadbalancerEncryptionStack · sharedloadbalancerComplianceLogBucketStack · DEV/sharedloadbalancerComplianceLogBucketStack · DEV/sharedloadbalancerEncryptionStack · DEV/sharedloadbalancerYourStack · INT/sharedloadbalancerComplianceLogBucketStack · INT/sharedloadbalancerEncryptionStack · INT/sharedloadbalancerYourStack
👾

Expected Behavior

The project should deploy at this stage

Current Behavior

When I get to the deploy step it fails with the error above. I have successfully followed the https://cdklabs.github.io/cdk-cicd-wrapper/getting_started/index.html guide and adopted an existing project into the same AWS accounts.

Reproduction Steps

I carried out these steps as per the documentation:

npx projen@latest new awscdk-app-ts --no-git --deps @cdklabs/cdk-cicd-wrapper-projen
(modified .projenrc.ts)
npx projen
npm run validate -- --fix
npm run license -- --fix
(modified main.ts with a minimal stack)
(updated .env)
npm run bootstrap RES
npm run bootstrap DEV
npm run bootstrap INT
npm run deploy

Then the error occurs

Possible Solution

No response

Additional Information/Context

No response

CDK CI/CD Wrapper version used

0.2.13

Environment details (OS name and version, etc.)

OSX 15.2

@rhyslewis-aws rhyslewis-aws added the bug Something isn't working label Jan 16, 2025
@rhyslewis-aws
Copy link
Contributor Author

There is also an issue with the taskfile variation: https://cdklabs.github.io/cdk-cicd-wrapper/getting_started/projen_with_taskfile.html

I carried out these steps:

npx projen@latest new awscdk-app-ts --no-git --deps @cdklabs/cdk-cicd-wrapper-projen
(modify the .projenrc.ts file)
npx projen

and got this error:

👾 default | ts-node --project tsconfig.dev.json .projenrc.ts
Error: ENOENT: no such file or directory, open '******/node_modules/@cdklabs/cdk-cicd-wrapper-projen/lib/projen/Taskfile.yaml'

@gmuslia
Copy link
Contributor

gmuslia commented Jan 16, 2025

Thanks for reporting this, I am not sure if you checked out the Workshops section already: https://cdklabs.github.io/cdk-cicd-wrapper/workshops/index.html

Would be very nice if you could take a look there and maybe prepare a PR to adjust these failing instructions. Contributions are always welcome 😊

@rhyslewis-aws
Copy link
Contributor Author

The CDK deploy command is twice here:

project.addTask('_deploy').exec('cross-env cdk deploy --profile $RES_ACCOUNT_AWS_PROFILE', { receiveArgs: true });

and twice here:
project.addTask('_deploy').exec('cross-env cdk deploy --profile $RES_ACCOUNT_AWS_PROFILE', { receiveArgs: true });

In all those cases the command accepts arguments from the calling step because of receiveArgs: true, so it would be more efficient to modify it a step further up.

That means adding '--all' to

project.addTask('_deploy').exec('cross-env cdk deploy --profile $RES_ACCOUNT_AWS_PROFILE', { receiveArgs: true });
and
project.addTask('_deploy').exec('cross-env cdk deploy --profile $RES_ACCOUNT_AWS_PROFILE', { receiveArgs: true });

I will raise a PR once I've work out how to test that change locally :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants