We are working towards to automate SQL project deployment. When I do schema compare using Visual studio I have an option "application scoped" where I select only to compare SP,Table,Views & functions.
Now we are moving towards CI/CD and wanted to check if there is any way to restrict sqlPackage.exe to compare only listed type of objects and deploy changes only to those objects.
Yep two options, first exclude everything you don’t need /p:ExcludeObjectTypes - a csv list of everything apart from the things you are interested in:
https://learn.microsoft.com/en-us/sql/tools/sqlpackage?view=sql-server-2017
Or you can just not put them in your project and use the “don’t drop objects not in source dacpac”.
Use whatever you do in the short term with the goal of changing to having everything in your project over time.