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.
- 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. - 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. - 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