How to deploy multiple packages to the same folder?

I have the same problem as discussed here:

https://help.octopusdeploy.com/discussions/questions/11022-how-to-deploy-multiple-packages-to-the-same-folder

Since this question is closed and you have moved to a new forum, I am copying the text here:

The simplest form of my question is this: I have two separate NuGet packages and at deployment time need them to end up at the same folder. Not at some fixed (constant) folder on the machine, but in the folder dynamically created by Octopus for the first package. All I need is to make second package to go to the same folder.

In a more complex form the same question is: how to deploy a package to subfolder of the previous package deployment location.

Does it make sense to let Octopus deploy everything in separate folders and then generate HTFS softlinks to simulate required folder structure?

I tried the answer you gave there:

You can use the Custom Installation Directory feature and set the bind the field to the Octopus.Action[StepName].Output.Package.InstallationDirectoryPath value.

When I try this approach I get the following error:

The custom install directory ā€˜Octopus.Action[Deploy My Package].Output.Package.InstallationDirectoryPath\bin\Contentā€™ is a relative path, please specify the path as an absolute path or a UNC path.

(Where ā€œDeploy My Packageā€ is my Process StepName)

Error

Running rollback conventionsā€¦

I need to be able to install this step into the \bin\Content\ subfolder of the same directory as ā€œDeploy My Packageā€, but this error prevents me from doing it even though I followed your answer.

Have you changed the code so there is now another way I should do this?

/Jesper Risager.

I figured out what was wrong.

I need to wrap with #{}, so in my case it becomes:

#{Octopus.Action[Deploy My Package].Output.Package.InstallationDirectoryPath}\bin\Content\

1 Like

Hi Jesper,

Thanks for the update here! Iā€™m glad to hear that you found the cause and have resolved this. :slight_smile:

Please do not hesitate to get in touch if you run into any further issues.

Best regards,
Daniel

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.