Tentacle only deployment is ignoring octopus variables

I was wondering if I am doing something wrong or if there is some sort of constraint on this functionality, but I cant seem to get the tentacle to use the ‘OctopusPackageDirectoryPath’ variable when executing an install from the command line (i.e tentacle.exe --file ‘mypackage.nuget’ -v $OctopusPackageDirectoryPath=“my value”). I have tried overriding the variable at the top of my predeploy script using $OctopusPackageDirectoryPath=“my value”, Set-Variable and Set-OctopusVariable. In each and every case this variable (although seemingly set) is ignored.

Please advise.

Hi,

Can you try:

-v "Octopus.Step.Package.CustomInstallationDirectory"="my value"

Paul

Hi Paul,

Thanks for the speedy reply. I tried to do what you suggested, but it did not seem to work for me.

This is how I’m invoking the tentacle:

“C:\Program Files (x86)\Octopus Tentacle\Agent\tentacle.exe” deploy-package --file “QuickReports.1.0.2.nupkg” -v $configFile=“Dev.Config.ps1” -v OctopusPackageDirectoryPath=“c:\webserver\quickreports” -v “Octopus.Step.Package.CustomInstallationDirectory”=“c:\webserver\quickreports”

This is the console output:

Package: C:\OctopusTestBuild\QuickReport\QuickReports.1.0.2.nupkg
Variables:
$configFile: 'Dev.Config.ps1’
OctopusPackageDirectoryPath: 'c:\webserver\quickreports’
Octopus.Step.Package.CustomInstallationDirectory: 'c:\webserver\quickreports’
Deploying package
Begin deployment of package: QuickReports.1.0.2
Tentacle Agent information is below:

  • Machine name: FPJONMCCA1
  • Is 64-bit: True
  • Service user name: jonathanm
  • CLR version: 4.0.30319.18052
  • Current directory: C:\OctopusTestBuild\QuickReport
  • OS version: Microsoft Windows NT 6.1.7601 Service Pack 1
  • Tentacle version: 1.5.1.1652
    Installing package QuickReports.1.0.2 from uploaded package cache into C:\Octopu
    s\Applications\QuickReports\1.0.2
    [PreDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PreDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PreDeploy Script] Script: C:\Octopus\Applications\QuickReports\1.0.2\PreDeploy.ps1
    [PreDeploy Script] Info: Application pool already exists
    [PreDeploy Script] Info: Site Default Web Site already exists
    [PreDeploy Script] Info: Application Default Web Site\QuickReports already exists
    [PreDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PreDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [XML Transformation] Looking for any configuration transformation files
    [XML Transformation] Start tranformation to ‘C:\Octopus\Applications\QuickReports\1.0.2\Web.config’.
    [XML Transformation] Source file: ‘C:\Octopus\Applications\QuickReports\1.0.2\Web.config’.
    [XML Transformation] Transform file: ‘C:\Octopus\Applications\QuickReports\1.0.2\Web.Release.config’.
    [XML Transformation] Executing RemoveAttributes (transform line 18, 18)
    [XML Transformation] on /configuration/system.web/compilation
    [XML Transformation] Applying to ‘compilation’ element (no source line info)
    [XML Transformation] Removed ‘debug’ attribute
    [XML Transformation] Removed 1 attributes
    [XML Transformation] Done executing RemoveAttributes
    [XML Configuration] Looking for appSettings and connectionStrings in any .config files
    [XML Configuration] Scanning configuration file: C:\Octopus\Applications\QuickReports\1.0.2\Web.config
    [XML Configuration] Scanning configuration file: C:\Octopus\Applications\QuickReports\1.0.2\Web.Release.config
    [XML Configuration] Scanning configuration file: C:\Octopus\Applications\QuickReports\1.0.2\Views\Web.config
    [Deploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [Deploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [Deploy Script] Script: C:\Octopus\Applications\QuickReports\1.0.2\Deploy.ps1
    [Deploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [Deploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PostDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PostDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PostDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [PostDeploy Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [DeployFailed Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    [DeployFailed Script] FIX: C:\Octopus\Applications\QuickReports\1.0.2
    Storing a record of the deployment.
    Press any key to continue . . .

Hi Paul I’m working with the same issue, I Have upgraded the tentacle on my local machine to version 1.6 and it still doesn’t want to extract the package to a custom location ive used both these variables in the cmd with no success
-v “Octopus.Step.Package.CustomInstallationDirectory”=“c:\webserver\quickreports”
-v OctopusPackageDirectoryPath=“c:\webserver\quickreports”

its still extracting hte package to default “C:\Octopus\Applications\QuickReports\1.0.2”

please could you let me know if there’s anything else i could try
thank you

Hi,

Can you also try setting:

 -v Octopus.Step.IsTentacleDeployment=True

Paul

Works perfectly thanks Paul!