1

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:

  1. 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?
  2. 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?)
  3. 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 :)

Mikhail_Sam
  • 10,602
  • 11
  • 66
  • 102

0 Answers0