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

Feature request: pipeline manifest codebuild environment image config #2106

Open joshgoodson opened 3 years ago

joshgoodson commented 3 years ago

I was hoping I could place a yaml setting in the pipeline manifest to instruct the CFN to use a specific Docker image for the Codebuild environment image.

The only reference I've found in documentation is here when adding test_commands to the manifest file: https://aws.github.io/copilot-cli/docs/concepts/pipelines/#adding-tests

I went looking and found that the CFN template used by copilot isn't robust enough to do this atm. https://github.com/aws/copilot-cli/blob/5274b273f5f5c554c529e43e3d1a12fc4519051a/templates/cicd/pipeline_cfn.yml#L120

It appears that all build projects will always use aws/codebuild/amazonlinux2-x86_64-standard:3.0

Given that there are other Docker images supported by AWS: https://docs.aws.amazon.com/codebuild/latest/userguide/build-env-ref-available.html

Someone may also have the desire to roll their own.

Proposal: As part of the pipeline manifest, a more robust configuration around the build project could be propagated from the pipeline manifest file to the CFN template.

# This section defines the build project configuration.
build:
    image: aws/codebuild/standard:3.0

This is my first time submitting an issue, please let me know if you'd like any more details or if this is out of place.

huanjani commented 3 years ago

Hello, @joshgoodson!

Thanks so much for this feature request. This is a great, thoughtful suggestion. We are hoping to make our pipelines more customizable, and it's nice to have this kind of input!

sugarjig commented 3 years ago

It looks like you can now specify the image in the pipeline manifest. However, this appears to only affect the image used in the build stage, and not any images used by the test_commands sections.