Bespoke Database Script deployment

Automated deployment for web applications and databases

Bespoke Database Script deployment

Postby hschmied » Tue Jul 16, 2013 10:34 am

We currently use a custom build process that already packages up all our SQL object changes into four separate scripts, one for each of the four databases it needs to be run against. Each of these scripts could contain SPs, views, table changes, update/creation scripts etc.

Without completely changing the way we work what would be the best way to get these four scripts deployed using Deployment Manager?

Do I have to nuget package them using RgPublish and/or sqlCl.exe or can I just add a post deployment step?

Any pointers would be greatly appreciated.
Posts: 1
Joined: Tue Jul 16, 2013 10:29 am
Location: England

Postby lee5i3 » Tue Jul 16, 2013 2:44 pm

I believe they must be nuget packages... but you can also write a PreDeploy.ps1, Deploy.ps1 or PostDeploy.ps1 powershell script to execute whatever you need done.

You can just use RgPublish to package the entire folder and depending which step you need done, the powershell script can run what you need custom done

I'm not positive where the powershell is required to go, but I put it in the root and it runs there.
Posts: 38
Joined: Fri Jul 16, 2010 9:26 pm

Postby david.conlin » Wed Jul 17, 2013 11:36 am

Yes, you can do this by packaging up your scripts together with a deploy.ps1 file using RGPublish

The documentation on adding powershell behaviour to your package is here ... ll+scripts

while information about creating packages with RGPublish is here ... n+packages

If you're updating four different databases, however, I'd recommend setting them up as four separate "steps" in the same project. That way you'll be able to see the logging and status of each database separately, while ensuring that all four get deployed together.
David Conlin
Software Developer
Deployment Manager
Posts: 50
Joined: Fri May 04, 2012 3:44 pm

Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 0 guests