Today’s release brings a new feature aimed at making database deployments more transparent.
ReadyRoll 1.5 adds a number of details about your schema changes to the release contents screen in Octopus, including which migration scripts are pending deployment (if any), and a list of objects that are affected by those scripts.
How it works
The deployment preview is generated at build time by comparing the before-and-after states of your project to create a snapshot view of pending changes.
ReadyRoll first gets a list of migrations which are pending deployment in a given target environment (eg. your Production database), and then builds a version of your database that excludes that list of scripts. This defines the before state of your project.
Another version of your database is built up to the “tip” and includes all migration scripts within your project. This is the after state.
The list of changes is created by performing a diff between these two baselines, so multiple changes to the same object will be displayed as a single change in the list.
Configuring of deployment previews happens within the build parameters section of your Continuous Integration server.
Specify these MSBuild properties in your build configuration to enable deployment preview:
- TargetServer & TargetDatabase: the SQL Server instance name & database name of your target environment. We recommend setting this to the last environment in your deployment pipeline (for most this should be Production). Read-only access is required.
- ShadowServer: a test SQL Server instance name. This will be used by ReadyRoll to create the two versions of your database needed to generate the deployment preview. Sysadmin (database create/backup/drop) level access is required.
Viewing object differences
If the database is found to have pending changes, a report is generated that allows you to view the individual object differences.
To find the file (named
[ProjectName].html), currently you’ll have to dig into the build artifacts:
However we’re working with the team over at Octopus to see if we can include the report in the release details.
Deployment previews are now available as part of ReadyRoll 1.5.
If you need any help with getting started, check out guide for integrating ReadyRoll with Octopus.
Also in Blog
Implementing Agile working practices reminds me of Communism – if we just did it properly, everything would work perfectly! All projects would be a dream to work on, all deliveries would be early, t...
Also in Database DevOps & DLM
Visual Studio 2017 is released today, and its new features like Live Unit Testing and configurable code style rules have already been grabbing the headlines. But inside the Visual Studio 2017 installe...
Also about ReadyRoll
For .NET developers working with Visual Studio (VS), the introduction of Database Projects with SQL Server Data Tools (SSDT) brought to VS the ability to manage changes to the database schema and cod...