-
Notifications
You must be signed in to change notification settings - Fork 4k
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
app-delivery expects yaml output, but cdk synth only outputs json #3595
Comments
Since JSON is YAML I am wondering what kind of error you have observed. |
The problem isn't with the contents of the file, it's with the name of the file. The error I see is "File [blah.template.yaml] does not exist in artifact [Artifact_Blah_Something]". It's looking for a file with the yaml extension but synth outputs a json extension. I'm really curious how this ever worked since it's hardcoded to look for yaml in the source code. Did "cdk synth" used to emit yaml? |
As casey suggests, its a file naming problem. if you look at https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/app-delivery/lib/pipeline-deploy-stack-action.ts#L123, you'll see that the replace changeset action is expecting a file that ends in .yaml. When the pipeline is built using the suggested command of |
Got it. Confirming this is a bug in the app-delivery library. |
As a short term fix, I added this to my buildspec: |
Use the new `stack.templateFile` instead of hard-coding the template file name (which was wrongfully using the YAML extension). Fixes #3595
Use the new `stack.templateFile` instead of hard-coding the template file name (which was wrongfully using the YAML extension). Fixes #3595
Use the new `stack.templateFile` instead of hard-coding the template file name (which was wrongfully using the YAML extension). Fixes #3595
I'd like to report a simple bug in the app-delivery module. I'm trying to use the app-deploy module to build and self-deploy a CDK app, just like in the documentation. The problem is that the app-deploy model expects the built CFN to be in yaml format (see https://github.com/aws/aws-cdk/blob/master/packages/%40aws-cdk/app-delivery/lib/pipeline-deploy-stack-action.ts#L123), but running
node_modules/.bin/cdk synth -o dist
will only produce json output, no matter what options you supply.The only way I've been able work around the problem is to do a dodgey content redirect in the
buildspec.yml
fileWhilst this makes it work, it isn't very elegant and its prone to output changes in the cdk executable. Its trivial to fix, so I thought I'd raise this issue.
This is related to #2965 in that fixing that one would allow me to create a yaml file as part of a call to
cdk synth
. You could either fix that bug, or change the linked file to expect json instead...The text was updated successfully, but these errors were encountered: