I'm working on a simple cloudformation stack for a web app (some lambda functions, api gateway, cloudfront distribution, etc).

The cloudformation stack template is currently versioned on a gitlab project and we're using the feature branch model to integrate new features branches into staging, so far so good: merge request trigger some testing jobs for lambda functions and upon pipeline success and subsequent merge the staging template is updated and the staging stack is updated via sam cli by a pipeline job.

The problem arises when needing to merge staging into production: using manually created merge request will end in having production branch being 2 commit (squash and merge) ahead of staging, so subsequent merge request are blocked.

Which is the best way to handle automated multi stage deployment?

I don't want to have production automatically being synced to staging after each merge, but rather manually trigger all the process (merging and deployment) so it can be done when needed/decided/scheduled.

Never used aws code pipeline, codedeploy and related services so don't know if those could be a best choice over "standard" git hosting like gitlab/github/bitbucket since we're talking about infrastructure and not bare code, but if this is the right way there is no problmem on migrating the gitlab project to aws.


Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.