I have a scenario as follows. There are 3 web projects that all use the same database. The web projects are all deployed using Octopus.
Currently, database changes are run manually as needed.
What we would like to do, is have a project that deploys database changes, using dbUp, and include that project as a step within the other projects. Is this possible? Or should it become a library task to be included in all the projects? I’m confused about which is the best way to do this,
Thanks for reaching out. You could make use of our “Channels” feature, which as introduced in Octopus 3.2.
You would have 3 Channels, one per web project. Your deployment process would have 3 Nuget Package deploy steps and each step will be scoped to one of these channels. Then you’ll have your DBUp deploy/call step, which will be scoped to all channels to make sure it runs whenever you deploy any of your web project’s channels
Hope that helps,
Sort of, but what happens if we only want to release one of the web projects with no database changes? Could we then have a channel that released it without the database step?
In that case you’d have to have the DB step scoped to the two channels where you do want to use it. There’s no way to scope the step to “all but this channel”