| Author |
Message |
swinghouse
Joined: 12 Sep 2011 Posts: 81
|
Posted: Tue Oct 16, 2012 12:37 am Post subject: |
|
|
Thanks David,
Yes, setting up .config transforms for other types of .NET applications in Deployment Manager proved to be smooth sailing indeed! Great stuff!
May I inquire about another thing? How should I go about registering Windows Services in a Deployment Manager release? Should I create a PowerShell script and put in in Deploy.ps1?
/Mattias
PS. Please let me know if I should start a new thread instead of prolonging this one. |
|
| Back to top |
|
 |
chirayu
Joined: 17 Sep 2012 Posts: 22
|
Posted: Tue Oct 16, 2012 10:46 am Post subject: |
|
|
Hi Mattias,
David Conlin is on holiday, so I will be dealing with your query.
You can create 4 kinds of Powershell scripts with Deployment Manager:
-PreDeploy.ps1
-Deploy.ps1
-PostDeploy.ps1
-DeployFailed.ps1
You may not have come across this help page about creating/updating Windows service from a Powershell script:
http://www.red-gate.com/supportcenter/Content/Deployment_Manager/help/1.0/dm_powershell_scripts
If you have any other problems, please let us know. I hope this helps! _________________ Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate |
|
| Back to top |
|
 |
swinghouse
Joined: 12 Sep 2011 Posts: 81
|
Posted: Tue Oct 30, 2012 10:17 am Post subject: |
|
|
HI Chirayu,
Thanks for the information - very useful!
I have one issue at the moment. Deployment Manager doesn't seem to pick up the .ps1 files in the NuGet package. I get this message while deploying:
| Quote: |
| No scripts with a .ps1 extension were found. |
My .ps1 files, currently PreDeploy.ps1 and PostDeploy.ps1, are located at the root of my NuGet package.
What might I be doing wrong?
/Mattias |
|
| Back to top |
|
 |
swinghouse
Joined: 12 Sep 2011 Posts: 81
|
Posted: Tue Oct 30, 2012 10:39 am Post subject: |
|
|
Success!
After upgrading the version number of my NuGet package and pointing Deployment Manager at the new version, Deployment Manager picked up my changes and executed the PowerShell scripts!
/Mattias |
|
| Back to top |
|
 |
swinghouse
Joined: 12 Sep 2011 Posts: 81
|
Posted: Tue Oct 30, 2012 11:47 am Post subject: |
|
|
I'd just like to point out that, in addition to setting up a PostDeploy.ps1 script using the first example at http://www.red-gate.com/supportcenter/Content/Deployment_Manager/help/1.0/dm_powershell_scripts as template, I created a PreDeploy.ps1 script which stops the service if it's already installed.
Otherwise Deployment Manager, very helpfully, reported the following error message:
| Quote: |
One or more files in the directory may be locked by another process. You could use a PreDeploy.ps1 script to stop any processes that may be locking the file.
|
Very nice!
/Mattias |
|
| Back to top |
|
 |
chirayu
Joined: 17 Sep 2012 Posts: 22
|
Posted: Tue Oct 30, 2012 2:21 pm Post subject: |
|
|
Hi Mattias,
I am glad you got Deployment Manager configured to use preDeploy and postDeploy scripts.
Currently, whenever you make changes to your package, you need to increment the version number for the changes to be picked up. We are aware of this and would be looking to fix this in the near future.
Please let us know if you have any further queries.
Thanks! _________________ Chirayu Shishodiya
Software Engineer - Deployment Manager
Red Gate |
|
| Back to top |
|
 |
|