This is how we follow CICD for Azure SQL database in our project:
- Branches
We have 4 environments: Dev,test,UAT,Prod
So we have the below branching strategy hierarchy :
a) Features branches : For diff developments
b) Test : When we want to deploy our code to Test Env, we raise a PR from Feature branch to Test
c) UAT : raise Pull request from Test to UAT
d) Master: For Prod
We have created Azure SQL database project for maintaining our SQL code objects.
For actual CICD :
- Build Pipeline
Use Visual studio build task to build the SQL solution and publish the DACPAC artifacts in Build location
- Release Pipeline :
Use Azure SQL database deployment task to publish the DACPAC to the Env server:
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…