I've been trying to wrap my head around how it would be possible to implement Continuous Delivery with GitLab CI?
Every solution I read for CD relies on multi-step pipelines (such as Jenkins), or a custom application that listens to webhooks and provides its own interface for deployment (For example, GitHub's HuBot + Heaven + Janky).
If we only care about performing CD on the Master branch, and our test suite/deployment steps are very fast, you can simply include it as part of the shell script that gets ran by GitLab CI.... However, what if your test suite isn't fast? Or your deployment can take a few minutes to download packages, etc.? Then your CI Runner is busy working on stuff.
The best solution I can come up with is:
- Create a Web Application that accepts Web Hooks from GitLab and GitLab CI, and keeps track of each individual commit that was made and the build status.
- Launch own custom runners that attempt to perform delivery to a staging site for each passed webhook received. Application can use, for example, fabistrano, for easy deployment/rollback.
- Listen for Merge Requests for merging into master being accepted in GitLab that passed all tests.
Any thoughts? Has anyone implemented CD with GitLab CI?