Scripts after Offline Package Drop Creation

Hi,

I’ve got a situation where I need to air gap my deployments to the Live environment. I’ve been developing offline packages to do that. Working great.

However I want to push my offline package to JFrog Artifactory automatically after it’s created. I’ve written a simple Powershell script to pull the package from the Octopus feed and upload it into Artifactory. But the script runs before the offline packaging step - it’s the last one in the deployment process, but it seems that offline package drop creation always comes last and the script does nothing because it can’t find any artifacts to upload at that point. I can’t see any way to make it do a script after that package has been created.

Is there any way that I can do that? I’m thinking in terms of having another project do that, but I’d rather have it within one project if I can.

Thanks. Dave

Hi David,

Thanks for reaching out!

What you are looking for isn’t possible within the one project, to create an OfflineDrop we are bundling up all the tasks within that project to execute on the end target, it’s not possible to separate tasks that execute on server with the rest being bundled into an Offline Drop.

I know you would rather not have a separate project, but that would be the only way to model this currently. I would suggest having a project that uses our Deploy a release step to create the offline drop, with your script step following on in the master project.

I hope that helps, please let me know if there is anything else I can help with,

Regards
Alex

Hi Alex,

Thanks for confirming. That’s the approach that I’ve gone with - used a community step template and queued a project that deploys the artifacts in 5 minutes.

Thanks for the help!

1 Like

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