aws / copilot-cli

The AWS Copilot CLI is a tool for developers to build, release and operate production ready containerized applications on AWS App Runner or Amazon ECS on AWS Fargate.
https://aws.github.io/copilot-cli/
Apache License 2.0
3.5k stars 407 forks source link

Some assorted feedback on `pipeline` command #727

Open aidansteele opened 4 years ago

aidansteele commented 4 years ago

Please let me know if this issue isn't appreciated. It's essentially a dump of a stream of consciousness, not sure if I should have spammed the issue tracker with lots of small issues or have one larger one. Let me know if you want anything changed.

1. When I run pipeline init the first question it asks me is Would you like to add an environment to your pipeline? - I have no idea how to answer this. Maybe, I guess? What does it even mean when I say no? Perhaps this could be documented in the wiki and then the first thing outputted by pipeline init is a link to the wiki to assist in answering this survey.

2. The Getting Started docs say to git clone the sample repo, which I did. But when I ran pipeline init and pipeline update, it autodetected the upstream sample's URL and I naïvely accepted the default. When the pipeline ran, CodeBuild failed as it couldn't find the buildspec upstream.

Maybe we can either a) look for the aws-samples org and warn the user that it's not going to do what they think it will or b) change the getting started guide to recommend forking? This could tie into Github's support for "repository templates".

3. Something that I typically want to see is a green pass/fail on all PRs. Right now the source for the CodeBuild project is CodePipeline, which is only triggered by master. Could we add support for CodeBuild PR builds too? Maybe this would mean factoring out some of the inline bash scripts into files called from both CodeBuild projects.

4. Also it would be nice if the CodeBuild projects had the same tags as everything else. Maybe it would be handy if the CodePipeline had a tag for the apps it deploys - maybe space separated or something?

PS thanks for an awesome tool! 💕

efekarakus commented 4 years ago

Hi @aidansteele thanks for the feedback!

  1. 👍 makes sense! We can do a lot more context aware questions. For example, "Which environment would you like your pipeline to deploy your applications to first?" followed with "After the "test" environment, which environment do you want to deploy to?"

  2. We picked up some work this upcoming sprint to improve our wiki (https://github.com/aws/amazon-ecs-cli-v2/issues/690) we'll tackle this recommendation part of it. We were also exploring adding an additional recommendation when pipeline init finishes: commit and push your changes upstream. 😅

  3. I might not be understanding the request correctly, do you think modifying the generated buildspec to include your validations would help mitigate this concern? https://github.com/aws/amazon-ecs-cli-v2/blob/b94b91003d63d6a12c396ebea3b0c764b63a59bf/templates/cicd/buildspec.yml#L16-L18

  4. 👍

aidansteele commented 4 years ago

Thanks for the speedy response! Let me clarify point 3.

Right now, the generated CodePipeline pipeline only gets triggered for pushes to master. When PRs are submitted, the pipeline isn't triggered (which makes sense). But a common desire is that a CI system will run tests, builds, linting, etc on all PRs. For example, a PR elsewhere in this project:

Screen Shot 2020-03-11 at 9 00 07 am

It would be great if this was scaffolded for us, too! What do you think?