I create dotnet project and deploy to dev and prod stage using Gitlab CI. While this question can be wide enough, I didn't find such best practices on Internet.
Which way is a best way to apply:
- DB Migrations: do I need to use it in Gitlab CI as separate stage? Do I have to do it in gitlab-ci.yml or create additional Pod for that and apply migration from it?
- Unit Tests: Where to run them? Someone runs them in Dockerfile, another run as separate Gitlab stage (do I need to build project again during this stage?)
- Rollbacks: What is the right strategy to use it? Do I need to rollback all migrations if one of them crashes? Do I need to rollback all deploys too?
I'll be very thankful for answers or for the good links to some useful examples. Because I already watched 5 first pages of Google :)