Reputation: 351
I have a build that I've setup using visual studio team services online. I want to execute a sql script on a remote server as a step, but don't see anything available out of box. The remote server has the agent installed on it. What's the best practice for doing this? Just put in a step that runs a powershell/bat file on the server and have that file execute the sql script?
Upvotes: 5
Views: 1599
Reputation: 928
Nowadays there is a Build Task available in the VSTS marketplace. As far as I can tell it's the powershell solution as mentioned in another answer, but then nicely wrapped up in a package.
Upvotes: 0
Reputation: 29976
You can add a step to run a PowerShell/batch script to execute the SQL script, and you can also create a custom build task and upload it to VSTS using TFX-CLI. For the custom task, refer to this link for details: http://shiningdragonsoftware.net/2015/08/13/tfs-build-2015-vnext-custom-tasks/
Upvotes: 6