Powershell and deployment sequencing...
jtucker@inflexxion.com
Posts: 20
The documentation says that the 4 preset powershell scripts will be run at deployment. It is not clear where those scripts are when they run. For example, my PreDeploy.ps1 script would like to use app_offline.htm on the target website to shut off access, and then copy the predeployment contents of the website to "\Backup Websites" directory.
Is the PreDeploy.ps1 script in some temp place on the target system when it gets run? Is it placed in the target physical location of the website before it is run? That would make it hard to copy the previous website contents because they'd be gone!
There are other similar tasks for predeployment. We need to backup the previous installation exe for third party software saved in a known directory on the target machine.
Is the PreDeploy.ps1 script in some temp place on the target system when it gets run? Is it placed in the target physical location of the website before it is run? That would make it hard to copy the previous website contents because they'd be gone!
There are other similar tasks for predeployment. We need to backup the previous installation exe for third party software saved in a known directory on the target machine.
Comments
Hope that helps,
Mike
Redgate Software
What is the way to go here? Do you setup a powershell library directory on each agent and update that first with a prerequisites deployment?
You can then deploy this package as the first step in your deployments, so that each subsequent step will be able to use the extracted scripts.
By specifying RedGatePackageDirectoryPath to be the location you want to store the scripts, each deployment will override previous ones (since they will be in the same directory), and it will be easy to work out where the scripts have been extracted.
This has the advantage that Nuget will deal with versioning for you, and you don't need to worry about keeping each agent up to date, since it will be updated at deployment time.
Software Developer
Deployment Manager