Linux Custom installation directory

I am trying to deploy to a custom directory on linux. My directory is ~/applicationname/releases/ApplicationName_Release-1 as an example. when deploying it appears to be sshing to the default directory. Here is the path that I have updated in the custom installation directory for the deploy package step and the result of the log file. how can I get it to deploy in the right folder?

Custom Install directory : $HOME/applicationName/releases/#{Octopus.Project.Name}"_"#{Octopus.Release.Id}

Beginning streaming transfer of command.sh to $HOME.octopus\OctopusServer\Work\20170721190739-33
July 21st 2017 15:07:41Info
Stream transfer complete
July 21st 2017 15:07:42Info
Package ConsolidatedWeb.1.0.7830 (2.151 MB) found in cache. No need to upload this 2.151 MB package. Using /home/Username/.octopus/OctopusServer/Files/OctopusProjectName.1.0.7830.zip-58044a79-5a62-4ae5-8d9e-84c9a7e56719

Hi Allen,

Thanks for getting in touch!

From what I can see you might have a misunderstanding of when custom directories are used as part of the deployment process. Octopus will always deploy a package to the default location, perform any pre-deploy scripts, variable substitutions and transforms before moving the files to the custom install directory. This is due to the fact that we assume by default that the custom directory has a working copy of your application so to blindly extract files into that location before performing all the transforms could break your application.

You can find more information on custom install directories and our order of deployment operations by following the provided links to our documentation.

We also have information on how our folders are structured for SSH deployments on this documentation page. As our folder structure is all based for the users $HOME variable moving the home directory of the user may assist in moving the base of our directory structure however the default paths are not modifiable.

I hope that helps,

Regards,

Alex

Hey Alex,

Perhaps I didn’t explain well enough what I am trying to accomplish or what I’m seeing. I know the default path within the tentacle are where the work is originally deployed. In the windows world, I would normally put in the custom installation path where the application would ultimately end up on the server I am deploying to rather than application saying in the work folder for the tentacle. So if I were deploying a windows application to C:\inetpub\wwwroot\applicationname this folder is where that application would end up.

on the linux side, I am trying to deploy the application and have the files ultimately end up at ~/applicationname/releases/ApplicationName_Release-1. What I am seeing when I deploy the application is it never leaves the work folder for the tentacle and placed in this directory even though a custom installation path is defined. How do I have it moved to the appropriate directory? Is custom installation path not used for Linux or do I need to write a bash script to do this?

Hey Alex,

I resolved this issue. I found that I had attempted to use the home variable in the custom installation directory path which did not work. After coding the full path of /home/username/… in the current installation directory where username is a variable for the user account that will be deployed to, I ran into another issue where access was denied. I changed the owner of the folder to the deployment user instead of root. This resolved that issue also.

Hi Allen,

I’m glad to hear that you were able to resolve your issue!

Please let us know if you think there are any documentation changes that we can make that would improve the initial experience that you have when using SSH targets, we are always looking to improve.

Happy deploying,

Alex