How to output post deployment script progress to devops release pipeline logs

41 Views Asked by At

I have create a post deployment script in a visual studio database project, the contents of which are .

:r .\dbo.table1.sql
:r .\dbo.table2.sql
:r .\dbo.table3.sql
:r .\dbo.table4.sql
:r .\dbo.table5.sql

The release pipeline appears to run it successfully but I don't see any reference to it in the logs.

I'm assuming it happens as part of the "SQL Server database deploy" task in the release pipeline following the deployment of the DacPac.

I'd like to at least print something to the devops release pipeline logs that report each file has been run eg using 'Print "dbo.table1.sql run"'

I can't find anything in documentation to that effect?

Can anyone advise as to if that is possible?

Thanks

1

There are 1 best solutions below

0
kevins1966 On

As it turned out I answered my question in the question itself.

I altered the post deployment script to be

print 'Running table.sql' :r .\dbo.table.sql

......etc

and the text in the print command appeared in the devops logs