Recommended way to copy package files to another directory?

Greetings, I’m new to Octopus Deploy. I’m currently trying to understand it all, so forgive my knowledge gaps here…

I’m looking for advice on the “best practice” for this particular scenario.

The scenario is the following procedure for deployment. I’d like to:

  1. Deploy a package to a tentacle. (using “Deploy a Package” step seems to copy and extract the .zip package to the default package directory for the OD tentacle).
  2. Edit some files inside that extracted package folder.
  3. Copy all the package files (including the updated files) to a final output folder.

Basically after the package is deployed, I’m wanting to treat the default package folder path as a “staging” area for the package files, perform some changes to the files (namely some configuration files), and then AFTER the changes are made, copy the files to a final output destination folder.

From what I can tell, this seems to be something that I’d have to write a custom script for, but with all the nice built-in features of Octopus Deploy and the community plugins, I just can’t come to terms that there isn’t some easy-to-use step plugin that does exactly this without resorting to a custom script.

So is that true? Is the only way to achieve this by writing a custom script via Powershell or similar?
Or is there another step / plugin I can add that will achieve Step #3 for me?

Again, this may just be me needing to figure out the “norm” for OD best practices…

Thanks for any help!

Hi @user103589,

Thanks for getting in touch! Octopus is very much capable of helping you here with the built in features.

To start, Octopus already has a staging folder it extracts the package to for substitutions and configuration changes to be made before it is copied into the final directory. We have an outline of the ordering of this process in our documentation.

The above docs page also contains some links to other pages on some of the features that Octopus can perform during the package deployment, such as substituting variables in files.

If you are not happy with the final extraction location of the package, you can use the Custom Installation Directory feature to define a custom location.

Octopus has many features to help you automate the substitution and manipulation of files and values inside of your files, our documentation is a great place to get further information on the available features.

If you have any more questions on this or run into any issues at all, please don’t hesitate to let me know.

Best regards,
Daniel