How to make process steps use one working folder?

Hi, I’m new to Octopus Deploy. I’m trying to make a simple project that will acquire a TypeScript package from GitHub (I’m using a GitHub Repository feed to acquire source code from GitHub repository releases), compile it into JavaScript and run on a VPS.

So my draft steps are like so:

  1. Run a script that will move everything from the referenced package (from GitHub source) to the root of the working folder. I didn’t come up with anything cleaner. So far so good, the output of a “tree” command looks about right.
  2. Run another script: Bash “npm install”. It complains that there is no “package.json” file. And rightfully so, because the first step executed in the folder /etc/octopus/Tentacle/Work/20220828190354-29-219/, while the second script executed in the folder /etc/octopus/Tentacle/Work/20220828190356-29-221/.
  3. Run another script: Bash “tsc -b”. It executed in the folder /etc/octopus/Tentacle/Work/20220828190404-29-223/.

My question is – can I make them all work in one folder, e.g. /etc/octopus/Tentacle/Work/20220828190404-29/?

I guess I can mkdir it myself in the /etc/octopus/Tentacle/Work/ folder and cd there, but is there a neater approach?

Or am I missing something basic here?

I’m using a Linux Docker (docker-compose’d) version of Octopus Deploy running on a VPS machine (the same VPS is used for the Server, the Tentacle and the final product will be run on it as well). Version of the Octopus Deploy is 2022.2 (Build 7965). Tentacle is installed using “apt” and is installed as a Linux service, so not in Docker (I presume).

Hi @siteclistru
Thanks for contacting support.

I believe the feature you are looking for in your deploy is the ability to use a custom installation folder:

This will allow you to specify installation folders on your target within your process.

However I will say there are a few gotchas to be aware of. The main one is the lack of cleanup using retention policies on custom installation folders:

The other potential issue is file locking and stale files. This may require some dedicated cleanup in your process to take care.

Let me know if this is what you were looking for.

Kind regards,
Paraic

1 Like

Yeah, that’s exactly what I needed. Thank you so much!

1 Like

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