Variable substitution not working for a particular tentacle

I currently have a simple Octopus setup with a single deployment target that hosts two environments of my team’s web application. I’m in the process of adding a second deployment target that will host two additional environments. The newer deployment target doesn’t seem to be copying the application to the current installation directory, which is defined by a “DestinationFolder” variable. Looking at the logs, the newer deployment target doesn’t seem to be substituting this variable’s value properly:

Deploying package 'C:\Octopus\Files\MyApp.1.0.5765.23509.nupkg-4d75d6af-9004-4e2b-a12c-72d5010ca025' to machine 'https://myapp.mycompany.net:10933/'
Deploying package: C:\Octopus\Files\MyApp.1.0.5765.23509.nupkg-4d75d6af-9004-4e2b-a12c-72d5010ca025
Using variables from: C:\Octopus\Work\20151014212658-14\Variables.json
Transforming 'C:\Octopus\Applications\TR\MyApp\1.0.5765.23509_3\Web.config' using 'C:\Octopus\Applications\TR\MyApp\1.0.5765.23509_3\Web.TR.config'.
Copying package contents to '#{DestinationFolder}'
Copied 777 files
VERBOSE: Performing the operation "Copy Directory" on target "Item: 
C:\Octopus\Work\20151014212658-14\#{DestinationFolder}\workingdir\scripts
Destination: C:\Octopus\Work\20151014212658-14\#{DestinationFolder}\scripts".

Notice that “#{DestinationFolder}” is appearing in the filepaths in the last two lines of the log.

The working deployment target properly substitutes this variable:

Deploying package 'C:\Octopus\Files\MyApp.1.0.5765.23509.nupkg-06f20264-9e9f-4008-9279-f1b64ded1e54' to machine 'https://myapp.mycompany.net:10933/'
Deploying package: C:\Octopus\Files\MyApp.1.0.5765.23509.nupkg-06f20264-9e9f-4008-9279-f1b64ded1e54
Using variables from: C:\Octopus\Work\20151014205856-431\Variables.json
Transforming 'C:\Octopus\Applications\DEV\MyApp\1.0.5765.23509_1\Web.config' using 'C:\Octopus\Applications\DEV\MyApp\1.0.5765.23509_1\Web.DEV.config'.
Copying package contents to 'D:\inetpub\wwwroot\MyAppDEV'
Copied 777 files
VERBOSE: Performing the operation "Copy Directory" on target "Item: 
D:\inetpub\wwwroot\MyAppDEV\workingdir\scripts Destination: 
D:\inetpub\wwwroot\MyAppDEV\scripts".

I have the DestinationFolder variable defined for all environments (see the attached screenshot). What could be causing this variable to not be substituted for this particular deployment target?

variables.png

Hi Nathan,

Thanks for reaching out. After you added the copies of the variable DestinationFolder that point to your new environment, did you create a new release, or did you re-deploy a release that was created prior to adding these new variables? You need to create a new release for the new variables to show up in your deployment.

Please follow these steps to send us your deployment log so we can see what might be going on here:

  1. Add these 2 variables to your project http://docs.octopusdeploy.com/display/OD/Debug+problems+with+Octopus+variables

  2. Create a new release (so the new variables take effect) and deploy it. If possible skip as many steps as you can and only leave step we are troubleshooting in order to avoid the noise in the log.

  3. Send us the raw log of that deployment http://docs.octopusdeploy.com/display/OD/Get+the+raw+output+from+a+task

Regards,

Dalmiro

Hi Dalmiro,

Deploying a new release solved the problem. The DestinationFolder variable is now properly substituted for all deployment targets. Thanks for the help!