How can we help you today? How can we help you today?

How do force the Octopus Deploy "Deploy From Package" to exclude dependencies?

I can exclude dependencies from pre and post deployment schema checks but I need to ensure that no objects in a dependent schema are deployed through our process as we only actually own/control one schema in the database.
josh_stcu
0

Comments

5 comments

  • Pete_Ruiz
    Hello @josh_stcu ,

    Thanks for your query about SQL Change Automation. You should be able to completely prevent objects from other schemas from being deployed by adding a filter to the project. Please see the documentation below on how to use filters in SQL Change Automation.

    https://documentation.red-gate.com/sca/developing-databases/concepts/filtering


    I hope this helps. Please let me know how you get on or if you have any further questions.


    Kind regards,


    Pete Ruiz


    Pete_Ruiz
    0
  • josh_stcu
    @Pete_Ruiz , I have a deployment filter defined and included in the step but it doesn't currently prevent changes to the dbo schema when I deploy. (I've attached the scpf file as a txt)
    josh_stcu
    0
  • Pete_Ruiz
    Hello @josh_stcu

    What comparison options do you have defined in the release if not using the default? The option to include dependencies is enabled by default, if you disable it, do you still get the same issue?


    You can disable the option in the release by adding -IncludeDependencies (it's important to include the hyphen (-) which disables the option specified.


    Here's the documentation which outlines how to use SQL Compare options with SQL Change Automation add-ons:

    https://documentation.red-gate.com/sca/deploying-database-changes/automated-deployment-with-sql-source-control-projects/using-sql-compare-options-with-add-ons


    Kind regards,


    Pete Ruiz


    Pete_Ruiz
    0
  • josh_stcu
    So after some actual sleep I need to apologize (and thank you for the magic eyes). We had configured a library variable for the SQL Compare options. Octopus deploy was overwriting the local variable with the default from the library. Was able to retest and confirm that it is working as expected. Thank you!
    josh_stcu
    0
  • Pete_Ruiz
    @josh_stcu ,

    Great news! Thanks for the update and I'm glad it is no working as expected.

    I'll close the support ticket we have open for you. Please do reach back out if anything else comes up.

    Kind regards, 

    Pete Ruiz


    Pete_Ruiz
    0

Add comment

Please sign in to leave a comment.