Setting Variables on PreDeploy.ps1 for publishing

Automated deployment for web applications and databases

Moderators: Mike Upton, justin.caldicott, Sean.newham, csmith, chirayu, DavidSimner, david.conlin

Setting Variables on PreDeploy.ps1 for publishing

Postby mbre » Mon May 06, 2013 12:31 pm

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
mbre
 
Posts: 5
Joined: Mon May 06, 2013 12:23 pm

Variables

Postby mbre » Tue May 07, 2013 11:09 am

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
mbre
 
Posts: 5
Joined: Mon May 06, 2013 12:23 pm

Postby csmith » Tue May 07, 2013 1:46 pm

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
csmith
 
Posts: 118
Joined: Thu Jun 30, 2011 2:15 pm
Location: Cambridge

Postby mbre » Tue May 07, 2013 2:14 pm

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
mbre
 
Posts: 5
Joined: Mon May 06, 2013 12:23 pm


Return to Deployment Manager

Who is online

Users browsing this forum: No registered users and 1 guest