Skip to content

seeking advice on CI/CD for copilot env deploy #3927

Open
@codekitchen

Description

Hey all, we deploy our copilot applications using GitHub Actions calling out to copilot deploy rather than using copilot pipeline features. With the new env manifest features in v1.20, I've noticed that copilot deploy alone is no longer enough to apply all possible updates in CI/CD -- if you modify an environment manifest, you also have to run copilot env deploy. In addition this applies to some copilot version upgrades too -- for instance in v1.21 the lambda functions were updated from node v12 to v16, and that update isn't applied to our environments until I explicitly run copilot env deploy.

I'm looking for some advice on how best to integrate copilot env deploy into our CI/CD workflows.

  1. We could run it before every copilot deploy just in case anything has changed, but it fails if there are no environment changes to apply -- I think we'd need to grep the output looking for a string such as "Your update does not introduce immediate resource changes" to differentiate between an actual failure and there being no changes.
  2. We could do copilot env deploy --force but I'm a little wary of running that on every deploy, is that a good idea? This is also pretty slow, it takes about a minute in my testing even if there are no changes.
  3. We could set up our workflows to only run copilot env deploy when the env manifest is modified, but that will miss potential environment changes due to copilot version upgrades or other external factors.

Maybe a feature could be added to copilot env show json output to indicate if there are any env changes to apply?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Assignees

No one assigned

    Labels

    size/SWe should be able to deliver roughly 2 small issues in a sprint.type/enhancementIssues that are improvements for existing features.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions