Unzip deployment packages

Hi ,

I have an zip package uploaded to the octopus deploy server in build repository . My uploaded package has two subfolders in it and inside subfolder there is one zip package . with the package deployment can see that the uploaded zip package unzip successfully by the tentacle but the zip packages which is inside the subfolder is not unzip automatically. I have an option with script to unzip the packages recursively. But would like to know whether the octopus deploy has an option with context variable to unzip packages recursively.

Hi @om.joysaha,

Thanks for getting in touch!

Unfortunately, this isn’t an option at the moment. Octopus is set to extract the package on deployment, whether it is a zip, nupkg etc but doesn’t try to look any deeper for additional files to unzip.
The easiest way to achieve this would be to add the Custom Deployment Scripts feature and add a script to the Post-Deployment section to perform the unzipping.

Regards,
Paul

Thanks for letting me know. I have tried the custom script option but my findings is below can you please help over here.

  1. I deploying the packages to the custom location at target server say /app/deployment . Can see from the log that the custom script executing and unzipping recursively but actually on the target server at /app/deploment location I can’t see recursively unzip packages. Its neither in .octopus/Application/Octospusserver/uat nor in custom folder (/app/deployment)

  2. Also, can u please suggest how to change the by default package deploy location i.e .octopus/Application/Octospusserver/ to /app. Is it possible from any settings or we need to follow the custom install location option always in the deploy package template section.

Please suggests.

  1. Is your custom script definitely in the Post-Deployment section of the feature? If it is in one of the other sections it could run before the package is extracted and copied to the custom location. Also, is the script directly targeting the custom location? If both of those are correct, I can only assume that there the script is having an issue, so perhaps adding some additional logging would help narrow down the cause.

  2. You can configure the Tentacle home directory (Default: C:\Octopus) and the application sub-folder using the tentacle.exe --home and --app commands detailed here: https://octopus.com/docs/administration/managing-infrastructure/tentacle-configuration-and-file-storage
    Unless your wanting to move these folders to a different disk, typically it is better to make use of the custom install folder feature for ensuring application files end up in the right place.

Regards,
Paul