Red Gate forums :: View topic - Setting Variables on PreDeploy.ps1 for publishing
Return to www.red-gate.com RSS Feed Available

Search  | Usergroups |  Profile |  Messages |  Log in  Register 
Go to product documentation
Deployment Manager
Deployment Manager forum

Setting Variables on PreDeploy.ps1 for publishing

Search in Deployment Manager forum
Post new topic   Reply to topic
Jump to:  
Author Message
mbre



Joined: 06 May 2013
Posts: 5

PostPosted: Mon May 06, 2013 12:31 pm    Post subject: Setting Variables on PreDeploy.ps1 for publishing Reply with quote

Hi Team,

Is it possible and if yes then how can I override eg the "RedGateWebSiteName" variable in my predeploy.ps1 file?

Our Website name is depend on the date of publish and because of that I need to set it dynamically.

Thanks,
Markus
Back to top
View user's profile Send private message
mbre



Joined: 06 May 2013
Posts: 5

PostPosted: Tue May 07, 2013 11:09 am    Post subject: Variables Reply with quote

I've found out that I can read variables in powershell script, but I can't modify them. For our scenario it is needed to change the Output Directory for package (eg in PreDeploy.ps1).

But if I set the Variable in powershell, it seems to me that value is lost when completing the script. Could this be correct?

Regards,
Markus
Back to top
View user's profile Send private message
csmith



Joined: 30 Jun 2011
Posts: 114
Location: Cambridge

PostPosted: Tue May 07, 2013 1:46 pm    Post subject: Reply with quote

Hi Markus

It's currently not possible to modify variable values from pre-deploy powershell scripts.

So we understand the scenario, can I ask why you need to set the website name depending on the date of publish?

Best regards,
Chris
_________________
Chris Smith
Project Manager
Deployment Manager
Back to top
View user's profile Send private message
mbre



Joined: 06 May 2013
Posts: 5

PostPosted: Tue May 07, 2013 2:14 pm    Post subject: Reply with quote

Hi Chris,

We want to deploy an internal API WCF service and for reverse compatibility when deploying the service with breaking changes, we use the current date in publish path (eg http://demoserver/2013/05/07/service.svc).

So I wanted to override the publish path in PreDeploy.ps1 depending on current date.

I've now disabled automatic IIS app creation of deployment manager and perform the Deployment of application in Deploy.ps1 completely on my own.


Regards,
Markus
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic All times are GMT + 1 Hour
Page 1 of 1

 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group