Deploy.csx cauing copying of bin folder?

When I add a deploy.csx file to a package, I’ve noticed my bin folder is copied just prior to running the .csx to scriptcs_bin. For large websites (with a bin folder of a few 100s of Mb) this introduces quite a large lag during deployments. I’ve also noticed this folder isn’t cleaned up afterwards!

I’ve had a dig through the calamari source code, but can’t see where this is occurring, or how to enable/disable it.

Please could you shed some light on:

  • why the bin folder is copied?
  • why the new bin folder isn’t cleaned up after deployment?
  • how I can prevent the copy from happening?

Thanks :slight_smile:

Hi,

Thanks for reaching out.

The creation of the scriptscs_bin directory comes from ScriptCS when it runs the script; see also here.

So there’s no way to stop it happening in Octopus as it’s a side effect of running the script.

You are also right that the directory isn’t removed after the script is run. There is this step template that you can add as another step to clean up.

Michael