What are the challenges you face when working across database platforms? Take the survey

Team City - SQL Change Automation (Build database)

I have a SQL database project with tables and stored procs. We also have a Post Deployment script folder. But in this Post Deployment script folder we have scripts that developers use locally.

These post deploy scripts use the :r SQLCMD to run other scripts. This is showing up as invalid when I try to run the Change automation script in Team City:

[15:09:52][Step 1/2] Errors occurred whilst parsing file E:\TeamCity\buildagent\work\b9096a027bc7d001\Database.Root\Scripts\Post
[15:09:52][Step 1/2] Deploy\Script.PostDeploymentRoot.sql
[15:09:52][Step 1/2] '' at line 36, column 3
[15:09:52][Step 1/2] '' at line 43, column 6
[15:09:52][Step 1/2] '' at line 44, column 2
[15:09:52][Step 1/2] '' at line 0, column

I tried excluding the post deploy scripts from the sql project but it still tries to validate the script (because it's in the folder).

Is there anyway to ignore these scripts for change automation but keep it for my devs to continue their local work flow?


Sign In or Register to comment.