Skip to content

Latest commit

 

History

History
45 lines (30 loc) · 1.35 KB

README.md

File metadata and controls

45 lines (30 loc) · 1.35 KB

azure-sql-deploy-dacpac

license ci

Overview

This project demonstrates how to automate test a star schema development with 'microsoft.sqlpackage' using a GitHub Actions & Docker.

Flow

  1. Build SQL server objects (tables, views, and instance objects)
  2. Dacpack file is created
  3. Contents of dacpac is consumed by Github Actions
  4. Deploy against a SQL database

Deployment prerequisites

  • Azure Subscription

Setup

  1. Create a new Azure Service Principal
  2. Create a new Azure SQL Database, see infra Makefile for more details.

Configuration

  1. Add the following secrets to your GitHub repository:
    • AZURE_SQL_CONNECTION_STRING - Azure SQL Database connection string of your database

Azure Deployment

  1. Run database deployment from github actions tab. See deploy.yml

Local development environment

To run sql project in Docker, follow these steps:

  1. Build and start the necessary containers
make docker
  1. Examine the logs
docker compose logs -f