Copy to server share

So instead of the package installing I need it to just copy the files out to a share. I am really not sure how to approach that.

this is only in the short term but is due to our security team rejecting the use of octopus in our production environment right now.

Hi,

Do you need to copy the NuGet package file, or just the files inside the package?

During deployment on the Tentacle there is a special variable available (Octopus.Tentacle.CurrentDeployment.PackageFilePath) which you could read in the Deploy.ps1 file, and then use that to copy the package to the file share.

We have plans to add a “NuGet publish” feature in future which would support publishing the package to a file share.

Hope that helps,

Paul

Did you ever create the “NuGet publish” feature or create guidance on how to perform this action? We have a very similar scenario where we’d like to “deploy” MSIs to environment-based shares for additional processing, such as GPO.

Hi David,

Thanks for reaching out! Are you trying to copy the nuget package or its contents to these shares?

Thanks,
Dalmiro

The contents. It’s just a single file wrapped in a nuget package.

Hi David,

When you say ‘environment-based shares’, do you mean a shared folder like \\Shared\folder? If that is the case, then you could use a Custom Installation Directory which will allow you to deploy to a specified folder.

Let me know if that works for you. If that’s not what you’re meaning, could you expand a bit more by what you mean by environment-based shares and how are you currently deploying to them?

Best regards,
Dalmiro

Hi Dalmiro,

That gets me very close - by “environment-based” I mean \server\share<env> i.e. (\server1\drop\DEV or \server1\drop\PROD). Is there a way to access the environment variable? Or Project variables in these steps?

To answer my own question, I found the variables: http://docs.octopusdeploy.com/display/OD/System+variables . They work but are not listed in that helpful dropdown to the right.

You found the right document! Which variable did you need that isn’t listed in the variables menu in Octopus?

Octopus.Environment.Name

Thanks!

That’s odd. That variable does show up in my variables menu (see attached).

David - Actually my previous reply was tested in 3.3.27. Apparently those variables are not around in the latest version of 3.4. Let me get back to you on this after I ask the dev team. Might take until tomorrow as they are located in Australia.

Turns out it was a bug indeed - Added it as a not in this related github issue: https://github.com/OctopusDeploy/Issues/issues/2684