BeforePostDeploy script using wrong path?

Getting this error when trying to deploy a web app to our Demo environment:

Error    13:13:45
resolve-path : Cannot find path 
Error    13:13:45
'C:\Octopus\Applications\Demo\Anvil.Web\15.0.0.35930_1\Demo' because it does 
Error    13:13:45
not exist.
Error    13:13:45
At C:\Program Files\Octopus 
Error    13:13:45
Deploy\Tentacle\Scripts\Octopus.Features.IISWebSite_BeforePostDeploy.ps1:74 
Error    13:13:45

The website exists at C:\Octopus\Applications\Demo\Anvil.Web\15.0.0.35930_1 but not in a Demo subdirectory. It looks like the deploy script is incorrectly adding the environment name to the path twice?

Hi Howard,

Thanks for reaching out. Could you please enable the debugging variables, then deploy a new release and send us log?

http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables
http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

If possible, try to only run the deployment step to avoid the extra noise on the log.

Thanks,

Dalmiro

Log attached – a few internal variable values redacted for security reasons

ServerTasks-6568.log.txt (130 KB)

It seems like you added a directory on the Relative home directory field on your NuGet deploy step. See attached screenshot for visual reference.

If you want the root of the site to be the root of your extracted package content (in this case *C:\Octopus\Applications\Demo\Anvil.Web\15.0.0.35930_2*) leave that field empty and try again.

Dalmiro

That fixed it, thanks