I would like to implement continuous delivery on every commit of source code to master branch in git. But most of the times, code alone is not changed, along with code release, there would be DB changes and also Config changes or new configs added.
So my question is how this is handled in continuous delivery when there is code + DB + config changes.
Let us take a example where I have 3 repos
Repo A - source code - to check in new features or bug fixes. Auto deploy Git hook is set on this repo
Repo B - DB changes
Repo C - config changes
Now, a developer has some code changes which has config changes and also DB changes. So if the developer checks in the source code first (which will trigger a build and deploy), but takes some time to check in DB changes and config changes, the upstream environment will have the latest code with old DB or old config. This is inconsistent and might result in unwanted results.
I could think of 2 solutions, to avoid the issue:
1) Developers should be trained to first checkin DB / config changes and then check in source code.
OR
2) Have 1 more repo - called app-releases which is yaml file to take the app version, DB changes metadata (like script file name etc) and config change label or tag version. Have a auto deploy on this repo branch. So the developer can checkin as they want and finally checks in app-release file which would trigger the build.
Any other suggestions please let me know?