I am able to deploy package from octopus server to tentacle . The package being copied at tentacle named as “Packageid@Version@XXXX” and I am not sure from where XXXX is coming from, example MgdSvc-Test@S2019.5@2E9BF84FBB15A446BAA0A6AE281A9968.
I am unable to install MSI as deployed file name dynamic behavior. Could you please advise.
Thanks for getting in touch! When Octopus deploys a package, before extraction, the package is copied to the target and a GUID is appended to the file. Octopus will then extract this package to the desire location before completing the deployment.
I have some questions which should assist in getting your deployment working as you intend.
Would you be able to let me know how you are packaging your MSI?
Would you also be able to let me know how you are deploying the package to the target? Are you using a Deploy a Package step, or a Transfer a Package step?
How are you attempting to execute the MSI during the deployment? Are you referencing the package id you mentioned above via a script step and using a variable?
Generally when deploying an MSI, you would package it in a ZIP (or nuget), deploy the package onto the target, then use a script step to target the MSI inside the deployment directory after extraction. (This directory is different than the directory where we initially copy the package and append the GUID).
Looking forward to hearing from you and getting to the bottom of this.
Thanks for getting back with that information. It looks like you need to point your install msi script to the location where Octopus extracts the package. Currently it looks like you are pointing to the location where Octopus copies the package.
You can use a variable like the following in your Octopus script to target the correct directory\filename: #{Octopus.Action.Package.InstallationDirectoryPath}\ProgramName.MSI
Octopus will evaluate this variable to the directory where the package has been extracted to.
We have a list of different variables available to you during deployment at the following location.
Let me know if this helps, or if you have any further questions here.
Using #{Octopus.Action[Deploy package to vwmazafinpsale1].Output.Package.InstallationDirectoryPath} variable in “Run an installer” I reaches to msi path but seems this variable does not capture the msi file name. So , I need the variable which capture Path\ProgramName.msi.
Also I am getting below error when I am choosing msi file path to #{Octopus.Action[Deploy package to vwmazafinpsale1].Output.Package.InstallationDirectoryPath}