We are interested in running a script after the creation of an Offline Package Drop. What is the best way to do this? We don’t see any hooks in the Offline Package Drop process, nor does the Script Console seem to have what we want.
An example use case would be to upload the file drop to a secure location or perform other actions on the files.
Greetings WG! By default, Octopus Deploy will pick up embedded script files and execute them during the deployment process. In addition, steps like Deploy a Package can be configured to run inline scripts. To do this, edit the Deploy a Package step, click Configure Features and enable the Custom Scripts feature
Thanks for the response, but this not during Deployment. This is just after the creation of the offline drop files, not Deployment when the offline deployment script is run.
We are quite familiar with how to script during the deployment process, but we need a way to execute a script as part of the post process of creating the offline package itself.
I played around with this scenario on my local instance this morning to see if the location is available as a variable during the deployment process. Since the offline package drop isn’t actually deployed, none of the variables contained it’s destination. However, we can infer the destination using the documentation https://octopus.com/docs/infrastructure/deployment-targets/offline-package-drop#drop-folder-destination, that could be set as a variable in your project that the worker could then use.
OK. So I’ve created a worker and a worker pool on an external server using a tentacle. But now how do I configure it to run after the Package Drop is created? It’s not clear to me how this will be called after the directory is created. Could you please explain in more detail?