Creating a package with variables transformed

I would like create a step in the deployment that will take my existing nuget package, unzip it, apply variable transforms and package it up again, then put in a folder on the deployment target.

This would be something very similar to the “Transfer Package” step, however it seems this step does not apply the variable transforms.

My goal here is to end up with a package that is configured and ready (but not installed).

Is there a way to do this?

Hi Bjarte,

Thanks for getting in touch! There are a couple of ways to achieve this which I’ll outline below.

What I’d first recommend is to have a standard package step and use the built-in substitute variables in files and config transform features (any that you require). From here, you can simply zip them back up by bundling in Octo.exe or use a library step template written by the community called File System - Zip Directory Contents. You can specify the directory to zip up by referencing the output directory from the package step: Octopus.Action[StepName].Output.Package.InstallationDirectoryPath

You could also use an Offline Package Drop deployment target. This will build the whole deployment but not perform any deployment features (like substitution and transformations) until you execute the batch file.

Would one of those options be a viable approach? Let me know what you think or if you have any further questions moving forward. :slight_smile:

Best regards,

Kenny

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