Continuous integration for database seeding

Example of continuous integration for database seeding using Azure Devops.

  1. Use variables in all your sql seeding scripts
  2. Use a build pipeline in Azure Devops to zip your sql scripts whenever they change
  3. Use a release pipeline with one task for each environment
  4. Setup the variable values per task
  5. In each task, have the following steps
    1. Make a request to the Health endpoint for your tenant (this will create/
      patch the database schema). This can be done with e.g. an inline PowerShell script.
    2. Connect to the database and run the sql script from the build artifact
    3. Optionally make another Health request to see that things are still working