I need to think of correct way to setup our CI/CD for Drupal project. The issues are related with the database updates. For example my build is successful and code is deployed to the production. Now i need to run some drush commands like config import. Something goes wrong and error is thrown. Reimporting the whole database for rollback is not an option for me because the db is large and takes a while.
I was thinking if I build Drupal with the live database dump in the Jenkins server, run the drush commands there and if all good then proceed to move the code to the production and run the drush commands there as well. The problem with this approach is that the deployments will take a while.
Anybody have better ideas? Thanks!