Ability to config Pipeline to source from ECR repository
It would be great if there is a config like below.
source:
# The name of the provider that is used to store the source artifacts.
provider: ECR
# Additional properties that further specify the location of the artifacts.
properties:
tag: latest
repository: <erc-repository-url>
Thanks for the feature request @ShanikaEdiriweera ! Makes a lot of sense to me 👍🏼 I have a few questions if you don't mind 👀 :
- I guess your service manifests have
image.location: <erc-repository-url>:latest, instead ofimage.build. Am I guessing right? - Are all of your services like that ⬆️ ?
- For the services that have
image.location: <erc-repository-url>:latest, is the behavior the same across all environments? i.e. do you have A or B:
# A
environments:
prod:
image:
location: <erc-repository-url>:latest
test:
image:
build: Dockerfile # the `test` environment however builds from Dockerfile
# B
environments:
prod:
image:
location: <erc-repository-url>:latest
test:
image:
build: <erc-repository-url>:latest # Both prod and test is grabbing an existing image.
- Are you currently using
copilot svc deploy --forceto update your service? - Finally, if we support a pipeline that gets triggered on ECR push - do you expect the pipeline to be release application code change only? Say, if you have to change an infra config (say the
countorcpuin manifest), you expect to deploy this change through another pipeline dedicated to infra, is this correct?
Thanks for the feature request @ShanikaEdiriweera ! Makes a lot of sense to me 👍🏼 I have a few questions if you don't mind 👀 :
- I guess your service manifests have
image.location: <erc-repository-url>:latest, instead ofimage.build. Am I guessing right?- Are all of your services like that ⬆️ ?
- For the services that have
image.location: <erc-repository-url>:latest, is the behavior the same across all environments? i.e. do you have A or B:# A environments: prod: image: location: <erc-repository-url>:latest test: image: build: Dockerfile # the `test` environment however builds from Dockerfile # B environments: prod: image: location: <erc-repository-url>:latest test: image: build: <erc-repository-url>:latest # Both prod and test is grabbing an existing image.
- Are you currently using
copilot svc deploy --forceto update your service?- Finally, if we support a pipeline that gets triggered on ECR push - do you expect the pipeline to be release application code change only? Say, if you have to change an infra config (say the
countorcpuin manifest), you expect to deploy this change through another pipeline dedicated to infra, is this correct?
Thank you for the response! Please find answers below.
- Yes
- I have one service for now. Other services also can be like that.
- I have only one env atm. But will be the same.
- Yes
- Yes only app changes. will have a separate pipeline for infra
Sweet. Thanks for your response - it helps a lot!
I just realized you also posted a discussion thread https://github.com/aws/copilot-cli/discussions/4905 in which you mentioned that your code source is GitLab.
This is just a note for the Copilot core dev team - another "universal remedy" is for us to support S3 bucket as Source provider, which can be a workaround for basically any other source provider that are not natively supported yet, including GitLab. Related: https://github.com/aws/copilot-cli/issues/4805
Based on your response though, I agree that ECR is the better solution for you! Thanks for reaching out ❤️
Cool. For now I used Gitlab mirroring config to mirror my repo to CodeCommit and then build the copilot pipeline using that.
Has this been abandoned?
In a similar case, I run tests on Github and would like to push to ECR only if the tests pass (and thus trigger deployment). This way, ECR / Copilot cares only about the deployment, meanwhile everyone can see the state of the build with GH actions. It helps us avoid configuring alerts/provisioning access to AWS for everyone on the team.