Transfer a Package step not working

I’ve got a deployment process set up with two steps-

  1. Transfer Package - pulls the selected package out of the Octopus repo and transfers it to the target environment
  2. Deploy Package- A PowerShell script which runs a utility from the command line, passing the filename of the package from step 1, to complete the deployment process

This process uses Offline Package Drops as its target environment so, when step 1 runs, the package is pulled out of the Octopus repo and into the folder defined by the OPD environment. It should then move it to the location specified in step 1, but this doesn’t happen (although there are no errors in the log).

In addition, when I use $OctopusParameters[“Octopus.Action[Transfer Package].Output.Package.FilePath”] to pass the package filename to my utility, it just get an empty string.

I’m not sure if the two issues have the same root cause or not, is anyone able to advise please?

Hi @ross.e.neilson,

Thanks for getting in touch!

I suspect that the problem you are having is related to this issue.

Having said that, depending on the version of Octopus you are using there might be a better way for this deployment to occur. As of Octopus 2018.8 script steps now have the ability to have packages directly attached and referenced as part of the one step (which would collapse your two steps to one). Are you able to let me know if this is an option for you?

Another option which might sidestep this issue is to use the Deploy a package step, and incorporate your script as a post deploy script inside the package you are deploying. This should also sidestep the issue you are seeing.

Hopefully that helps, let me know if you have any questions!

Regards,
Alex

Hi Alex, thanks for the quick reply. I’ve managed to merge my two steps into one as per your suggestion, and it’s all working nicely now.

Best wishes
Ross.

Hi Ross,

That’s great news, happy that I could help.

Let me know if there is anything else you need,

Regards,
Alex

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