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.46k stars 400 forks source link

[Feature Request]: Add support for `--force` flag for `svc package` #5867

Open ezet opened 2 months ago

ezet commented 2 months ago

Describe your idea/feature/enhancement

I wish I could force a new deployment for services that are configured with image.location: foo:latest, such that when I am deploying through AWS CodePipeline, these services would be re-deployed with the latest images.

My specific use case is one where I have multiple services which are deployed from the same image. Instead of re-building this image for each service, I wish to have only one service manifest that builds and uploads the image to ECR, and the other services reference the latest image in the same repository.

I have been able to configure this setup correctly, except the services using image.location: foo:latest are never actually deployed as the generated templates are the not changed.

Proposal

Add support for --force for svc package, similar to how --force is supported for env package.

Additional Details

Please let me know if there are other ways to achieve my goal of avoiding to build one copy of the same image for each service.

dannyrandall commented 1 month ago

Hi @ezet! Your use case makes sense to me. I wonder if you could achieve this by adding stages.test_commands to your pipeline manifest and just add commands that call copilot svc deploy --force for each of the services that are configured with image.location: foo:latest?