Open nbaillie opened 3 years ago
I believe there's an context value you can set to stop bundling (or more accurately, pick the stacks for which you want to enable bundling, which in your case would be none):
I'm assuming you're using NodeJSFunction or PythonFunction in your pipeline...
Thanks for the info above, I think this will help.
Yes using NodeJSFunction but another use case would be with s3-deploy.
I have a project which uses s3deployment bundling. I tried setting this context attribute in its tests but it led to build failures.
@rix0rrr Can you clarify what exactly needs to be done to disable this? I tried to do this programatically, but it seems the context variable can't be set at runtime? Do I need a separate cdk.json
just for testing? That seems unfortunate.
Create an option to disable, (or automatically disable?) asset build/bundling, when using Jest to instantiate a cdk-pipeline for tests
Use Case
When using a pipeline instance in jest it causes the assets to build/bundle, it may be the intention of the test to check only that the pipeline is correctly formed, build/bundle testing may be handled else where. In this case the build/bundle process creates additional time delay on testing in synth stage of the pipeline.
Proposed Solution
Create an option to disable, (or automatically disable?) asset build/bundling, when using Jest to instantiate a cdk-pipeline for tests
Other
This is a :rocket: Feature Request