I have some license files (.lic) I need to distribute to their respective environments using Octopus Deploy.
The licenses are currently in a .zip-folder containing sub-folders for each license file.
I have now uploaded the .zip-folder as a package to my Octopus library. Now I need to add in a script in my deployment step which can extract the correct license file for each environment and transfer the file to a destination path on the target machine.
Could I please have some guidance for this?
I have created a variable containing the subfolder name within the .zip file for each environment that I expect I need.
You should be able to do this with a Deploy a Package step, and the custom deployment scripts feature to add a post-deploy script that moves the files to the desired location.
There is a system variable that contains the default package installation folder that should be useful for your script: Octopus.Action.Package.InstallationDirectoryPath
e.g.
Hit the configure features button within the Deploy a Package step