I am trying to pass custom variables from Octopus into a PostDeploy.ps1 file as described in the Variables section on the PowerShell Scripts page. I have my variables defined as shown in the attached screenshot. When I run my deploy script, however, it doesn’t look like the values are being passed to the PowerShell script. I get output similar to the snippet below (full output and PowerShell script also attached)…
@@@
2013-02-19 17:06:36 DEBUG Looking for PowerShell scripts named PostDeploy.ps1
2013-02-19 17:06:36 INFO Calling PowerShell script: ‘C:\Octopus\Applications\Development\WebSearchContent\1.0.4.84_1\PostDeploy.ps1’
2013-02-19 17:06:42 INFO PostDeploy.ps1: Now running
2013-02-19 17:06:42 INFO ReplaceTheme_TargetThemeName=
2013-02-19 17:06:42 INFO ReplaceTheme_SourceThemeName=
2013-02-19 17:06:42 INFO OctopusEnvironmentName= Development
2013-02-19 17:06:42 INFO OctopusOriginalPackageDirectoryPath= C:\Octopus\Applications\Development\WebSearchContent\1.0.4.84_1
2013-02-19 17:06:42 INFO PostDeploy.ps1: Overwriting ’ ’ theme with ‘’ theme…
2013-02-19 17:06:45 INFO PostDeploy.ps1: Finished overwriting ’ ’ theme with ‘’ theme…
2013-02-19 17:06:45 INFO PostDeploy.ps1: Stopping
2013-02-19 17:06:45 DEBUG Script ‘C:\Octopus\Applications\Development\WebSearchContent\1.0.4.84_1\PostDeploy.ps1’ completed with return code 0.
@@@
I notice that the example variable name on the PowerShell Scripts page is named MyApp.ConnectionString
. Does the MyApp
part indicate a project name (maybe I need to name my variables ProjectName.ReplaceTheme_SourceThemeName
and ProjectName.ReplaceTheme_TargetThemeName
)?
-David
DeployLog.txt (4 KB)
PostDeploy.ps1.txt (2 KB)