copilot-cli icon indicating copy to clipboard operation
copilot-cli copied to clipboard

copilot pipeline package and diff?

Open jerometremblay opened this issue 2 years ago • 3 comments

I would like to generate the full CloudFormation template for the pipelines like I can with the services.

copilot pipeline package

jerometremblay avatar Nov 01 '23 17:11 jerometremblay

We could do with copilot pipeline package too.

We are using overrides to get things the way we need them and, sadly, the first time we get to see the generated templates to check things out in the template is when we run copilot pipeline deploy, which can be disruptive for our colleagues if we mess things up.

WillGibson avatar Feb 28 '24 09:02 WillGibson

As a temporary work around for this only when using CDK overrides, you can run copilot pipeline deploy --diff, select the pipeline you want to preview then say no when asked to deploy.

Then you will find two files:

  • /copilot/pipelines/<pipeline>/overrides/.build/in.yml - the input CloudFormation template (pre override).
  • /copilot/pipelines/<pipeline>/overrides/cdk.out/Stack.template.json - the output CloudFormation template after it's been processed by cdk overrides.

It would be great if this command existed and allowed you to generate pre and post override templates for YAML Patch and CDK, in addition to non-overridden pipelines.

acodeninja avatar Feb 28 '24 09:02 acodeninja

I'll add that after running copilot pipeline override --tool yamlpatch, the generated README.md suggests that copilot pipeline package already exists:

Troubleshooting

  • copilot [noun] package preview the transformed template by writing to stdout.
  • copilot [noun] package --diff show the difference against the template deployed in your environment.

cooperra avatar Aug 18 '24 18:08 cooperra