Passing SQL scripts to Octopus

resolved
server
usability
support
(Dieser) #1

Hello community,

I have an Octopus configuration that deploys an app normally. The thing is that now we have to migrate the sql scripts in this same octopus configuration.
Currently we send the SQL scripts in the nuspec package along with the rest of the app files. We also have set up one step where we use Powershell to run Flyway, which is installed in the Octopus server. This step is run before the deployment itself.
The thing is that, since we have the SQL scripts in the nuspec package, these scripts end up being deployed along with the rest of the app files

My goal is to avoid sending these scripts to the different app servers

What’s the best solution to this?

Thanks a bunch

(Kenneth Bates) #3

Hi @dieser,

Thanks for getting in touch! What I’d probably suggest here is to split these SQL scripts into its own separate package, which you could then deploy by configuring its own package step in your deployment process. By scoping this new step to a different target role, and giving only the targets these SQL scripts need to end up on this target role, that would give you control over which targets get these files.

I hope that helps! Let me know what you think or if you have any further questions going forward. :slight_smile:

Best regards,

Kenny

1 Like
(Dieser) #4

Thank you @Kenneth_Bates !
I had tried that approach before but got some errors in TeamCity, so I thought it wasn’t supposed to be the way of sorting this out. But now you’ve mentioned the very same solution, I tried again and found out a config mistake I made in TeamCity. So bottom line, after fixing that error and trying again it worked as expected

Thank you again for your quick answer!

(Kenneth Bates) #5

Hi @dieser,

Thanks for following up and letting me know! That’s great to hear you got it working as needed. If you have any questions or concerns in the future, please don’t hesitate to reach out. :slight_smile:

Best regards,

Kenny

(system) closed #10

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