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

Branching using DLM Automation

We have developed an end-to-end DevOps solution using DLM Automation, TFS, Jenkins, and Octopus Deploy, but our first attempted production deployment was a spectacular failure. Fortunately we had a Review step in Octopus and aborted the process before we updated production. The issue was that the developer had checked in two sets of changes, some that were ready for Test and some that were ready for Prod. 

What is the best strategy for keeping this straight? I'm guessing some kind of branching would work but I'm interested in knowing what Best Practices we can leverage.
tomslickers
0

Comments

2 comments

  • MikielAgutu
    Hello Tom

    In my opinion the simplest way to help avoid problems like this is to take an approach where the main branch must always be shippable.

    In order to ensure that your main branch is always shippable, it's important to have a manual review step before changes are introduced to your main branch. This can be achieved by doing work on separate branches, then merging into the main branch only when the work is finished and has passed review. This ought to prevent the scenario where Test and Prod changes are introduced to the version to be shipped to customers.

    The next step is to set up a Continous Integration process. The CI proces should do things like verify the schema of the main branch, and run T-SQL tests. This should be done automatically whenever the main branch is pushed to the remote repository. The SQL Change Automation documentation explains how to do this: https://documentation.red-gate.com/sca3/automating-database-changes/continuous-integration.

    These processes ought to alert you to problems earlier on in your development process. CI is of course a large area and there's many opnions on how to set things up. I can point you to a couple more articles for further reading:


    Thanks

    Mikiel
    MikielAgutu
    0
  • tomslickers

    Mikiel,

    Thanks for your reply. Our big issue was that branching is too slow and difficult under TFS, but we are moving to Git and hope to develop a good branching strategy going forward.


    Regards,

    Tom

    tomslickers
    0

Add comment

Please sign in to leave a comment.